Chapter 11: Designing Platform User Interface Components

The Android platform provides a large variety of user interface widgets, typography options, icons, and animations. Writing your own components is very seldom necessary. The platform components are flexible and easily customizable by changing parameters.

This chapter introduces the bulk of the default components for building Android user interfaces. User interface layouts are covered in Chapter 13.

Using User interface widgets

User interface widgets form the core of the Android user interface. They are the buttons, text fields, and images that your users interact with. User interface widgets are not to be confused with app widgets, which were covered in Chapter 8.

The following sections give you a brief overview of the user interface widgets that are available out of the box.

9781118387351-ma08.tif Scan the QR code with your Android phone to open the companion app and try out a functional example.

Text widgets

Text widgets are the simplest components on your app’s user interface. You can use the TextView component to show text and the EditText component to display an editable field. Figure 11-1 shows examples of the default Android text components.

9781118387351-fg1101.eps

Figure 11-1: Example text components.

Text View

A TextView component displays texts on-screen. By ...

Get Smashing Android UI now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.