Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Hands-On Android UI Development
Hands-On Android UI Development

Hands-On Android UI Development: Design and develop attractive user interfaces for Android applications

eBook
€17.99 €26.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

Hands-On Android UI Development

Designing Form Screens

Form screens are an essential part of user interface design in many ways because their history is a lesson in how not to do things. Most applications need to capture input from their users at some point, and you need input widgets for that, but you should always consider the minimum amount of information you need to ask the user for, rather than try to get all the information you may need in the future. This approach will keep the user focused on the task they are trying to carry out. Presenting them with a wall of input fields is overwhelming to most users and breaks their focus, which in turn can lead to them abandoning what they were trying to do with your application.

This chapter is focused on form screens, and will walk you through a bit of their history before diving into a method for actually designing form screens. This approach can and should be...

Exploring form screens

While not the most glamorous component of an application's user experience, form screens are a long-time staple of software. A form screen can be defined as any screen where the user is expected to explicitly enter or change data, as opposed to viewing or navigating it. Good examples of form screens are login screens, edit profile screens, or the add contact screen from a phonebook app. Over the years, the idea of what constitutes a good form screen has changed, with some people going as far as to shun them completely. However, you can't capture the user's data out of thin air.

The Android standard toolkit provides an excellent and diverse collection of widgets and layout structures to facilitate building excellent forms, and in Material Design applications, form screens can often double as a view screen (what will usually be a read-only version...

Designing a layout

Good user interface design is rooted in some simple rules, and there are processes you can follow to design a great user interface. For example, imagine that you're building an app to capture travel expenses so that they can be claimed easily at a later time. The foremost thing we'll build over here is the screen that captures the details of a single claim. This is a perfect example of a modern form screen design.

When designing a layout, it's a good idea to use a mockup tool such as Balsamiq (https://balsamiq.com/), or even paper and pencil to think about the layout of the screen. Physical index cards make excellent thinking spaces as they have similar proportions to a phone or tablet. Using paper, especially, helps you think about the arrangement of the screen instead of being distracted by the exact colors, fonts, and spacing that should be...

Creating a form layout

Once you have a good wireframe to work from, you'll want to start developing the user interface screen. For this, we'll use Android Studio and its wonderful layout editor.

Since this is a brand new project, you'll need to open Android Studio and use File | New | New Project to get it started. Then, follow these steps:

  1. Name the project Claim, and leave any non-Java support turned off.
  2. Target Android 4.1 on Phone & Tablet only.
  3. In the Activity Gallery, choose the Basic Activity:
  1. Name the new Activity CaptureClaimActivity, and then change the title to Capture Claim. Leave the other parameters at their default values:
  1. Finish the New Project wizard, and wait for the project to be generated.
  2. When the project has been generated and synchronized, Android Studio will open the content_capture_claim.xml file in its layout editor.
  1. By default...

Try it yourself

Using the knowledge you have gained in this chapter, import the attachment icon as a vector graphic, change its fill color to white, and set it as the icon of the floating action button that appears at the bottom-right of your layout. Once you have the icon right, try increasing the size of the floating action button to make it more thumb-friendly for your users.

Test your knowledge

  1. When designing a form screen, what is the first thing you should consider?
    • The colors and icons you want to use
    • The data you need from your user
    • The standard guidelines for Android
  1. What is the standard spacing increment in Material design?
    • 8 Pixels
    • 8 Density Independent Pixels
    • 8 Device Pixels
  2. The ConstraintLayout, ViewPager, and CardView are part of the support APIs. What does this mean?
    • Their bytecode must be included with your application if you use them
    • They are also used as part of the Android Studio code base
    • They can only contain other widgets from the support APIs
  3. When building a new layout, your root widget should always be which of these?
    • A ConstraintLayout
    • A LinearLayout
    • The simplest widget that makes sense for your layout

Exploring form screens


While not the most glamorous component of an application's user experience, form screens are a long-time staple of software. A form screen can be defined as any screen where the user is expected to explicitly enter or change data, as opposed to viewing or navigating it. Good examples of form screens are login screens, edit profile screens, or the add contact screen from a phonebook app. Over the years, the idea of what constitutes a good form screen has changed, with some people going as far as to shun them completely. However, you can't capture the user's data out of thin air.

The Android standard toolkit provides an excellent and diverse collection of widgets and layout structures to facilitate building excellent forms, and in Material Design applications, form screens can often double as a view screen (what will usually be a read-only version of the form screen) thanks to the placement of labels. A good way to understand this principle is to consider the evolution...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • A comprehensive guide to designing and developing highly interactive user interfaces for your app.
  • Design responsive and agile applications targeting multiple Android devices (up to Android Oreo) using Android Studio 3.0
  • Write reactive user interfaces with minimal effort by leveraging the latest Android technologies, such as Architecture components and the Lifecycle API
  • Avoid common design problems and pitfalls with the help of shared UI design patterns and best practices.

Description

A great user interface (UI) can spell the difference between success and failure for any new application. This book will show you not just how to code great UIs, but how to design them as well. It will take novice Android developers on a journey, showing them how to leverage the Android platform to produce stunning Android applications. Begin with the basics of creating Android applications and then move on to topics such as screen and layout design. Next, learn about techniques that will help improve performance for your application. Also, explore how to create reactive applications that are fast, animated, and guide the user toward their goals with minimal distraction. Understand Android architecture components and learn how to build your application to automatically respond to changes made by the user. Great platforms are not always enough, so this book also focuses on creating custom components, layout managers, and 2D graphics. Also, explore many tips and best practices to ease your UI development process. By the end, you'll be able to design and build not only amazing UIs, but also systems that provide the best possible user experience.

Who is this book for?

This book is for novice Android and Java developers who have a basic knowledge of Android development and want to start developing stunning user interfaces.

What you will learn

  • Create effective and efficient user interfaces that allow users to carry out tasks smoothly
  • Understand the fundamentals of Android UI design, and take a look at the basic layouts, Inputs, and controls
  • Learn about various UI components provided by Android, which include structured layout objects and UI controls that allow you to build the graphical user interface for your app
  • Explore various styles and themes that allow you to customize the look and feel of your app
  • Leverage the animation and graphics APIs to improve user experience and draw custom 2D graphics

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Nov 21, 2017
Length: 348 pages
Edition : 1st
Language : English
ISBN-13 : 9781788472135
Category :
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want

Product Details

Publication date : Nov 21, 2017
Length: 348 pages
Edition : 1st
Language : English
ISBN-13 : 9781788472135
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 106.97
Mastering Android Development with Kotlin
€36.99
Hands-On Android UI Development
€32.99
Building Android UIs with Custom Views
€36.99
Total 106.97 Stars icon

Table of Contents

14 Chapters
Creating Android Layouts Chevron down icon Chevron up icon
Designing Form Screens Chevron down icon Chevron up icon
Taking Actions Chevron down icon Chevron up icon
Composing User Interfaces Chevron down icon Chevron up icon
Binding Data to Widgets Chevron down icon Chevron up icon
Storing and Retrieving Data Chevron down icon Chevron up icon
Creating Overview Screens Chevron down icon Chevron up icon
Designing Material Layouts Chevron down icon Chevron up icon
Navigating Effectively Chevron down icon Chevron up icon
Making Overviews Even Better Chevron down icon Chevron up icon
Polishing Your Design Chevron down icon Chevron up icon
Customizing Widgets and Layouts Chevron down icon Chevron up icon
Activity Lifecycle Chevron down icon Chevron up icon
Test Your Knowledge Answers Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.8
(4 Ratings)
5 star 50%
4 star 25%
3 star 0%
2 star 0%
1 star 25%
T. Kristoffersen Jan 13, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is very informative and covers pretty much all aspects of Android development, including easy to read source code examples through the whole book. This books will teach you good practices and also how to avoid common pitfalls, whether you are a beginner or intermediate Android developer.
Amazon Verified review Amazon
Mridul Chetia Jan 05, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Good book for UI designs concepts
Amazon Verified review Amazon
John Cole Dec 20, 2018
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
I'll be using some of this in a course I'm teaching. It's a good, clear, practical book on the subject. The examples are easy to follow. It also has excellent guidelines for programming in general. My only issue is that I'm now getting spammed by the publisher because I had to sign up to get the code samples from their Web site.To update, they should fire the proofreaders. Page 209, the beginning of chapter 8, "However, a mobile application must make better use of their..." A little disagreement there, yes? Average of one every 3 or 4 pages, probably.
Amazon Verified review Amazon
Arve Sellesbakk Nov 30, 2017
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
Content is probably good enough but ebook format is completely unreadable from chapter 3 and onward.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.