TextView属性中要设置android:layout_width的宽度值,比如:android:layout_width="50dp"
<TextView android:id="@+id/tv_credit_staff_mobile" android:layout_width="50dp" android:layout_height="wrap_content" android:layout_gravity="left|center_vertical" android:layout_marginRight="3dp" android:singleLine="true" android:ellipsize="marquee" android:marqueeRepeatLimit="marquee_forever" android:text="@string/credit_staff_mobile" android:textColor="#16c38f" />
Adapter中必须设置一句,setSelected(
true
)
((TextView)holderView.findViewById(R.id.tv_credit_staff_mobile)).setSelected(true);