Objectives
In this chapter you’ll:
Design a GUI using LinearLayout
s and a GridLayout
.
Use the IDE’s Outline window to add GUI components to LinearLayout
s and a GridLayout
.
Use TextView
, EditText
and SeekBar
GUI components.
Use Java object-oriented programming capabilities, including classes, objects, interfaces, anonymous inner classes and inheritance to add functionality to an Android app.
Programmatically interact with GUI components to change the text that they display.
Use event handling to respond to user interactions with an EditText
and a SeekBar
.
Specify that the keypad should always be displayed when an app is executing.
Specify that an app supports only portrait orientation.
3.2 Test-Driving the Tip Calculator App
3.3.2 Activity
Lifecycle Methods
3.3.3 Arranging Views with LinearLayout
and GridLayout
3.3.5 Formatting Numbers as Locale-Specific Currency and Percentage Strings
3.3.6 Implementing Interface TextWatcher
for Handling EditText
Text Changes
3.3.7 Implementing Interface OnSeekBarChangeListener
for Handling SeekBar
Thumb Position Changes
3.4.2 Creating the TipCalculator
Project
3.4.3 Changing to a GridLayout
3.4.4 Adding the TextView
s, EditText
, SeekBar
and LinearLayout
s
3.4.5 Customizing the Views to Complete the Design
3.5 Adding Functionality to the App
Self-Review Exercises | Answers to Self-Review Exercises | Exercises