Please tell me why is the following XML attribute used ?
I looked up the documentation on developer.android.com but could not understand anything.
This blog post can help you to understand the meaning of touch mode.
The most relevant part :
The touch mode is a state of the view hierarchy that depends solely on the user interaction with the phone. By itself, the touch mode is something very easy to understand as it simply indicates whether the last user interaction was performed with the touch screen. For example, if you are using a G1 phone, selecting a widget with the trackball will take you out of touch mode; however, if you touch a button on the screen with your finger, you will enter touch mode. When the user is not in touch mode, we talk about the trackball mode, navigation mode or keyboard navigation, so do not be surprised if you encounter these terms. Finally, there is only one API directly related to touch mode, View.isInTouchMode().
android:focusableInTouchMode="true" means that the view can get the focus when the phone is in touch mode.
EditText is generally focusable in touch mode and on the other hand a
Button is generally not focusable in touch mode.
Happened to me when I didn’t have the correct number of items in getItemCount().
Double check that you have the right number of items!