【发布时间】:2014-12-19 12:00:45
【问题描述】:
我想在我的应用程序中将 Marquee 功能应用于 TextView,并且我已经成功实现了它。这是我使用的代码。
<TextView
android:id="@+id/latest_notification"
android:layout_width="fill_parent"
android:layout_height="20dp"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:marqueeRepeatLimit="marquee_forever"
android:paddingLeft="15dip"
android:paddingRight="15dip"
android:scrollHorizontally="true"
android:singleLine="true" />
在片段中
mLatestNotification = (TextView) view
.findViewById(R.id.latest_notification);
mLatestNotification.setSelected(true);
mLatestNotification
.setText("Scrollable textScrollable textScrollable textScrollable textScrollable text Scrollable text");
现在我的问题是,如果我将小文本分配给 TextView,那么选取框功能不起作用。有没有办法我也可以为小文本应用选取框?
谢谢
【问题讨论】:
标签: android android-activity android-fragments marquee