transcriptMode的3种情况

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

    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.
数据变化,就会滚动到底部。

    在xml中 android:transcriptMode=“alwaysScroll” 

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值