new to android and I don't know how to display a View after some time. I don't want codes, just want some guidance or resources so I can learn. Already googled it in vain.
Asked
Active
Viewed 54 times
1 Answers
0
You should use handler to post in UI thread . Then set time using postDelayed method of Handler class .
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
//Set the text in your textview here
}
}, TIME_IN_MILLISECONDS);

Rishabh Maurya
- 1,448
- 3
- 22
- 40
-
@ArpitChhabra I have posted sample snippet . – Rishabh Maurya Apr 04 '17 at 06:17
-
Actually it says can't resolve symbol 'handler' and postDelayed method – Ari Apr 04 '17 at 08:08
-
I copied the above code and pasted it in onCreate method – Ari Apr 04 '17 at 08:09
-
@Arpit Chhabra Handler is a class . You need to import it – Rishabh Maurya Apr 04 '17 at 08:09
-
In place of TIME_IN_MILLISECONDS put the time in milliseconds after which you want to display textView – Rishabh Maurya Apr 04 '17 at 08:11
-
got it and imported it Thanks! – Ari Apr 04 '17 at 08:11
-
Is it Working ? – Rishabh Maurya Apr 04 '17 at 08:14
-
You never asked for animation – Rishabh Maurya Apr 04 '17 at 08:15
-
now I'm asking how to put some animation or transition in android? and thanks for your help so far – Ari Apr 04 '17 at 08:18
-
I think I answered your question. Anyway to know how to animate visit this link .http://stackoverflow.com/a/34089296/5879376 – Rishabh Maurya Apr 04 '17 at 08:22