java - How to continuously update textView with a different delay parameter -
i'm pretty new java , android, , i'm coding application, takes text action.send , display word word in textview.
i have method, returns spanned
text, , want continuously update in textview , implement actions, such pause or resume. i've implemented activity using this guide, when iterate on list of words this:
for (int = 0; < listsize; ++i){ ((textview) layout.findviewbyid(r.id.textview).settext(sometext); thread.sleep(1000 * coefficient); }
the application shows last element of array(when cycle finished). advise technique implement properly?
the problem you'er blocking ui-thread sleep method. try using handler (link doc) , method postdelayed (here).
Comments
Post a Comment