2

I need custom RadioButton and in my XML:

        <RadioButton
            android:id="@+id/radBorderBottom"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_marginLeft="8dp"
            android:layout_marginRight="8dp"
            android:layout_weight="1"
            android:background="@drawable/toggle_center_selector"
            android:button="@drawable/ic_border_bottom"   //not see
            android:checked="true"
            android:gravity="center"
            android:onClick="onSeletedPosition" />

I only see background and not see button here. P/s: This issue occurs when I apply newest Aviary SDK. But In Activity but contain this XML I do not change.

Ash Ryan Arnwine
  • 1,471
  • 1
  • 11
  • 27

4 Answers4

1

Create one button.xml file in your drawable folder.

<?xml version="1.0" encoding="utf-8"?>

<item android:drawable="@drawable/apptheme_btn_radio_off_t_holo_light" android:state_checked="false"/>
<item android:drawable="@drawable/apptheme_btn_radio_on_t_holo_light" android:state_checked="true"/>
<item android:drawable="@drawable/apptheme_btn_radio_off_t_holo_light"/>

and finally set android:button="@drawable/button

I hope it helps you..

Ronak Selarka
  • 663
  • 1
  • 5
  • 13
0

Place your code inside RadioGroup

<RadioGroup> <RadioButton /> </RadioGroup>

  • yes, that same my code. And when I change on code every thing look good. I don't understand why Aviary make this bug. –  Apr 06 '16 at 09:08
0

try to this code

<RadioButton
            android:id="@+id/radBorderBottom"
            android:layout_width="wrap_content"
            android:layout_height="5dp"
            android:layout_marginLeft="8dp"
            android:layout_marginRight="8dp"
            android:layout_weight="1"
            android:background="@drawable/ic_launcher"
            android:button="@android:color/transparent"
            android:checked="true"
            android:gravity="center"
            android:onClick="onSeletedPosition" />
Patel Vicky
  • 766
  • 8
  • 17
  • sorry I need change button in xml, And when I change on code every thing look good. I don't understand why Aviary make this bug. –  Apr 06 '16 at 09:07
-1

Try upgrading to the latest version of the Creative SDK Image Editor (formerly Aviary).

In older versions of the SDK, some layout elements weren't properly namespaced and could cause problems like this.

Where to start

  1. You can find out how to get the latest version of the SDK here.
  2. You can find out how to integrate the latest version of the Image Editor here.
Ash Ryan Arnwine
  • 1,471
  • 1
  • 11
  • 27