I want to change the background image of a button when clicked or focused.
This is my code:
Button tiny = (Button)findViewById(R.id.tiny);
tiny.setOn
You can also create shapes directly inside the item
tag, in case you want to add some more details to your view, like this:
-
-
-
Beware that Android will cycle through the items from top to bottom, therefore, you must place the item
without condition on the bottom of the list (so it acts like a default/fallback).