How to check only one RadioButton check by default (Note)

スクリーンショット 2016-12-22 午後5.56.10.png

When adding to RadioGroup in the code

RadioGroup radioGroup = new RadioGroup(this);
    RadioButton radioBtn1 = new RadioButton(this);
    RadioButton radioBtn2 = new RadioButton(this);
    RadioButton radioBtn3 = new RadioButton(this);

    radioBtn1.setText("hoge");
    radioBtn2.setText("huga");
    radioBtn3.setText("piyo");


    radioGroup.addView(radioBtn1);
    radioGroup.addView(radioBtn2);
    radioGroup.addView(radioBtn3);
	
	//Without this one line, the check will not move even if the others are in the checked state
    radioGroup.check(radioBtn1.getId());
 

Recommended Posts

How to check only one RadioButton check by default (Note)
[AWS] How to check logs
How to hide args4j default
[Note] How to write Dockerfile/docker-compose.yml
How to check JSF version
[Rails] How to use devise (Note)
How to write ruby if in one line Summary by beginner
How to create a validator that allows only input to any one field
How to check Java installed on Mac
How to prevent duplicate processing by addEventListener
[Note] How to get started with Rspec
How to use Java Scanner class (Note)
[Note] How to use Rails 6 Devise + cancancan
Ruby: CSV :: How to use Table Note
Note: [Docker] How to start and stop
[Swift] How to use one option alert
How to display today's date and time by default: Remove seconds or less
[Form object] How to make one form usable by both POST and PATCH (PUT)
[Rails] How to decide the destination by "rails routes"
How to check the logs in the Docker container
How to save to multiple tables with one input
How to change Finder's default text editor to Atom
How to output CSV created by Rails to S3
Note how to use Swift super basic TableView
How to install NVIDIA driver on Ubuntu 18.04 (Note)
How to make duplicate check logic more readable
How to use Segmented Control and points to note
How to separate .scss by controller in Rails
Note how to rollback Mysql deployed on Heroku
How to check Rails commands in the terminal
How to utilize knowledge to reduce support work by 10 to 20%
Do you really understand? How to check the library and license used by the app