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條經(jīng)驗 獲得超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)

慕標(biāo)5832272
TA貢獻1966條經(jīng)驗 獲得超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
應(yīng)該被選中.
TextView txtView=(TextView) findViewById(R.id.scroller);txtView.setSelected(true);

慕妹3146593
TA貢獻1820條經(jīng)驗 獲得超9個贊
textview
android:focusable="true"android:focusableInTouchMode="true"android:layout_width="fill_parent"android:ellipsize="marquee"
添加回答
舉報
0/150
提交
取消