问题
Hi i need to add a continuously scrolling text view to my app.
I need to update the text from a website .
Can anyone tell me any tutorials where i can find the code to do it.
Thanks for your help in advance.
回答1:
http://androidbears.stellarpc.net/?p=185
Try this website it may be usefull.
回答2:
Use this:
<TextView
android:id="@+id/textId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:lines="1"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:text="Simple application that shows how to use marquee, with a long text"
android:textColor="#ff4500" />
In Activity :
tv = (TextView) findViewById(R.id.textId);
tv.setSelected(true);
Thanks.
来源:https://stackoverflow.com/questions/14067294/scrolling-text-view-like-a-marquee-in-html