Xamarin Android - Hiding Keyboard on initial activity load

888 Views Asked by At

In my app, I have a AutoCompleteTextView field at the top of my activity and a list at the bottom of the activity. So what I'm having issues with is when the activity opens the list gets covered up by the keyboard. The AutoCompleteTextView field is automatically being focused which is causing the keyboard to display. Is there a way to tell the activity to not show the keyboard initially?

    <AutoCompleteTextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:id="@+id/AutoCompleteInput" />

I've looked in a lot of areas for a solution, but nothing quiet works for my situation. Most of the forums I've looked at are concerning TextViews or iOS.

1

There are 1 best solutions below

0
Joey On BEST ANSWER

Use the android:focusableInTouchMode="true" on your parent layout view.

See this SO post here:

https://stackoverflow.com/a/1662088/6211127