Home | History | Annotate | Download | only in util

Lines Matching refs:window

31 import android.view.Window;
37 * systemUiVisibility flags to the given Window or View to make them follow the Setup Wizard style.
41 * #hideSystemBars(android.view.Window)} will completely hide the system navigation bar and change
76 public static void addVisibilityFlag(final Window window, final int flag) {
77 WindowManager.LayoutParams attrs = window.getAttributes();
79 window.setAttributes(attrs);
92 * Convenience method to remove a visibility flag from the window, leaving other flags that are
95 public static void removeVisibilityFlag(final Window window, final int flag) {
96 WindowManager.LayoutParams attrs = window.getAttributes();
98 window.setAttributes(attrs);
102 * Add the specified immersive flags to the decor view of the window, because {@link
104 * the window.
106 public static void addImmersiveFlagsToDecorView(final Window window, final int vis) {
108 window,
117 public static void removeImmersiveFlagsFromDecorView(final Window window, final int vis) {
119 window,
139 final Window window = dialog.getWindow();
140 temporarilyDisableDialogFocus(window);
141 SystemBarHelper.addVisibilityFlag(window, SystemBarHelper.DIALOG_IMMERSIVE_FLAGS);
142 SystemBarHelper.addImmersiveFlagsToDecorView(window, SystemBarHelper.DIALOG_IMMERSIVE_FLAGS);
146 window.setNavigationBarColor(0);
147 window.setStatusBarColor(0);
164 public static void hideSystemBars(final Window window) {
166 SystemBarHelper.addVisibilityFlag(window, SystemBarHelper.DEFAULT_IMMERSIVE_FLAGS);
167 SystemBarHelper.addImmersiveFlagsToDecorView(window, SystemBarHelper.DEFAULT_IMMERSIVE_FLAGS);
171 window.setNavigationBarColor(0);
172 window.setStatusBarColor(0);
185 public static void showSystemBars(final Window window, final Context context) {
187 SystemBarHelper.removeVisibilityFlag(window, SystemBarHelper.DEFAULT_IMMERSIVE_FLAGS);
189 window, SystemBarHelper.DEFAULT_IMMERSIVE_FLAGS);
198 window.setStatusBarColor(statusBarColor);
199 window.setNavigationBarColor(navigationBarColor);
216 public static void setBackButtonVisible(final Window window, final boolean visible) {
218 SystemBarHelper.removeVisibilityFlag(window, STATUS_BAR_DISABLE_BACK);
219 SystemBarHelper.removeImmersiveFlagsFromDecorView(window, STATUS_BAR_DISABLE_BACK);
221 SystemBarHelper.addVisibilityFlag(window, STATUS_BAR_DISABLE_BACK);
222 SystemBarHelper.addImmersiveFlagsToDecorView(window, STATUS_BAR_DISABLE_BACK);
232 * for this class to work. Otherwise window insets are not dispatched and this method will have no
246 * Apply a hack to temporarily set the window to not focusable, so that the navigation bar will
249 private static void temporarilyDisableDialogFocus(final Window window) {
250 window.setFlags(
256 window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_IS_FORWARD_NAVIGATION);
262 window.clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE);
306 private static void getDecorView(Window window, OnDecorViewInstalledListener callback) {
307 new DecorViewFinder().getDecorView(window, callback, PEEK_DECOR_VIEW_RETRIES);
313 private Window window;
321 // Use peekDecorView instead of getDecorView so that clients can still set window
323 final View decorView = window.peekDecorView();
332 Log.w(TAG, "Cannot get decor view of window: " + window);
338 public void getDecorView(Window window, OnDecorViewInstalledListener callback, int retries) {
339 this.window = window;