开发者

How to levy marquee on the selected text of Android Spinner?

开发者 https://www.devze.com 2023-03-14 23:28 出处:网络
I have added Spinner of width: width=this.ge开发者_如何学CtWindowManager().getDefaultDisplay().getWidth()/2;

I have added Spinner of width:

width=this.ge开发者_如何学CtWindowManager().getDefaultDisplay().getWidth()/2;

in one of the layout in my project. The spinner has strings of varied widths, which even wrap up to two lines. Now Since the spinner width is definite (half of the screen width), when I select one of the string from the spinner, the selected text overlaps the spinner UI.

How can I apply the marquee effect on the selected text?


I'm guessing you have tried adding

 android:singleLine="true"
 android:ellipsize="marquee"
 android:marqueeRepeatLimit="marquee_forever"

to the selected text's view in your xml file?

TextView Marquee

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号