1.主菜单进入某应用闪屏:
常见是一个空的activity作为launcher属性,实际上它什么事业没干,真正干事情的是从它通过intent启动的activity.
例子:
public class BootActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
/* if (SDCardUtils.getExternalStoragePath(this) == null) {
Toast.makeText(this, R.string.nosdcard_notice, Toast.LENGTH_SHORT).show();
BootActivity.this.finish();
}*/
Intent intent = new Intent(this, MainActivity.class);
this.startActivity(intent);
this.finish();
}
}
修改方法:把MainActivity的属性设置为lancher,去掉这个无用的activity.