當前位置: 首頁>>代碼示例>>Java>>正文


Java View.setOnApplyWindowInsetsListener方法代碼示例

本文整理匯總了Java中android.view.View.setOnApplyWindowInsetsListener方法的典型用法代碼示例。如果您正苦於以下問題:Java View.setOnApplyWindowInsetsListener方法的具體用法?Java View.setOnApplyWindowInsetsListener怎麽用?Java View.setOnApplyWindowInsetsListener使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.view.View的用法示例。


在下文中一共展示了View.setOnApplyWindowInsetsListener方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: configureApplyInsets

import android.view.View; //導入方法依賴的package包/類
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);
  }
}
 
開發者ID:rogues-dev,項目名稱:superglue,代碼行數:8,代碼來源:DrawerLayoutCompatApi21.java

示例2: configureApplyInsets

import android.view.View; //導入方法依賴的package包/類
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);
    }
  }
 
開發者ID:VerstSiu,項目名稱:translucent_layout,代碼行數:9,代碼來源:DrawerLayoutCompatApi21.java

示例3: configureApplyInsets

import android.view.View; //導入方法依賴的package包/類
public static void configureApplyInsets(View drawerLayout) {
    if (drawerLayout instanceof DrawerLayoutImpl) {
        drawerLayout.setOnApplyWindowInsetsListener(new InsetsListener());
        drawerLayout.setSystemUiVisibility(1280);
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:7,代碼來源:DrawerLayoutCompatApi21.java

示例4: setImeInsetView

import android.view.View; //導入方法依賴的package包/類
/**
 * 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());
    }
}
 
開發者ID:Trumeet,項目名稱:SetupWizardLibCompat,代碼行數:19,代碼來源:SystemBarHelper.java


注:本文中的android.view.View.setOnApplyWindowInsetsListener方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。