transcriptMode的3种情况

来源:互联网 发布:网络大额度贷款 编辑:程序博客网 时间:2024/05/20 00:51

     今天忽然想到很久之前孙哥曾给我提的一个需求,涉及到android:transcriptMode这个属性。 就想查找下前辈分享的学习成果资料,没有找到。于是就想把我学习成果分享给大家。

    transcriptMode  只能是下面的值之一。

disabled0Disables transcript mode. This is the default value. 
默认的,transcriptMode不可用。
normal1The 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 2The list will automatically scroll to the bottom, no matter what items are currently visible.
数据变化,就会滚动到底部。

    在xml中 android:transcriptMode=“alwaysScroll” 

    在java中 listview.setTranscriptMode(ListView.TRANSCRIPT_MODE_ALWAYS_SCROLL);

0 0