Chapter 4. Designing Your User Interface Using Views
WHAT YOU WILL LEARN IN THIS CHAPTER
How to use the basic views in Android to design your user interface
How to use the picker views to display lists of items
How to use the list views to display lists of items
In the previous chapter, you learned about the various layouts that you can use to position your views in an activity. You also learned about the techniques you can use to adapt to different screen resolutions and sizes. In this chapter, you will take a look at the various views that you can use to design the user interface for your applications.
In particular, you will learn about the following view groups:
Basic views — Commonly used views such as the
TextView
,EditText
, andButton
viewsPicker views — Views that enable users to select from a list, such as the
TimePicker
andDatePicker
viewsList views — Views that display a long list of items, such as the
ListView
and theSpinnerView
views
Subsequent chapters will cover the other views not covered in this chapter, such as the date and time picker views and other views for displaying graphics, etc.
BASIC VIEWS
To get started, let's explore some of the basic views that you can use to design the UI of your Android applications:
TextView
EditText
Button
ImageButton
CheckBox
ToggleButton
RadioButton
RadioGroup
These basic views enable you to display text information, as well as perform some basic selection. The following sections explore all these views in more detail.
TextView View
When you create ...
Get Beginning Android™ Application Development 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.