title: Override height of a single MenuItem in a NavigationView
body: <p>I'd like to increase the height of a <strong>single</strong> <code>MenuItem</code> inside a <code>NavigationView</code>. </p>
  
  <p>I am trying to put a Google <code>MapFragment</code> inside the item's <a href="https://developer.android.com/guide/topics/resources/menu-resource" rel="nofollow noreferrer"><code>actionLayout</code></a>, as shown below, but I want the height of the map to be larger.</p>
  
  <p>Any ideas?</p>
  
  <h3>Note:</h3>
  
  <ul>
  <li>I want to utilise the standard menu layout of the NavigationView (I'd prefer not to have to implement a whole custom menu layout as using <a href="https://stackoverflow.com/a/31716815/1513557">this answer</a>).</li>
  <li>I don't want to change the height of <strong>all</strong> items like <a href="https://stackoverflow.com/a/44644656/1513557">this answer</a>, only the map item.</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/TiuZN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TiuZN.png" alt="Screenshot showing map inside NavigationView MenuItem"></a></p>
  
  <h3><code>activity_main_drawer.xml</code></h3>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;menu xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      tools:showIn="navigation_view"&gt;
  
      ...
  
      &lt;item
          android:id="@+id/nav_map"
          app:showAsAction="always"
          android:title="@string/nav_map"
          app:actionLayout="@layout/fragment_map" /&gt;
  
      ...
  
  &lt;/menu&gt;
  </code></pre>
  
  <h3><code>fragment_map.xml</code></h3>
  
  <p>Adjusting <code>android:layout_height</code> here has no effect.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;fragment
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:map="http://schemas.android.com/apk/res-auto"
      android:name="com.google.android.gms.maps.SupportMapFragment"
      android:id="@+id/nav_map_fragment"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      map:mapType="normal"
      map:liteMode="true"/&gt;
  </code></pre>
  
  <h3>In <code>Activity.onCreate(...)</code> in <code>MainActivity.kt</code></h3>
  
  <p>Setting the height on the action view has no effect here.</p>
  
  <pre><code>val mapItem = nav.menu.findItem(R.id.nav_map)
  
  // Has no effect: trying to set height to 128dp
  mapItem.actionView.layoutParams = ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 128)
  
  // Hack: hide title
  mapItem.title = null
  
  val mapView = supportFragmentManager.findFragmentById(R.id.nav_map_fragment) as SupportMapFragment
  mapView.getMapAsync { map -&gt;
      ...
  }
  </code></pre>