ellipsize 跑马灯失效的解决方案
请严格按照如下顺序
android:ellipsize="middle"
android:singleLine="true"
android:focusable="true"
android:marqueeRepeatLimit="marquee_forever"
android:focusableInTouchMode="true"
android:scrollHorizontally="true"
本文介绍了一种解决Android中TextView跑马灯效果失效的方法,通过特定属性设置顺序确保跑马灯正常工作:1. 设置 android:ellipsize=middle;2. 设置 android:singleLine=true;3. 设置 android:focusable=true;4. 设置 android:marqueeRepeatLimit=marquee_forever;5. 设置 android:focusableInTouchMode=true;6. 设置 android:scrollHorizontally=true。
ellipsize 跑马灯失效的解决方案
请严格按照如下顺序
android:ellipsize="middle"
android:singleLine="true"
android:focusable="true"
android:marqueeRepeatLimit="marquee_forever"
android:focusableInTouchMode="true"
android:scrollHorizontally="true"

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