【发布时间】:2015-08-17 03:01:48
【问题描述】:
我正在使用全屏大小的初始屏幕,没有操作栏布局,但是当我移动到登录活动时,这是具有操作栏的正常活动,我的布局不能顺利移动,它显示一些闪烁(上/下)。我不是克服它请帮助...
我正在使用 Intent 将动作从启动活动传递到登录活动
这是我的启动画面代码:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
/* set time to splash out */
final int welcomeScreenDisplay = 4000;
/* create a thread to show splash up to splash time */
Thread welcomeThread = new Thread() {
int wait = 0;
@Override
public void run() {
try {
super.run();
/*
* use while to get the splash time. Use sleep() to increase
* the wait variable for every 100L.
*/
while (wait < welcomeScreenDisplay) {
sleep(100);
wait += 100;
}
} catch (Exception e) {
System.out.println("EXc=" + e);
} finally {
/*
* Called after splash times up. Do some action after splash
* times up. Here we moved to another main activity class
*/
startActivity(new Intent(SplashActivity.this,
LoginActivity.class));
finish();
}
}
};
welcomeThread.start();
}
}
【问题讨论】:
-
你能把你的启动活动的代码贴出来
-
我已经在这里发布了启动活动代码
标签: android layout screen splash-screen