Above action bar, white color is displaying. I want to fix that one. Please check attached image file.
Thanks in Advance Image Here
Above action bar, white color is displaying. I want to fix that one. Please check attached image file.
Thanks in Advance Image Here
Try this:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Window window = getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(Color.parseColor("#39bf96"));
}
However if you want to hide those Action Bar
or Status Bar
, this would help
add this line into your style
resources file.
<style name="AppFullScreenTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
and then make sure you change the theme
in your AndroidManifest
file.
Example
<activity android:name=".MainActivity"
android:label="@string/mainPageName" //Your Activity Name
android:theme="@style/AppTheme.NoActionBar"> //Change HERE
</activity>