android - scrolling marquee with updating text -
i have textview text updated runnable every 10 sec. after adding marquee effect got problem. when text updates blinks , appears in other position. how can make change letters?
textview onetext = (textview) findviewbyid(r.id.onetext); onetext.setselected(true); handler = new handler(); final runnable r = new runnable() { public void run() { try { string bigstring = "some text here"; onetext.settext(bigstring); handler.postdelayed(this, 20 * 1000); } catch (exception e) { log.e(log_tag, e.getmessage()); } } }; <textview android:id="@+id/onetext" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleline="true" android:ellipsize="marquee" android:marqueerepeatlimit="marquee_forever" android:focusable="false" android:scrollhorizontally="true" android:text="@string/somestring" />
Comments
Post a Comment