List of usage examples for android.view Window getWindowManager
public WindowManager getWindowManager()
From source file:android.support.v17.leanback.app.BackgroundManager.java
private void attachBehindWindow(Window window) { if (DEBUG)// www . j a v a 2 s . c om Log.v(TAG, "attachBehindWindow " + window); mWindow = window; mWindowManager = window.getWindowManager(); WindowManager.LayoutParams params = new WindowManager.LayoutParams( // Media window sits behind the main application window WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA, // Avoid default to software format RGBA WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED, android.graphics.PixelFormat.TRANSLUCENT); params.setTitle(WINDOW_NAME); params.width = ViewGroup.LayoutParams.MATCH_PARENT; params.height = ViewGroup.LayoutParams.MATCH_PARENT; View backgroundView = LayoutInflater.from(mContext).inflate(R.layout.lb_background_window, null); mWindowManager.addView(backgroundView, params); attachToView(backgroundView); }