Java Code Examples for android.view.View.setOnApplyWindowInsetsListener()

The following are Jave code examples for showing how to use setOnApplyWindowInsetsListener() of the android.view.View class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: superglue   File: DrawerLayoutCompatApi21.java   Source Code and License Vote up 5 votes
public static void configureApplyInsets(View drawerLayout) {
  if (drawerLayout instanceof DrawerLayoutImpl) {
    drawerLayout.setOnApplyWindowInsetsListener(new InsetsListener());
    drawerLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE
        | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
  }
}
 
Example 2
Project: superglue   File: DrawerLayoutCompatApi21.java   Source Code and License Vote up 5 votes
public static void configureApplyInsets(View drawerLayout) {
  if (drawerLayout instanceof DrawerLayoutImpl) {
    drawerLayout.setOnApplyWindowInsetsListener(new InsetsListener());
    drawerLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE
        | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
  }
}
 
Example 3
Project: translucent_layout   File: DrawerLayoutCompatApi21.java   Source Code and License Vote up 5 votes
public static void configureApplyInsets(View drawerLayout) {
    if (drawerLayout instanceof DrawerLayoutImpl) {
      drawerLayout.setOnApplyWindowInsetsListener(new DrawerLayoutCompatApi21.InsetsListener());
//      drawerLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
      drawerLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE
          | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
    }
  }
 
Example 4
Project: boohee_v5.6   File: DrawerLayoutCompatApi21.java   Source Code and License Vote up 4 votes
public static void configureApplyInsets(View drawerLayout) {
    if (drawerLayout instanceof DrawerLayoutImpl) {
        drawerLayout.setOnApplyWindowInsetsListener(new InsetsListener());
        drawerLayout.setSystemUiVisibility(1280);
    }
}
 
Example 5
Project: SetupWizardLibCompat   File: SystemBarHelper.java   Source Code and License Vote up 2 votes
/**
 * Set a view to be resized when the keyboard is shown. This will set the bottom margin of the
 * view to be immediately above the keyboard, and assumes that the view sits immediately above
 * the navigation bar.
 *
 * <p>Note that you must set {@link android.R.attr#windowSoftInputMode} to {@code adjustResize}
 * for this class to work. Otherwise window insets are not dispatched and this method will have
 * no effect.
 *
 * <p>This will only take effect in versions Lollipop or above. Otherwise this is a no-op.
 *
 * @param view The view to be resized when the keyboard is shown.
 */
public static void setImeInsetView(final View view) {
    if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) {
        view.setOnApplyWindowInsetsListener(new WindowInsetsListener());
    }
}