example:
Button imageButton = (Button)findViewById(R.id.imagebutton);
imageButton.setCompoundDrawablesWithIntrinsicBounds(
0, //left
0, //top
R.drawable.icon, //right
0); //bottom
Related post:
- Display a icon/image on button, using XML.
Button imageButton = (Button)findViewById(R.id.imagebutton);
imageButton.setCompoundDrawablesWithIntrinsicBounds(
0, //left
0, //top
R.drawable.icon, //right
0); //bottom
0 Response to "Display a icon/image on button using Java code"
Posting Komentar