create delay after dispalying text in TextView in android? -
im getting delay first , after text displayed wanted display text first , create delay???
textview textview=(textview)findviewbyid(r.id.correct_word) textview.settext("delay created"); final handler handler = new handler(); handler.postdelayed(new runnable() { @override public void run() { //your code } }, 2000);
just move textview.settext("delay created");
inside runnable
's run()
method:
textview textview=(textview)findviewbyid(r.id.correct_word) final handler handler = new handler(); handler.postdelayed(new runnable() { @override public void run() { textview.settext("delay created"); } }, 2000);
Comments
Post a Comment