2019独角兽企业重金招聘Python工程师标准>>> 经常需要用ListView或者其它显示大量Items的控件实时跟踪或者查看信息,并且希望最新的条目可以自动滚动到可视范围内。通过设置控件transcriptMode属性可以将Android平台的控件(支持ScrollBar)自动滑动到最底部。 源代码: <ListView android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="fill_parent" android:stackFromBottom="true" android:transcriptMode="alwaysScroll" /> 转载于:https://my.oschina.net/smalant/blog/41060