1. Download our Official Android App: Forums for Android!

Apps setVisibility crashes with timer

Discussion in 'Android Development' started by guyAtAndroid, Aug 28, 2009.

  1. guyAtAndroid

    guyAtAndroid Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Aug 28, 2009

    Aug 28, 2009
    1
    0
    5
    I'm trying to write an app that has a button that appears and disappears after some time (similar to the maps' zoom in/out buttons).
    My code is as follows:

    ..
    t = new Timer(false);
    t.schedule(new TimerTask() {public void run()
    {
    Log.d("starting disabling buttons", "== here ==");
    for (Button b : buttons){
    b.setVisibility(View.INVISIBLE);
    Log.d("after visibility", "== done ==");
    }
    }}, 3000);
    ..

    I get the first debug message but not the second. Ideas?

    thanks
    Guy
     

    Advertisement

Share This Page

Loading...