Toolbar overlapping below status bar
Use android:fitsSystemWindows="true"
in the root view of your layout (LinearLayout in your case).
Toolbar overlaps Translucent status bar
add android:fitsSystemWindows="true"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:fitsSystemWindows="true"
tools:context="com.aminiam.moviekade.fragment.AllReviewFragment">
Why toolbar is getting under the android system status bar (please check the screenshot)?
Add below link into your parent xml tag which is CoordinatorLayout
in your case. Toolbar will appear below the status bar.
android:fitsSystemWindows="true"
Flutter toolbar overlapping below status bar
Actually, the appbar is partially under the status bar. It just has an internal padding to handle it correctly
This is very clear when you remove the appbar :
Scaffold(
body: Text("Hello"),
)
In this situation, it will render "Hello" under the status bar.
You can fix this by wrapping your body into a SafeArea
:
Scaffold(
body: SafeArea(
child: Text("Hello"),
),
),
Toolbar overlaps status bar
Try add android:fitsSystemWindows="true"
to android.support.design.widget.AppBarLayout
or @style/AppTheme.PopupOverlay
style
Toolbar overlaps below status bar
I think it's a bug...Then i tried to set the statusBarColor in style.xml,and it worked!
Try this in style.xml v21
<item name="android:statusBarColor">?colorPrimaryDark</item>
Hope it can fix your problem.
Android - Toolbar under status bar in CoordinatorLayout in Fragment
I had the same issue.
Put:
android:fitsSystemWindows="true"
in the root of your Activity's layout(the Activity that contains the fragment), not in the root of the fragment's layout(in your case the CoordinatorLayout
).
Related Topics
How to Keep the Spaces at the End And/Or at the Beginning of a String
Android + Pair Devices via Bluetooth Programmatically
Error: Resource Android:Attr/Fontvariationsettings Not Found
How to Draw a Route, Along an Existing Road, Between Two Points
Set Selected Item in Android Bottomnavigationview
Android Get Screenshot of All Listview Items
Android Studio Compile Error "Content Is Not Allowed in Prolog"
How to Animate View.Setvisibility(Gone)
How to View the Shared Preferences File Using Android Studio
How to Get Color-Int from Color Resource
How to Change Background Color in Android App
Getapplicationcontext(), Getbasecontext(), Getapplication(), Getparent()
Getting the Battery Current Values for the Android Phone
Incompatible Plugins for Android-Apt After Upgrading to Android Studio 2.3
The Import Com.Google.Android.Gms Cannot Be Resolved
How to Store a Boolean Value Using Sharedpreferences in Android