直接在Layout中写即可,注意下面的stackFromBottom以及transcriptMode这两个属性。
<ListView android:id="listCWJ"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:stackFromBottom="true"
android:transcriptMode="alwaysScroll"
/>
本文介绍如何在Layout中配置ListView,并重点讲解了stackFromBottom及transcriptMode属性的作用。通过设置这些属性,可以实现消息列表自动滚动到最新消息的功能。
2万+

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



