Use a different drawable for menu item based on sdk level?
<p>I'd like a menu item to use a different drawable depending on api level:</p>

<pre><code>// my_menu.xml
&lt;menu&gt;
  &lt;item android:icon="@style/foo"/&gt;
&lt;/menu&gt;

// values/styles.xml
&lt;drawable name="foo"&gt;@drawable/apple&lt;/drawable&gt;

// values-v11/styles.xml
&lt;drawable name="foo"&gt;@drawable/orange&lt;/drawable&gt;
</code></pre>

<p>Doesn't seem to work though - is there a way to do that?</p>

<p>Thank you</p>

<p>------------- Update ------------------</p>

<p>Ok after some more reading, this is how I did it:</p>

<pre><code>// my_menu.xml
&lt;menu&gt;
  &lt;item style="@style/foo"/&gt;
&lt;/menu&gt;

// values/styles.xml
&lt;style name="foo"&gt;
    &lt;item name="android:icon"&gt;@drawable/apple&lt;/item&gt;
&lt;/style&gt;

// values-v11/styles.xml
&lt;style name="foo"&gt;
    &lt;item name="android:icon"&gt;@drawable/orange&lt;/item&gt;
&lt;/style&gt;
</code></pre>

<p>I think this is what lxx is suggesting.</p>
