Spawn a separate thread that sleeps for 3 seconds then call runOnUiThread to hide the view.
Thread thread = new Thread() {
@Override
public void run() {
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
}
runOnUiThread(new Runnable() {
@Override
public void run() {
// Do some stuff
}
});
}
};
沒有留言:
張貼留言