I want create some simple animation for my program.
There is 4 invisible button, and that I want is when program is started,
those button will visible with delay.
Show button 1 -> button 2 -> and so on.
I tried this, but when program running, all button will appear in same time.
try {
((Button) findViewById(R.id.f1)).setVisibility(View.VISIBLE);
Thread.sleep(1200);
((Button) findViewById(R.id.f2)).setVisibility(View.VISIBLE);
Thread.sleep(1200);
((Button) findViewById(R.id.f3)).setVisibility(View.VISIBLE);
Thread.sleep(1200);
((Button) findViewById(R.id.f4)).setVisibility(View.VISIBLE);
Thread.sleep(1200);
} catch (Exception e) {
}
anyone can help me ?
Use a Handler: