Root cause: ListView (or other adapter view) does not get focus
Liezi:
<relativelayout xmlns:android= "Http://schemas.android.com/apk/res/android"
Android:layout_width= "Fill_parent"
android:layout_height= "Fill_parent"//Delayed One: fill_parent
android:orientation= "Vertical"
android:descendantfocusability= "blocksdescendants"//Delayed two
>
Right should be
<relativelayout xmlns:android= "Http://schemas.android.com/apk/res/android"
Android:layout_width= "Match_parent"
android:layout_height= "Match_parent"
android:orientation= "Vertical" >
Remember:
The primary layout (relativelayout) of adapter XML cannot be used Fill_parent
The reason is two.
One:
Reason: android:descendantfocusability= "blocksdescendants" is set in adapter XML
Note: The item below is ListView item
Android:beforefocusability ViewGroup gets focus before the subkey is processed
Android:afterfocusability ViewGroup gets focus after subkey processing
Android:blocksfocusability ViewGroup prevents the child from getting focus (the child of this subkey gets the focus)
Two: In Layout_ ... Set up the Fill_parent,
The principle is that fill_parent originally required this layout full screen, but ListView (or other adapter view) limits the item's height width.