O'Reilly logo

Android UI Design by Jessica Thornsby

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Registering the user input

Input controls are your UI's interactive components, such as buttons, EditText fields, and checkboxes.

We've already seen how you can drop input controls into your UI, but input controls don't register user input out of the box.

To turn UI components, such as buttons and EditText fields, into fully-functioning interactive components, you'll need to write some extra code.

Handling click events

Click events are one of the most common input events your UI will have to handle. A click event is simply where the user touches an onscreen element, such as tapping a button or a checkbox.

A button cannot process clicks on its own; you'll need to create a listener and then assign it to the button. When the user taps the button, the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required