O'Reilly logo

Beginning Android™ 4 Application Development by Wei-Meng Lee

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

Chapter 4

Designing Your User Interface With 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
  • How to use specialized fragments

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 ViewGroups:

  • Basic views — Commonly used views such as the TextView, EditText, and Button views
  • Picker views — Views that enable users to select from a list, such as the TimePicker and DatePicker views
  • List views — Views that display a long list of items, such as the ListView and the SpinnerView views
  • Specialized fragments — Special fragments that perform specific functions

Subsequent chapters cover the other views not covered in this chapter, such as the analog and digital clock views and other views for displaying graphics, and so on.

USING BASIC VIEWS

To get started, this section explores 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 ...

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