需要更高SDK支持: //icon color -> blackactivity.getWindow().getDecorView().getWindowInsetsController().setSystemBarsAppearance(APPEARANCE_LIGHT_STATUS_BARS, APPEARANCE_LIGHT_STATUS_BARS);//icon color -> whiteactivity.getWindow().getDecorView().getWindowInsetsController().setSystemBarsAppearance(0, A...
//状态栏字体改为白色 WindowCompat.getInsetsController(window,window.decorView).isAppearanceLightStatusBars=false //状态栏字体改为黑色 WindowCompat.getInsetsController(window,window.decorView).isAppearanceLightStatusBars=true 导航栏按钮颜色修改: WindowCompat.getInsetsController(window,window.decorView).isAp...
* @deprecated Use {@link WindowInsetsController#APPEARANCE_LIGHT_STATUS_BARS} instead. */ @Deprecated public static final int SYSTEM_UI_FLAG_LIGHT_STATUS_BAR = 0x00002000; 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 注释的意思:可以设置setSystemUiVisibility(int)进行状...
.isAppearanceLightStatusBars=true//设置状态栏文字白色controller?.isAppearanceLightStatusBars=false 控制导航栏: //显示controller?.show(WindowInsetsCompat.Type.navigationBars())//隐藏controller?.hide(WindowInsetsCompat.Type.navigationBars())//导航栏隐藏时手势操作controller?.systemBarsBehavior=WindowInsetsCo...
WindowInsetsControllercontroller=getWindow().getDecorView().getWindowInsetsController();if(controller!=null){controller.setSystemBarsAppearance(WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS,WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS);}
funinStatusBar(){//窗口填充、状态栏透明、动态控制状态栏light模式、动态控制底部导航位置WindowCompat.setDecorFitsSystemWindows(window,false)window.statusBarColor=Color.TRANSPARENTvalcontroller=ViewCompat.getWindowInsetsController(mBinding.root)controller?.isAppearanceLightStatusBars=lightMode ...
setSystemBarsAppearance(0, APPEARANCE_LIGHT_STATUS_BARS) 的android.view.WindowInsetsController.setSystemBarsAppearance(int, int) JAVA 檔。 此頁面的部分是根據 原始碼專案所建立和共用的工作進行修改,並根據中所述的詞彙使用。 適用於 產品版本 Xamarin.Android Xamarin.Android 13, .NET Android API ...
代码如下: if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {//因为不是所有的系...
Build.VERSION_CODES.M) { //如果是6.0以上将状态栏文字改为黑色,并设置状态栏颜色 activity.getWindow().setBackgroundDrawableResource(android.R.color.transparent); activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);...
DayOfWeekTextAppearance Debuggable DefaultFocusHighlightEnabled DefaultHeight DefaultToDeviceProtectedStorage DefaultValue DefaultWidth Delay Dependency DescendantFocusability Description DetachWallpaper DetailColumn DetailsElementBackground DetailSocialSummary Dial DialogCornerRadius DialogIcon DialogLayout DialogMessage Dial...