<stylename="Theme.DrawableBestConfig.NoActionBar">
<itemname="windowActionBar">false</item>
<itemname="windowNoTitle">true</item>
<itemname="drawerArrowStyle">@style/DrawerArrowStyle</item>
<itemname="android:fitsSystemWindows">false</item>
<itemname="android:navigationBarColor">#F9F9F9</item>
</style>
<stylename="DrawerArrowStyle"parent="Widget.AppCompat.DrawerArrowToggle">
<itemname="spinBars">true</item>
<itemname="color">@color/purple_500</item>
<itemname="android:windowDrawsSystemBarBackgrounds">true</item>
</style>
<stylename="Theme.DrawableBestConfig.AppBarOverlay"parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<stylename="Theme.DrawableBestConfig.PopupOverlay"parent="ThemeOverlay.AppCompat.Light" />
publicclassDashboardActivityextendsAppCompatActivity {
privateAppBarConfigurationmAppBarConfiguration;
ActivityDashboardBindingbinding;
@OverrideprotectedvoidonCreate(BundlesavedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityDashboardBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
getWindow().setStatusBarColor(getResources().getColor(R.color.white));
}
intdecore = 0;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
//enable this tho maker icon Navigation bar become blackdecore = View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
//enable this tho maker icon status bar become blackdecore += View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
}
getWindow().getDecorView().setSystemUiVisibility(decore);
}
}<?xml version="1.0" encoding="utf-8"?>
<manifest >
<application >
<activityandroid:name=".DashboardActivity"android:label="@string/title_activity_dashboard"android:theme="@style/Theme.DrawableBestConfig.NoActionBar">
<intent-filter>
<actionandroid:name="android.intent.action.MAIN" />
<categoryandroid:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Copyright 2021 M. Fadli Zein