You want a delay between changing the button's text and showing the
new content-view?
If that's the case,
private void markUser(int index) {
btnArray[index].setText(mark);
btnArray[index].setClickable(false);
postDelayed(new Runnable() {
public void run() {
showGameOverMenu(); // calls the setContentView
();
}
}, delay);
}
(postDelayed may have to be called using a View or Handler instance)
On May 14, 2:37 am, Sukitha Udugamasooriya <[email protected]> wrote:
> Hi geniuses,
>
> I have few buttons on the content. When I click on one button,
>
> 1-- I want to change the text of the button.
> 2-- Then I want to change the content view.
>
> this is my method which executes with the onClick event.
>
> private void markUser(int index) {
>
> btnArray[index].setText(mark);
> btnArray[index].setClickable(false);
>
> showGameOverMenu(); // calls the setContentView();
> }
>
> Here the problem is the text change of the button is not visible.
>
> How can I make it visible??? I'm not thorough with how the UI thread
> works in android
>
> Thanks in advance
>
> Sukitha
> (wannaB android master ;))
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---