PacktLib: Android User Interface Development: Beginner's Guide

Android User Interface Development

Credits

About the Author

About the Reviewer

www.PacktPub.com

Preface

Developing a Simple Activity

Developing our first example

Creating the project structure

Time for action – setting up the Android SDK

Time for action – starting a new project

Time for action – running the example project

The screen layout

Time for action – setting up the question activity

Populating a View and a ViewGroup

Time for action – asking a question

Time for action – adding a space for answers

Time for action – adding more buttons

Limitations of the layout XML format

Populating the QuestionActivity

Time for action – writing more Java code

Dynamically creating widgets

Time for action – putting the questions on the screen

Handling events in Android

Summary

Presenting Data for Views

Listing and selecting data

Time for action – creating a fast food menu

Time for action – improving the restaurant list

Time for action – creating a Burger item layout

Time for action – presenting Burger objects

Time for action – implementing TheBurgerPlaceActivity

Using the ExpandableListView class

Using the GridView class

Time for action – creating the fruit icon

Time for action – building the fruit menu

Time for action – creating the FourBucketsActivity

Summary

Developing with Specialized Android Widgets

Creating a restaurant review application

Time for action – creating the robotic review project structure

Building a TabActivity

Implementing the ReviewActivity

Time for action – writing the ReviewActivity class

Time for action – creating the Review layout

Time for action – turning on the TextSwitcher

Creating a simple photo gallery

Time for action – building the Photos tab

Time for action – the GalleryAdapter

Time for action – making the gallery work

Building the reservation tab

Time for action – implementing the reservation layout

Time for action – initializing the reservation tab

Time for action – listening to the SeekBar

Time for action – selecting date and time

Creating complex layouts with Include, Merge, and ViewStubs

Summary

Leveraging Activities and Intents

Exploring the Activity class

Time for action – building an example game: "guess my number"

Creating and consuming intents

Using advanced Intent features

Time for action – viewing phone book contacts

Summary

Developing Non-linear Layouts

Time for action – creating a layouts example project

FrameLayout

Time for action – developing a FrameLayout example

Table Layout

Time for action – developing a simple memory game

AbsoluteLayout/Custom Layouts

Time for action – creating a custom layout

Time for action – finishing the CircleLayout example

RelativeLayout

Time for action – creating a contact editor

Time for action – integration with the layout example

SlidingDrawer

Time for action – creating a SlidingDrawer

Time for action – sliding drawer integration

Summary

Validating and Handling Input Data

Dealing with undesirable input

Avoiding invalid input entirely

Building activities for results

Generic filtering search Activity

Time for action – creating the ListItemSelectionActivity

Time for action – creating an ArrayAdapter

Time for action – creating the CursorAdapter

Time for action – setting up the ListView

Time for action – filtering the list

Time for action – returning the selection

Summary

Animating Widgets and Layouts

Using standard Android animations

Time for action – animating a news feed

Using flipper and switcher widgets

Time for action – animating a GridView

Time for action – writing a custom animation

Time for action – making a Button vanish

Summary

Designing Content-centric Activities

Considering design options when displaying content on an Android device

Displaying content with the WebView class

Time for action – creating a recipe viewer application

Creating relative layouts for content display

Time for action – developing specialized content views

Developing an online music store

Time for action – building a track item

Time for action – developing the main user interface layout

Time for action – developing the main user interface Java code

Summary

Styling Android Applications

Working with style resources

Using shape resources

Time for action – drawing a broken line

Time for action – creating a rounded border

Time for action – applying a gradient to an oval shape

Time for action – rendering a spinner ring

Stretching using nine-patch images

Using bitmap images in Android

Handling configuration changes

Summary

Building an Application Theme

Creating a basic calculator layout

Time for action – building the standard calculator

Building the calculator styling

Time for action – creating the button images

Time for action – styling the calculator buttons

Time for action – styling the display

Scientific landscape layout

Time for action – coding the scientific layout

Supporting hardware keyboards

Adding in display animations

Time for action – animating the display

Summary

Pop quiz answers

Pop quiz answers

Pop quiz answers

Pop quiz answers

Pop quiz answers

Pop quiz answers

Pop quiz answers

Pop quiz answers

Pop quiz answers

Index