Hi,

i use a Thread to make buttons visible for some seconds. If the
location change, the buttons should gets visible for x seconds.

My code:
dialog = new Thread (new Runnable()
{
        public void run()
        {
                try
                {
                        Thread.sleep(3000);
                        handler.sendMessage(handler.obtainMessage());
                }
                catch (Throwable t)
                {
                        t.printStackTrace();
                }
        }
});


My handler:
Handler handler = new Handler ()
{
    public void handleMessage(Message msg)
    {
                right.setVisibility(View.INVISIBLE); //Button
                left.setVisibility(View.INVISIBLE); //Button
    }
};

in my onLocationChanged - method, i change the visibiliy of my buttons
to View.VISIBLE and call dialog.run();

But the buttons aren't visible for 3 seconds.. It seems, thats my app
"sleep" for 3 seconds and after that, the buttons are show for ~1ms.

Thanks for tips. Greets,
Stefan
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to