I have an Activity in Android, with two elements:
Activity
EditText
ListView
When my Activity
Late but simplest answer, just add this in parent layout of the XML.
android:focusable="true" android:focusableInTouchMode="true"
Upvote if it helped you ! Happy Coding :)