window.setStatusBarColor(Color.TRANSPARENT); window.setNavigationBarColor(Color.TRANSPARENT); } 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 类型三、有的需要沉浸式的状态栏颜色可能是很浅的颜色(在此非常鄙视那种在Android上设计标题栏为灰不辣鸡的那种很浅的颜色的设计师,因为在IOS中可以随意设置状态...
this.Window.DecorView.SystemUiVisibility; vis = (StatusBarVisibility)(SystemUiFlags.LayoutStable | SystemUiFlags.LayoutHideNavigation | SystemUiFlags.LayoutFullscreen ); decorView.SystemUiVisibility = vis; Window.SetNavigationBarColor(Color.Transparent); Window.SetStatusBarColor(Color.Transparent); } ...
mToolbar.setTitleTextColor(Color.argb(255, 255, 255, 255)); // ToolBar右侧隐藏按钮 overflowIcon = mToolbar.getOverflowIcon(); setSupportActionBar(mToolbar); ActionBar ab = getSupportActionBar(); // 返回键按钮 backIcon = ContextCompat.getDrawable(mContext, R.drawable.icon_back); ab.set...
window.setStatusBarColor(activity.getResources().getColor(colorId)); }elseif(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {//使用SystemBarTint库使4.4版本状态栏变色,需要先将状态栏设置为透明setTranslucentStatus(activity);//设置状态栏颜色SystemBarTintManagertintManager=newSystemBarTintManager(...
selected —— colorAccent CheckBox box unchecked —— colorControlNormal box checked —— colorAccent Toolbar background —— 布局文件中设置android:background="?attr/colorPrimary overflow icon —— android:textColorPrimary navigation icon —— android:textColorPrimary ...
android:colorPrimaryDark 应用的主要暗色调,statusBarColor默认使用该颜色 android:statusBarColor 状态栏颜色,默认使用colorPrimaryDark android:colorPrimary 应用的主要色调,actionBar默认使用该颜色 android:windowBackground 窗口背景颜色 android:navigationBarColor 底部栏颜色 ...
protected boolean useThemestatusBarColor = false;//是否使用特殊的标题栏背景颜色,android5.0以上可以设置状态栏背景色,如果不使用则使用透明色值 protected boolean useStatusBarColor = true;//是否使用状态栏文字和图标为暗色,如果状态栏采用了白色系,则需要使状态栏和图标为暗色,android6.0以上可以设置protected void...
Toolbar background —— 布局文件中设置android:background="?attr/colorPrimary overflow icon —— android:textColorPrimary navigation icon —— android:textColorPrimary action icons —— android:textColorPrimary overflow menu background —— android:colorBackground overflow text color —— android:textCo...
protected boolean useStatusBarColor = true;//是否使用状态栏文字和图标为暗色,如果状态栏采用了白色系,则需要使状态栏和图标为暗色,android6.0以上可以设置 protected void setStatusBar() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {//5.0及以上 ...
<color name="color_icon_setting">#67686C</color> <color name="white">#FFFFFFFF</color> <color name="bg_main">#f7f7f7</color> <color name="colorAccent">#3559FA</color> <color name="color_text_default">#22252e</color> <color name="color_text_default_p">#A6000000</color> ...