您好,打开有问题Activity
。
我startActivity()
通过Intent
单击来调用Button
。
我需要等待 4-5 秒Activity
显示在屏幕上。
我知道该怎么做。
itemimg = new ItemsInPacagesImageView(imglist1, this, nazovtripu, 0);
我有 17 次相似ImageView
的代码(与其他代码)我在 Method with name 中有这个 InitItemimg();
我试着用这个线程把这个方法放在 OnStart 活动上
@Override
public void onStart() {
super.onStart();
timer = new Thread() { // new thread
public void run() {
Boolean b = true;
try {
sleep(20);
runOnUiThread(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
InitItemimg();;
}
});
} catch (InterruptedException e) {
e.printStackTrace();
} finally {
}
}
};
timer.start();
}
但是没有解决我的问题,请问您有什么想法吗?谢谢