You are on page 1of 1

All of this code depends on being able to find the ids of the various

controls in the interface.


We instantiate a new Button object named button by finding the button
control using its id
(button1). Then we create a new onClickListener that contains the
onClick method to bind to
the button. Inside the listener, we create a RelativeLayout object
(called layout) and a
RadioGroup object (called choice). In each case, we find these controls
by using their id's. This
pattern is a recurring one in Android development.

You might also like