更改listview的布局属性
之前的布局:
- <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" />
<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" />
更改后的
- <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" />
<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" />
正常图片:
弹出keyboard后,非正常图片:

弹出keyboard后正常图片:
本文详细介绍了如何更改ListView的布局属性,包括布局方向、尺寸、滚动缓存、颜色提示、权重、分隔线、背景色、边缘效果和布局重力等。在键盘弹出时,通过调整布局属性确保界面正常显示。

被折叠的 条评论
为什么被折叠?



