java - Program should wait after Textfield changed its text -
java - Program should wait after Textfield changed its text -
my testprogram should alter textviews text , after done, should wait on sec before next text change. programme runs text changes instant behind each other:
t.settext("test!"); handler handler = new handler(); handler.postdelayed(new runnable() { @override public void run() { t.settext("test - after 1 second!"); } },1000);
the first text not there close second.
hard why wouldn't work limited amount of code can add together post delayed view
. don't need handler.
t.settext("test!"); t.postdelayed(new runnable() { @override public void run() { t.settext("test - after 1 second!"); } }, 1000);
all views
in android have built in handler class.
java android
Comments
Post a Comment