Is it possible to change the Image of a MenuItem when pressed and can
that be done by a selector
Yep, absolutely. Here's an example:
Add a selector to your drawable
folder.
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Pressed state -->
<item android:drawable="@drawable/ic_action_your_pressed_icon" android:state_pressed="true"/>
<!-- Default state -->
<item android:drawable="@drawable/ic_action_your_default_icon"/>
</selector>
Apply the selector to your MenuItem
using the icon
attribute:
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:icon="@drawable/your_menu_item_selector" ... />
</menu>