ceryle / RadioRealButton

A custom radio button for Android API 12+

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Default one radio button checked?

munimisu opened this issue · comments

commented

I am trying to set one radio button checked as default. I used android:checked="true" on radio button, and android:checkedButton="@id/button1" in radiogroup; but none of them work.

Can you please add or describe how to default check a radio button?

Thanks!

Hi munimisu,
You can check a button using (app:rrbg_position="0") in XML and setPosition(0) in Java code. This attribute is one of group's attributes. Also, I am planning to add checked attribute that you mentioned in new versions.

commented

Thanks ceryle! I will try that. Looking forward to new version.