title: Difficult to style Toolbar action mode correctly for AppCompat in Android 4
body: <p>In my Android 5, by using the following theme</p>
  
  <h2>themes.xml</h2>
  
  <pre><code>&lt;style name="Theme.MyApp.Light.DarkActionBar" parent="Theme.AppCompat.Light.NoActionBar"&gt;
  </code></pre>
  
  <p>and the following toolbar</p>
  
  <h2>toolbar.xml</h2>
  
  <pre><code>&lt;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_height="wrap_content"
      android:layout_width="match_parent"
      android:minHeight="?attr/actionBarSize"
      android:background="@color/background_material_dark"
      android:elevation="4dp"
      app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
      app:popupTheme="@style/ThemeOverlay.AppCompat.Light" &gt;
  
  &lt;/android.support.v7.widget.Toolbar&gt;
  </code></pre>
  
  <p>This is what I'm getting, when my <code>ListViewFragment</code> goes into action mode via</p>
  
  <pre><code>this.getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE_MODAL);
  this.getListView().setMultiChoiceModeListener(new ModeCallback());
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/imwws.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/imwws.png" alt="enter image description here"></a></p>
  
  <p>I want to have exact look and feel for my Android 4.</p>
  
  <p>If we didn't do anything in Android 4, toolbar in action mode will look very wrong.</p>
  
  <p><a href="https://i.stack.imgur.com/VqMUi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VqMUi.png" alt="enter image description here"></a></p>
  
  <p>It seems like bug in Android support library : <a href="https://code.google.com/p/android/issues/detail?id=143419&amp;thanks=143419&amp;ts=1423493133" rel="nofollow noreferrer">https://code.google.com/p/android/issues/detail?id=143419&amp;thanks=143419&amp;ts=1423493133</a></p>
  
  <p>I had referred to <a href="https://stackoverflow.com/questions/26992936/styling-actionmode-actionbar-in-android-5-0-lollipop-with-appcompat">Styling ActionMode ActionBar in Android 5.0 Lollipop (with AppCompat)</a></p>
  
  <pre><code>&lt;style name="Theme.MyApp.Light.DarkActionBar" parent="Theme.AppCompat.Light.NoActionBar"&gt;
  
      &lt;item name="actionModeBackground"&gt;@color/background_material_dark&lt;/item&gt;
      &lt;item name="actionBarPopupTheme"&gt;@style/ThemeOverlay.AppCompat.Light&lt;/item&gt;
  </code></pre>
  
  <p>This is what I get.</p>
  
  <p><a href="https://i.stack.imgur.com/4OVys.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4OVys.png" alt="enter image description here"></a></p>
  
  <ol>
  <li>Text color isn't right</li>
  <li>There is no green separator.</li>
  <li>Back icon color isn't right.</li>
  </ol>
  
  <p>I further follow <a href="https://stackoverflow.com/questions/28374774/unable-to-style-action-mode-when-using-toolbar">Unable to style action mode when using Toolbar</a></p>
  
  <pre><code>&lt;style name="Widget.ActionMode" parent="@style/Widget.AppCompat.ActionMode"&gt;
      &lt;item name="background"&gt;@color/background_material_dark&lt;/item&gt;
      &lt;item name="backgroundSplit"&gt;@color/accent_material_light&lt;/item&gt;
      &lt;item name="titleTextStyle"&gt;@style/TextAppearance.AppCompat.Widget.ActionMode.Title.Inverse&lt;/item&gt;
      &lt;item name="subtitleTextStyle"&gt;@style/TextAppearance.AppCompat.Widget.ActionMode.Subtitle.Inverse&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="Theme.MyApp.Light.DarkActionBar" parent="Theme.AppCompat.Light.NoActionBar"&gt;
      &lt;item name="actionModeStyle"&gt;@style/Widget.ActionMode&lt;/item&gt;
      &lt;item name="actionModeCloseDrawable"&gt;@drawable/ic_arrow_back_white_24dp&lt;/item&gt;
  </code></pre>
  
  <p>It is getting better (Correct color for back icon)</p>
  
  <p>However, I'm still facing problem.</p>
  
  <ol>
  <li>Text color isn't right</li>
  <li>There is no green separator.</li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/MwAr8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MwAr8.png" alt="enter image description here"></a></p>
  
  <p>I was wondering, what is the correct approach to get correct look n feel as in Android 5's ?</p>