Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

Status bar overlapping Toolbar with FormsAppCompatActivity

$
0
0

I updated my app to Forms 1.5.1 and I'm switching over to using AppCompat for material design, but I'm having a problem with the toolbar. Once I get to my main page after signing it, the toolbar is overlapped by the status bar. This is a TabbedPage wrapped in a NavigationPage. After a rotation, the toolbar is drawn correctly, completely below the status bar. Screenshot is attached.

Note: this only seems to happen on Lollipop devices, older devices actually using the support library draw the toolbar correctly the first time.

toolbar.axml

<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/toolbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="?attr/colorPrimary"
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
    android:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

styles.xml

<resources>
  <style name="AppTheme" parent="Theme.AppCompat">
    <!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
    <item name="windowNoTitle">true</item>

    <item name="android:colorAccent">@color/accentColor</item>
    <item name="android:colorActivatedHighlight">@color/accentColor</item>
    <item name="colorAccent">@color/accentColor</item>
  </style>
</resources>

Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>