I need to display a numbers(1-8) on single TextView
like one by one and with sleeptime 1sec. here is my code
for(int i=0;i<9;i++){
TextView txt=(TextView)findViewById(R.id.txt);
txt.setText(String.valueOf(i));
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}