I have a bookmark icon in a menu item. I want to change the drawable in the icon depending on whether the bookmark has been pressed before or not.
I have two drawbles, staro (meaning star orange) or starw(meaning star white). I just want to toggle this on press.
How can I know which drawble is in the icon in public boolean onOptionsItemSelected(MenuItem item)
method. Is it possible to know the drawable via the item. what I know is that item.getIcon() is not the drawble. I cannot compare item.getIcon()
with R.drawable.starto