Change the height of the Xamarin Forms NavigationPage navigation toolbar

I am trying to change the height of the Xamarin Forms toolbar that is displayed on Android using AppCompat. There is no height property from Forms to set this, so I tried setting layout_heightin the toolbar.axmlfollowing

<android.support.v7.widget.Toolbar 
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/toolbar"
    android:layout_width="match_parent"
    android:layout_height="128dp"
    android:minHeight="?attr/actionBarSize"
    android:background="?attr/colorPrimary"
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
    app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
    app:layout_scrollFlags="scroll|enterAlways" />

This does not change the height.

I also tried to install

  • android: minHeight
  • Android: height
  • Height
  • Android: actionBarSize

but they also do not change the height.

FWIW, when using Xamarin Forms non-AppCompat NavigationPage with ActionBar, I was able to set the height with android:height.

+4
source share
1 answer

, .

Xamarin Forms: Android?

  • <item name="android:actionBarSize">250dp</item> styles.xml
  • android:layout_height="wrap_content" Toolbar.axml.

, .

,

+2

All Articles