1.程序打开时显示图片,在做跳转
new Timer().schedule(new TimerTask() {
@Override
public void run() {
startActivity(new Intent("当前类名".this, "需要启动的类名".class));
finish();
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
}
}, "时间,单位毫秒");
2.隐藏状态栏
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
3.隐藏标题栏
requestWindowFeature(Window.FEATURE_NO_TITLE);
或者
getSupportActionBar().hide();
4.报错Execution failed for task ‘:app:compileDebugJavaWithJavac’
在项目gradle目录下cmd 输入gradlew compileDebugJavaWithJavac