2010-06-02 51 views

回答

4

你可以使用Android:在TextView的屬性ellipsize =「選取框」或實現自己的動畫

+3

一個側面說明:只有被選中TextView的默認字幕動畫開始。 – 2010-06-03 20:05:25

1

這是簡單地使用XML自動滾動文本視圖小例子,無需對碼的Java。希望你會喜歡!試試你自己,這是很容易執行

試試這個:

<TextView 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:singleLine="true" 
android:scrollHorizontally="true" 
android:ellipsize="marquee" 
android:marqueeRepeatLimit ="marquee_forever" 
android:focusable="true" 
android:focusableInTouchMode="true" 
android:text="This is small example for auto scroll text view simply using XML, no need to code Java. Hope you like it! Try it on your own, it is very easy to perform" /> 

Click here to see the Output

這裏文本會自動滾動,你會得到無限滾動。玩的開心!

Click here to see detailed tutorial