//设置无标题
requestWindowFeature(Window.FEATURE_NO_TITLE);
//设置全屏
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
//加上下面这句话,就隐藏了状态栏 去掉就显示 peter.wen
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
//为系统设置壁纸
WallpaperManager wallpaperManager = WallpaperManager.getInstance(mContext);
try {
wallpaperManager.setResource(R.drawable.background);
Log.d(TAG, "--------set wallpaper");
} catch (Exception e2) {
// TODO: handle exception
}
要加权限 <uses-permission android:name="android.permission.SET_WALLPAPER"/>