2010-06-02 12 views

Odpowiedz

4

Można użyć android: ellipsize = „ramkę” w TextView atrybutów lub zaimplementować własną animację

+3

Na marginesie: Animacja domyślny namiot zaczyna się dopiero, gdy jest wybrana TextView. –

1

Jest to mały przykład do automatycznego przewijania widoku tekstu po prostu przy użyciu języka XML, nie ma potrzeby, aby kod Java. Mam nadzieję, że to ci się spodoba! Wypróbuj go na własną rękę, to jest bardzo łatwe do wykonania

Spróbuj tego:

<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

Oto tekst będzie przewijany automatycznie, a dostaniesz nieskończoną zwój. Baw się dobrze!

Click here to see detailed tutorial

Powiązane problemy