本文整理匯總了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);
}
}
示例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);
}
}
示例3: configureApplyInsets
import android.view.View; //導入方法依賴的package包/類
public static void configureApplyInsets(View drawerLayout) {
if (drawerLayout instanceof DrawerLayoutImpl) {
drawerLayout.setOnApplyWindowInsetsListener(new InsetsListener());
drawerLayout.setSystemUiVisibility(1280);
}
}
示例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());
}
}