textview文字横向滚动

<TextView
android:id="@+id/tv"
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center_vertical"
android:singleLine="true" //设置单行
android:ellipsize="marquee" //设置全部显示
android:focusable="true" //获取焦点
android:focusableInTouchMode="true" //获取焦点
android:text="存款保险制度是指银行等存款类金"/>

重写textview 的 isFocused() 方法,直接返回true

原文地址:https://www.cnblogs.com/guduey/p/4423937.html