Menu is defined like this:
<item
android:id="@+id/nav_slideshow"
android:icon="@drawable/ic_menu_slideshow"
android:title="@string/menu_slideshow"
app:actionViewClass="android.widget.CheckBox"/>
I need to know android:icon
value as provided in xml. There is a method getIcon()
but it returns Drawabe
object. How to get resource id as int
?
[edit] Not a duplicate, solution proposed as possible answer is unrelated.