Transfer from http://blog.csdn.net/silence_cdsn/article/details/7987063
Change the layout properties of a ListView
Before the layout:
[HTML]View Plaincopy
- <ListView android:id="@+id/list_chat"
- android:stackfrombottom="true" android:layout_width="fill_parent"
- android:layout_height="fill_parent" android:scrollingcache="false"
- android:cachecolorhint="@android: Color/background_light"
- android:layout_weight= "1" android:divider="@null"
- android:background="@color/chat_bg" android:fadingedge="None"
- android:layout_gravity="Bottom" />
[HTML]View Plaincopy
- <ListView android:id="@+id/list_chat"
- android:stackfrombottom="true" android:layout_width="fill_parent"
- android:layout_height="fill_parent" android:scrollingcache="false"
- android:cachecolorhint="@android: Color/background_light"
- android:layout_weight= "1" android:divider="@null"
- android:background="@color/chat_bg" android:fadingedge="None"
- android:layout_gravity="Bottom" />
After the change
[HTML]View Plaincopy
- <ListView android:id="@+id/list_chat"
- android:stackfrombottom="true" android:layout_width="fill_parent"
- android:layout_height="fill_parent" android:scrollingcache="false"
- android:cachecolorhint="@android: Color/background_light"
- android:layout_weight= "1" android:divider="@null"
- android:background="@color/chat_bg" android:fadingedge="None"
- android:fastscrollenabled="true" android:transcriptmode="normal"
- android:scrollbarstyle= "insideinset" android:layout_gravity="Bottom" />
[HTML]View Plaincopy
- <ListView android:id="@+id/list_chat"
- android:stackfrombottom="true" android:layout_width="fill_parent"
- android:layout_height="fill_parent" android:scrollingcache="false"
- android:cachecolorhint="@android: Color/background_light"
- android:layout_weight= "1" android:divider="@null"
- android:background="@color/chat_bg" android:fadingedge="None"
- android:fastscrollenabled="true" android:transcriptmode="normal"
- android:scrollbarstyle= "insideinset" android:layout_gravity="Bottom" />
Normal Picture:
After pop-up keyboard, abnormal picture:
Eject keyboard after normal picture:
When the input box pops up, the ListView content is obscured, and the solution