为什么我的跑马灯效果只滚了那么一下?

<TextView

      

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:text="@string/paomadeng"

        android:singleLine="true"

        android:ellipsize="marquee"

        android:focusable="true"

        android:focusableInTouchMode="true"

         />


奥特曼还是变形金刚
浏览 1093回答 1
1回答

习惯受伤

解决方法有两种,1,重写textview,让focusable返回true(我记忆是这样的,具体哪个方法上电脑我看),优点:简单,快速。缺点:如果其他控件获取了焦点,滚动会变得一卡一卡的。2,自定义组件,优点:效果完美,缺点:需要自己写代码开发。
打开App,查看更多内容
随时随地看视频慕课网APP