Search code examples
androidimageviewandroid-imageviewandroid-radiogroupandroid-radiobutton

Android. ImageView as RadioButton


I want some ImageViews to work as RadioButtons. But I don't want the mini-button of a RadioButton to select it; I want this mini-button to disappear, and the ImageView to be the entire button. Thus, a solution like the following one is not good.

<RadioButton
    android:id="@+id/myId"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:drawableRight="@drawable/myIcon"/>

Is there a widget or something which I can use to use ImageViews as RadioButtons, or should I program myself all the logic of the buttons?


Solution

  • I will suggest to create your custom radio button. check this answer of Evan Bashir