Android User Interface Development: Beginner's Guide


Android User Interface Development: Beginner's Guide
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
$22.95
save 15%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
$67.94
save 6%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Reviews
Support
Sample Chapters
  • Leverage the Android platform's flexibility and power to design impactful user-interfaces
  • Build compelling, user-friendly applications that will look great on any Android device
  • Make your application stand out from the rest with styles and themes
  • A practical Beginner's Guide to take you step-by-step through the process of developing user interfaces to get your applications noticed!

Book Details

Language : English
Paperback : 304 pages [ 235mm x 191mm ]
Release Date : February 2011
ISBN : 1849514488
ISBN 13 : 9781849514484
Author(s) : Jason Morris
Topics and Technologies : All Books, Google, Mobile Application Development, Android, Beginner's Guides, Java

Table of Contents

Preface
Chapter 1: Developing a Simple Activity
Chapter 2: Presenting Data for Views
Chapter 3: Developing with Specialized Android Widgets
Chapter 4: Leveraging Activities and Intents
Chapter 5: Developing Non-linear Layouts
Chapter 6: Validating and Handling Input Data
Chapter 7: Animating Widgets and Layouts
Chapter 8: Designing Content-centric Activities
Chapter 9: Styling Android Applications
Chapter 10: Building an Application Theme
Appendix: Pop quiz answers
Index
  • Chapter 1: 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
      • Examining the Android project layout
    • Time for action – running the example project
    • The screen layout
      • The layout XML file
        • Resource selection qualifiers
    • 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
      • Defining common dimensions
    • 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
    • Chapter 2: Presenting Data for Views
      • Listing and selecting data
        • ListView choice modes
          • No selection mode – CHOICE_MODE_NONE
          • Single selection mode – CHOICE_MODE_SINGLE
          • Multiple selection mode – CHOICE_MODE_MULTIPLE
        • Adding header and footer widgets
        • Creating a simple ListView
      • Time for action – creating a fast food menu
        • Styling the standard ListAdapters
          • Defining standard dimensions
      • Time for action – improving the restaurant list
        • Creating custom adapters
          • Creating a menu for The Burger Place
      • Time for action – creating a Burger item layout
      • Time for action – presenting Burger objects
        • Creating TheBurgerPlaceActivity class
      • Time for action – implementing TheBurgerPlaceActivity
        • Registering and starting TheBurgerPlaceActivity
      • Using the ExpandableListView class
        • Creating ExpandableListAdapter implementations
      • Using the GridView class
      • Time for action – creating the fruit icon
        • Displaying icons in a GridView
      • Time for action – building the fruit menu
      • Time for action – creating the FourBucketsActivity
      • Summary
      • Chapter 3: Developing with Specialized Android Widgets
        • Creating a restaurant review application
        • Time for action – creating the robotic review project structure
        • Building a TabActivity
          • Creating tab icons
          • Android tabs and icons
        • Implementing the ReviewActivity
        • Time for action – writing the ReviewActivity class
        • Time for action – creating the Review layout
          • Working with switcher classes
        • Time for action – turning on the TextSwitcher
        • Creating a simple photo gallery
        • Time for action – building the Photos tab
          • Creating a thumbnail widget
          • Implementing a GalleryAdapter
        • 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
          • Using Include tags
          • Merging layouts
          • Using the ViewStub class
        • Summary
        • Chapter 4: Leveraging Activities and Intents
          • Exploring the Activity class
            • Using Bundle objects
          • Time for action – building an example game: "guess my number"
          • Creating and consuming intents
            • Defining Intent actions
            • Passing data in an Intent
            • Adding extra data to an Intent
          • Using advanced Intent features
            • Getting data back from an Intent
          • Time for action – viewing phone book contacts
          • Summary
          • Chapter 5: Developing Non-linear Layouts
            • Time for action – creating a layouts example project
            • FrameLayout
              • Common uses
            • Time for action – developing a FrameLayout example
            • Table Layout
              • Common uses
              • Using TableLayout for a memory game
            • Time for action – developing a simple memory game
            • AbsoluteLayout/Custom Layouts
              • Developing your own Layouts
            • Time for action – creating a custom layout
              • Using the CircleLayout
            • Time for action – finishing the CircleLayout example
            • RelativeLayout
              • Common uses
              • Integrating the RelativeLayout
            • Time for action – creating a contact editor
            • Time for action – integration with the layout example
            • SlidingDrawer
              • Common uses
              • Creating a SlidingDrawer example
            • Time for action – creating a SlidingDrawer
            • Time for action – sliding drawer integration
            • Summary
            • Chapter 6: Validating and Handling Input Data
              • Dealing with undesirable input
                • Correctly labeling input
                • Signaling undesirable input
                • Recovering from undesirable input
                • Giving users direct feedback
              • Avoiding invalid input entirely
                • Capturing date and time
                • Using spinners and ListView for selection
                  • Changing the data set
                  • Disabling selections
                • Capturing text input
                • Autocompleting text input
              • 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
                • Using the ListItemSelectionActivity
              • Summary
              • Chapter 7: Animating Widgets and Layouts
                • Using standard Android animations
                • Time for action – animating a news feed
                • Using flipper and switcher widgets
                  • Using the ImageSwitcher and TextSwitcher implementations
                  • Animating layout widgets
                • Time for action – animating a GridView
                  • Creating Custom Animations
                • Time for action – writing a custom animation
                • Time for action – making a Button vanish
                • Summary
                • Chapter 8: Designing Content-centric Activities
                  • Considering design options when displaying content on an Android device
                    • Considering user behavior
                      • Drawing user attention
                  • Displaying content with the WebView class
                    • Using a WebView object
                  • Time for action – creating a recipe viewer application
                    • Taking WebView further
                  • Creating relative layouts for content display
                    • Taking full advantage of RelativeLayout
                    • Considering Android layout constraints
                    • Styling TextView objects
                  • Time for action – developing specialized content views
                  • Developing an online music store
                    • Designing the music store
                    • Developing the 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
                  • Chapter 9: Styling Android Applications
                    • Working with style resources
                    • Using shape resources
                      • How shapes behave
                        • Rendering lines
                    • Time for action – drawing a broken line
                      • Rendering rectangles
                    • Time for action – creating a rounded border
                      • Rendering ovals
                    • Time for action – applying a gradient to an oval shape
                      • Rendering rings
                    • Time for action – rendering a spinner ring
                      • Defining layers
                    • Stretching using nine-patch images
                      • Creating nine-patch images
                    • Using bitmap images in Android
                      • Handling different screen sizes
                      • Handling different screen densities
                    • Handling configuration changes
                      • Providing landscape layouts
                      • Providing text input on a landscape layout
                      • Altering screen content
                    • Summary
                    • Chapter 10: Building an Application Theme
                      • Creating a basic calculator layout
                        • Designing a standard calculator
                      • 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
                        • Defining string resources for the scientific layout
                        • Styling the scientific layout
                        • Building the scientific layout
                      • Time for action – coding the scientific layout
                        • Handling the Activity restart
                      • Supporting hardware keyboards
                      • Adding in display animations
                      • Time for action – animating the display
                      • Summary
                      • Appendix: Pop quiz answers
                        • Chapter 1
                          • Layouts as XML fles
                          • Populating an activity
                        • Chapter 2
                          • List views and adapters
                        • Chapter 3
                          • Gallery objects and ImageViews
                        • Chapter 4
                          • Intents & Activities
                        • Chapter 5.
                          • Custom layouts
                        • Chapter 6
                          • Text input
                        • Chapter 8
                          • The WebView widget
                          • WebView versus native layouts
                        • Chapter 10
                          • Layout resources
                          • Nine-Patch Images
                          • Android resources

                        Jason Morris

                        Jason Morris has worked on software as diverse as fruit tracking systems, insurance systems, and travel search and booking systems and has been writing software for as long as he can remember. Currently working as a Software Architect for an exciting travel company in South Africa he works on multiple front-end systems utilizing a variety of Java-based technologies.

                        Code Downloads

                        Download the code and support files for this book.


                        Submit Errata

                        Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


                        Errata

                        - 5 submitted: last submission 11 Apr 2013

                        Errata type: Code | Page number: 53

                        notifyDataSetInvalidated should be notifyDataSetChanged

                         

                        Errata type: Code | Page number: 45

                        "center|center_vertical" should be "center"

                         

                        Errata type: Typo | Page number: 33

                        /quesionData/questionData/ should be /questionData/questionData/

                         

                        Errata type: Typo | Page number: 57

                        /ToppingCatagory/ToppingCategory/ should be /ToppingCategory/ToppingCategory/

                         

                        Errata type: Others | Page number: 184 | Errata date: 09 Sep 2011

                        11. The ImageView needs to have its android.widget.AbsListView. LayoutParams set, and then it can be returned to the GridView for display: view.setLayoutParams(new LayoutParams(16, 16)); ---------------------^^^^^^^^^^^^^^^^^^^^^^^^There should be a gridview layoutparams just like this "new GridView.LayoutParams(16,16)" -------------------------------------------------- return view;

                         

                        Sample chapters

                        You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                        Frequently bought together

                        Android User Interface Development: Beginner's Guide +    Android NDK Beginner’s Guide =
                        50% Off
                        the second eBook
                        Price for both: $39.00

                        Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                        What you will learn from this book

                        • Design user-friendly interfaces that support quick and easy access to information
                        • Explore and implement multiple layouts in Android to design user interfaces for the different screen sizes and densities
                        • Ensure a consistent user-interface experience and improve your application performance by reusing your application components
                        • Design easy-on-the-eye themes for your Android applications
                        • Display and select complex data structures from applications such as an address-book or calendar application by using Android widgets
                        • Entertain your application users by animating visual queues of what the application is currently doing, and what effect their actions are having
                        • Customize the built-in classes in Android to enhance the user interface by creating tabs and galleries
                        • Leverage Android's resource loading system
                        • Learn how best to present your user with information; or capture information from them
                        • Work through examples featuring all major Android widgets, and some of the more unusual components

                        In Detail

                        There are over 30,000 applications for Android that have been downloaded over a million times already. What makes yours any different? Building a compelling user-interface that people understand and enjoy is vital for the survival of a new application in an environment where look and feel may be the only thing between a user purchasing your application; or deleting it forever.

                        Working through examples, code-snippets, and screenshots this book introduces the fundamentals of good user-interface design from a developer's point of view. This book will put you above the rest by showing you how to build striking user interfaces to grasp your app users' attention enough to make them shell out some bucks to buy your application.

                        The Android User Interface Development Beginner's Guide will tell you everything you need to know to style your applications from bottom up. Given the importance of user-interface design on a touch-screen device, this book aims to equip its reader with the knowledge required to build killer Android applications. Starting simply, and keeping things easy, this book will take you on a step-by-step journey to understanding the principals of good user-interface design, and how to implement the best user interfaces on an Android mobile device. It aims at building design understanding on a chapter-by-chapter basis, while introducing platform knowledge through examples.

                        A practical definitive guide for developers who want to design and develop attractive Android user-interfaces

                        Approach

                        This is a step-by-step guide that aims to give even a novice Android developer a good grasp of user-interface design, while working through examples, diagrams, and screenshots to showcase the various widgets and tools that the platform makes available.

                        Who this book is for

                        If you have a little experience in Java and want to build applications for the Android phones, then this book is for you. This book will also help you if you already have applications on the Android platform and want to gain additional knowledge of user-interface design. It will appeal to all of the following readers:

                        • Junior Android Developers
                        • MIDP Developers looking to broaden their skill-set
                        • iPhone developers wanting to port applications
                        • Entrepreneurial Android developers wanting to widen their user base

                         

                        Code Download and Errata
                        Packt Anytime, Anywhere
                        Register Books
                        Print Upgrades
                        eBook Downloads
                        Video Support
                        Contact Us
                        Awards Voting Nominations Previous Winners
                        Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                        Resources
                        Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software