How [Android] TextView Marquee effect take effect

Simple in xmlmodifying the layout file ellipsizeattributes, marquee effect is not in force. Dynamically provided in code the following properties:

TextView tv = new TextView(context);
tv.setEllipsize(TextUtils.TruncateAt.MARQUEE);
tv.setSingleLine(true);
tv.setSelected(true);
tv.setFocusable(true);
tv.setFocusableInTouchMode(true);

 

Guess you like

Origin www.cnblogs.com/kborid/p/12587332.html