transcriptMode 的值
disabled | 0 |
Disables transcript mode. This is the default value. 默认的,transcriptMode不可用。 |
normal | 1 |
The list will automatically scroll to the bottom when a data set change notification is received and only if the last item is already visible on screen. 当数据变化,并且,最后一条可见的时候,会自动滚动到底部。 |
alwaysScroll | 2 |
The list will automatically scroll to the bottom, no matter what items are currently visible. 数据变化,就会滚动到底部。 |
使ListView滚动到底部
android:stackFromBottom="true"
android:transcriptMode="normal"
本文详细介绍了ListView中transcriptMode属性的几种设置方式及其效果:disabled为默认禁用状态;normal模式下,数据集变更时若最后一项已显示则自动滚动至底部;alwaysScroll模式则无论当前视图状态如何都会自动滚动至底部。此外还提到了实现自动滚动至底部所需的两个属性配置。

596

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



