TextView Marquee不工作我试过使用marquee,它在这里不起作用是我的代码,请告诉我哪里出错了。<TextView
android:text="lunch 20.00 | Dinner 60.00 | Travel 60.00 | Doctor 5000.00 | lunch 20.00 | Dinner 60.00 | Travel 60.00 | Doctor 5000.00"
android:id="@+id/TextView02"
android:layout_width="200dip"
android:layout_height="wrap_content"
android:marqueeRepeatLimit="marquee_forever"
android:ellipsize="marquee"
android:singleLine="true"
android:focusable="true"
android:inputType="text"
android:maxLines="1"></TextView>我正在使用AndroidSDK2.0.1
3 回答
慕妹3242003
TA贡献1824条经验 获得超6个赞
<TextView android:text="START | lunch 20.00 | Dinner 60.00 | Travel 60.00 | Doctor 5000.00 | lunch 20.00 | Dinner 60.00 | Travel 60.00 | Doctor 5000.00 | END" android:id="@+id/MarqueeText" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" android:ellipsize="marquee" android:marqueeRepeatLimit="marquee_forever" android:scrollHorizontally="true" android:paddingLeft="15dip" android:paddingRight="15dip" android:focusable="true" android:focusableInTouchMode="true" android:freezesText="true">
编辑(代表Adil Hussain):
textView.setSelected(true)
慕标5832272
TA贡献1966条经验 获得超4个赞
android:singleLine="true" android:ellipsize="marquee"
layout_weight
layout_width=0dp
<TextView android:id="@+id/scroller" android:singleLine="true" android:ellipsize="marquee" android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="#FFFFFF" android:text="Some veryyyyy long text with all the characters that cannot fit in screen, it so sad : ( that I will not scroll" android:layout_marginLeft="4dp" android:layout_weight="3" android:layout_width="0dp" android:layout_height="wrap_content" />
TextView
应该被选中.
TextView txtView=(TextView) findViewById(R.id.scroller);txtView.setSelected(true);
慕妹3146593
TA贡献1820条经验 获得超9个赞
textview
android:focusable="true"android:focusableInTouchMode="true"android:layout_width="fill_parent"android:ellipsize="marquee"
添加回答
举报
0/150
提交
取消