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

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -