title: android:popupBackground not working for context menus
body: <p>Why does my <code>styles.xml</code> code successfully change the background colour of my actionbar overflow menu, but fail to change the background colour of the context menu in my app?</p>
  
  <pre><code>&lt;style name="AppBaseTheme" parent="Theme.AppCompat.Light"&gt;
      &lt;!--&lt;item name="android:actionBarStyle"&gt;@style/DarkActionBar&lt;/item&gt; --&gt;
  
  &lt;/style&gt;
  
  &lt;!-- Application theme. --&gt;
  &lt;style name="AppTheme" parent="AppBaseTheme"&gt;
  
      &lt;!-- All customizations that are NOT specific to a particular API-level can go here. --&gt;
      &lt;item name="android:popupMenuStyle"&gt;@style/MyPopupMenu&lt;/item&gt;
      &lt;item name="android:itemTextAppearance"&gt;@style/MyCustomMenuTextAppearance&lt;/item&gt;
  
  &lt;/style&gt;
  
  &lt;!-- Popup Menu Background Color styles --&gt;
  &lt;!-- &lt;style name="MyPopupMenu"  parent="@android:style/Widget.Holo.ListPopupWindow"&gt; --&gt;
  &lt;!-- &lt;style name="MyPopupMenu"  parent="@android:style/Widget.PopupMenu"&gt; --&gt;
  &lt;style name="MyPopupMenu"  parent="@style/Widget.AppCompat.PopupMenu"&gt;
      &lt;item name="android:popupBackground"&gt;@color/dark_gray&lt;/item&gt; 
  &lt;/style&gt;
  &lt;!-- Popup Menu Text Color styles --&gt;
  &lt;style name="MyCustomMenuTextAppearance"&gt;
      &lt;item name="android:textColor"&gt;@color/white&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>I've been stuck on this for a couple of hours and none of the solutions on SO for similar questions have worked for me.</p>
  
  <p>If it helps, here is my Java code where the context menu is created:</p>
  
  <pre><code>@Override
  public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
      super.onCreateContextMenu(menu, v, menuInfo);
  
      AdapterView.AdapterContextMenuInfo info =
              (AdapterView.AdapterContextMenuInfo) menuInfo;
      String selectedWord = ((TextView) info.targetView).getText().toString();
      menu.setHeaderTitle(selectedWord);
  
      MenuInflater inflater = getActivity().getMenuInflater();
      inflater.inflate(R.menu.shopping_list_name_context, menu);
  }
  </code></pre>
  
  <p>And, for completeness, here is my context menu xml, <code>shopping_list_name_context.xml</code>:</p>
  
  <p>
  </p>
  
  <pre><code>&lt;item android:id="@+id/rename_shopping_list"
        android:icon="@drawable/ic_action_edit"
        android:title="@string/rename_shopping_list" /&gt;
  
  &lt;item android:id="@+id/empty_shopping_list"
        android:icon="@drawable/ic_action_discard"
        android:title="@string/empty_shopping_list" /&gt;
  
  &lt;item android:id="@+id/delete_shopping_list"
        android:icon="@drawable/ic_action_discard"
        android:title="@string/delete_shopping_list" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>And, as requested, here is an excerpt of my <code>AndroidManifest.xml</code>:</p>
  
  <p>
  </p>
  
  <pre><code>&lt;uses-sdk
      android:minSdkVersion="14"
      android:targetSdkVersion="21" /&gt;
  
  &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;    
  &lt;uses-permission android:name="android.permission.GET_ACCOUNTS" /&gt;
  &lt;uses-permission android:name="android.permission.USE_CREDENTIALS" /&gt;
  &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
  &lt;uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /&gt;
  
  &lt;supports-screens       
      android:smallScreens="true" 
      android:normalScreens="true" 
      android:largeScreens="true" 
      android:xlargeScreens="true" /&gt;
  
  &lt;permission
      android:name="com.example.myapp.permission.C2D_MESSAGE"
      android:protectionLevel="signature" /&gt;
  
  &lt;uses-permission android:name="com.example.myapp.permission.C2D_MESSAGE" /&gt;
  &lt;uses-permission android:name="com.android.vending.BILLING" /&gt;
  
  &lt;application
      android:name=".MyApplication"
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name_short"
      android:theme="@style/AppTheme"
      android:largeHeap="true" &gt;
  </code></pre>