Making Custom RadioButton with image on center

前端 未结 1 1191
灰色年华
灰色年华 2021-01-23 09:39

I\'m trying to my custom RadioButton that I trying to make to look like this:

So I did custom drawables that respond to the RadioButton status and used it as ba

相关标签:
1条回答
  • 2021-01-23 10:00

    My solution was to set android:button=@null, then set the image that I want into the android:drawableLeft attribute. So my RadioButton code is like this:

    <RadioButton
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:padding="8dp"
                android:background="@drawable/presenter_radiobutton_left"
                android:button="@null"
                android:drawableLeft="@drawable/fire"
                />
    
    0 讨论(0)
提交回复
热议问题