跑马灯不在我的TextView工作,请检查下面的代码
XML代码适用于TextView
<TextView
android:id="@+id/mtextcash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="30dp"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:maxLength="5"
android:scrollHorizontally="true"
android:scrollbars="horizontal"
android:singleLine="true"
android:text="Simple application that shows how to use marquee, with a long text"
android:textColor="@color/white"
android:textColorHint="@color/white"
android:textSize="25dp" />
在 `Activity` 的 `OnCreate` 方法中:
TextView inputAvailableCash = (TextView) findViewById(R.id.mtextcash);
inputAvailableCash.setSelected(true);
提前感谢