Hello everyone,
I first have a general question if threaded programming is possible with the
Android Platform?
Secondly I have a specific problem. I have an application that gives the
user feedback with a "PopupWindow". By standart the Popup disappears then
the user clicks somewhere on the screen. I want to make the popup
automatically after X millisecond, so I programmed myself a little thread:
package com.fon;
import android.util.Log;
public class PopupThread extends Thread {
fonPopupWindow popup;
long millis;
public PopupThread(fonPopupWindow popup) {
this.popup = popup;
}
public void run() {
try {
sleep(millis);
popup.dismiss();
}
catch(InterruptedException e) {
}
}
}
but everytime the thread tries to dismiss my popup, I get the following
exception:
android.view.ViewRoot$CalledFromWrongThreadException: Only the original
thread that created a view hierarchy can touch its views.
>From what I understand, this tells me that I cannot access something outside
the new created Thread, and therefore my plan is immpossible to solve on
Android.
Thx for suggestions
Falko
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---