I wanna create a program has two Button
s named button1
and button2
.This is block of button1
onClick
method :
public void click1(View v){
Button b = (Button)findViewById(R.id.button2);
b.setText("TEXT 1");
SystemClock.sleep(500);
b.setText("TEXT 2");
}
but the problem is after first change of object 'b' text to "TEXT 1" , it occurs nothing and after 500 ms text of 'b' changes to "TEXT 2".
What's the problem?
How to refresh Layout
views contents?