Wednesday, June 26, 2013

How to put an Image at the end of RadioButton - Android?


use the following code to add an image to top,right, left, bottom of a RadioButton (or any Button)


setCompoundDrawablesWithIntrinsicBounds(null, null, getResources().getDrawable(R.drawable.tick), null);

someRadioButton.setCompoundDrawablesWithIntrinsicBounds(nullnull, getResources().getDrawable(R.drawable.tick), null);
If you pass null as a paramater for anything that are not needed.

No comments:

Post a Comment