2
是否可以在啓動應用程序期間設置默認圖像?在iPhone上,我可以設置名爲「Default.png」的圖像來執行此操作。但在Android上可以嗎?Android的等效iPhone的默認圖像
(有關信息,我問,因爲我不能使用,因爲在第一個活動videoview的splascreen視圖或自動活動的其他。)
是否可以在啓動應用程序期間設置默認圖像?在iPhone上,我可以設置名爲「Default.png」的圖像來執行此操作。但在Android上可以嗎?Android的等效iPhone的默認圖像
(有關信息,我問,因爲我不能使用,因爲在第一個活動videoview的splascreen視圖或自動活動的其他。)
我不明白一個道理,爲什麼不使用splashscrean
public class SplashScreenActivity extends Activity {
protected boolean _active = true;
private Thread splashTread;
protected int _splashTime = 2000; // time to display the splash screen in ms
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash_screen);
// thread for displaying the SplashScreen
final SplashScreenActivity sPlashScreen = this;
// thread for displaying the SplashScreen
splashTread = new Thread() {
@Override
public void run() {
try {
synchronized (this) {
// wait 5 sec
wait(_splashTime);
}
} catch (InterruptedException e) {
} catch (UnsupportedOperationException e1) {
// TODO: handle exception
} finally {
finish();
// start a new activity
Intent i = new Intent();
i.setClass(sPlashScreen, Your videoViewActivity.class);
startActivity(i);
}
}
};
splashTread.start();
}
// Function that will handle the touch
@Override
public boolean onTouchEvent(MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
synchronized (splashTread) {
splashTread.notifyAll();
}
}
return true;
}
}
你是什麼意思默認圖像?你說你不能使用啓動畫面,所以你想在哪裏顯示圖像? – BigFwoosh 2011-06-06 16:04:41