应用引导页面相关,虽然最后使用Activity 透明全屏方式(见另一篇),但此处还是做一记录,备忘。
import android.view.WindowManager;
private WindowManager mWindowManager = null;
private WindowManager.LayoutParams mWindowManagerParamsForGuideView = null;
mWindowManager = (WindowManager) getApplicationContext().getSystemService(Context.WINDOW_SERVICE);
mWindowManagerParamsForGuideView = new WindowManager.LayoutParams();
mWindowManagerParamsForGuideView.type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
mWindowManagerParamsForGuideView.flags |= WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
mWindowManagerParamsForGuideView.width = WindowManager.LayoutParams.MATCH_PARENT;
mWindowManagerParamsForGuideView.height = WindowManager.LayoutParams.MATCH_PARENT;
mWindowManagerParamsForGuideView.format = PixelFormat.RGBA_8888;
mGuideView = (LinearLayout) LayoutInflater.from(this).inflate(R.layout.secret_guide_view, null);
mWindowManager.addView(mGuideView, mWindowManagerParamsForGuideView);
mWindowManager.removeView(mGuideView);
138




被折叠的 条评论
为什么被折叠?



