I am using an AutoCompleteTextView in which when the user types a character the words starting with that character will be shown up.But in my case the list is not showing up.

XML

```
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <LinearLayout
            android:layout_width="match_parent"
            android:orientation="vertical"
            android:layout_height="match_parent">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:layout_marginRight="15dp"
                android:layout_marginLeft="15dp"
                android:layout_marginTop="50dp">

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:id="@+id/iv_image"
                    android:layout_gravity="center_horizontal"
                    android:adjustViewBounds="true" />

                <Button
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="30dp"
                    android:text="Choose File"
                    android:id="@+id/bt_choose_file"
                    android:layout_gravity="center_horizontal" />

                <EditText
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:id="@+id/et_Title"
                    android:layout_marginTop="30dp"
                    android:hint="File Name"
                    android:layout_gravity="center_horizontal"
                    style="@style/EditText" />

                <AutoCompleteTextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="30dp"
                    android:hint="Document Type"
                    android:imeOptions="actionDone"
                    style="@style/EditText"
                    android:id="@+id/ac_document_type"
                    android:layout_gravity="center_horizontal" />

            </LinearLayout>

            <LinearLayout
                android:orientation="horizontal"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="15dp"
                android:layout_marginRight="15dp"
                android:layout_marginTop="30dp">

                <Button
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="Upload"
                    android:textColor="#fff"
                    android:textStyle="bold"
                    android:textSize="25sp"
                    android:id="@+id/bt_upload"
                    android:background="@drawable/button_1"
                    android:layout_marginRight="5dp"
                    android:layout_weight="1" />

                <Button
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="Cancel"
                    android:textColor="#fff"
                    android:textStyle="bold"
                    android:textSize="25sp"
                    android:id="@+id/bt_cancel"
                    android:background="@drawable/button_1"
                    android:layout_marginLeft="5dp"
                    android:layout_weight="1" />
            </LinearLayout>
        </LinearLayout>
    </ScrollView>

</LinearLayout>

```

Code

```
public class UploadDocument extends MasterFragment implements View.OnClickListener {

    private Button btChooseDoc, btUpload, btCancel;
    private EditText etTitle;
    private AutoCompleteTextView acDocumentType;
    private String[] chooseDocumentArray;
    private String userSelection = "";
    ImageView image;
    private Intent intent;
    Bitmap camera, galleryImage;
    Uri galleryUri;
    private String[] documentsArray;
    private ArrayAdapter<String> documentArrayAdapter;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.upload_docs_fragment, null, false);
        return view;
    }

    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        initialize();
    }

    private void initialize() {

        btChooseDoc = (Button) getActivity().findViewById(R.id.bt_choose_file);
        acDocumentType = (AutoCompleteTextView) getActivity().findViewById(R.id.ac_document_type);
        btUpload = (Button) getActivity().findViewById(R.id.bt_upload);
        btCancel = (Button) getActivity().findViewById(R.id.bt_cancel);
        image = (ImageView) getActivity().findViewById(R.id.iv_image);
        etTitle = (EditText) getActivity().findViewById(R.id.et_Title);
        btChooseDoc.setOnClickListener(this);
        btUpload.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {

        setUp();

        switch (view.getId()) {

            case R.id.bt_choose_file:

                displayPopup(getActivity(), "Choose File", chooseDocumentArray, btChooseDoc, false, new GetNamePosition() {
                    @Override
                    public void getName(String name) {
                        userSelection = name;
                        if (userSelection.equals("Gallery")) {
                            intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
                            startActivityForResult(intent, 0);
                            btChooseDoc.setText("Choose File");
                        }

                        if (userSelection.equals("Camera")) {
                            intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
                            startActivityForResult(intent, 1);
                            btChooseDoc.setText("Choose File");
                        }

                        if (userSelection.equals("Other")) {
                            intent = new Intent(Intent.ACTION_GET_CONTENT);
                            intent.setType("file/*");
                            startActivityForResult(intent, 2);
                            btChooseDoc.setText("Choose File");
                        }
                    }

                    @Override
                    public void getPosition(int position) {

                    }
                });
                break;
            case R.id.bt_upload:

                if (isConnected(getActivity())) {

                } else {
                    Crouton.makeText(getActivity(), "Internet Connection not available", Style.ALERT).show();
                }

        }
    }

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

//        Bitmap camera;
        ByteArrayOutputStream bytes = new ByteArrayOutputStream();

        if (requestCode == 1 && resultCode == getActivity().RESULT_OK) {

            camera = (Bitmap) data.getExtras().get("data");
            camera.compress(Bitmap.CompressFormat.JPEG, 60, bytes);
            galleryImage = Bitmap.createScaledBitmap(galleryImage, 150, 150, false);
            image.setImageBitmap(camera);

        }

        if (requestCode == 0 && resultCode == getActivity().RESULT_OK) {

            galleryUri = data.getData();
            try {
                galleryImage = decodeUri(getActivity(), galleryUri);
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
            galleryImage.compress(Bitmap.CompressFormat.JPEG, 50, bytes);
            galleryImage = Bitmap.createScaledBitmap(galleryImage, 150, 150, false);
            image.setImageBitmap(galleryImage);

        }

    }

    private void setUp() {

        chooseDocumentArray = getResources().getStringArray(R.array.Choose_Document);

        // for documents

        documentsArray = getResources().getStringArray(R.array.Document);
        Arrays.sort(documentsArray);
        documentArrayAdapter = new ArrayAdapter<String>(getActivity(), R.layout.textview, documentsArray);
        acDocumentType.setAdapter(documentArrayAdapter);

    }

}

```

I have set the arrayAdapter properly but still i am not getting the list