Reader small image

You're reading from  Hands-On Android UI Development

Product typeBook
Published inNov 2017
Reading LevelExpert
PublisherPackt
ISBN-139781788475051
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Jason Morris
Jason Morris
author image
Jason Morris

Jason Morris has been developing software for as long as he can remember. He's written software for the desktop, the server, for feature phones and for smart phones. He's written in many languages, and deployed in a variety of countries. Jason loves a good programming challenge, and when he's not writing code, or spending time with his family, taking photo's or camping: he's probably thinking about programming. In 2010 / 2011 he wrote Android User Interface Development: A Beginners Guide, which helped many beginner Android developers take their first steps into the realm of User Interface design and development for mobile devices.
Read more about Jason Morris

Right arrow

Planning navigation


Before leaping into your latest app idea, it's a good idea to stop and consider what you are trying to allow the user to do, and figure out how they will actually do it. One of the best ways to do this is with the decision tree or navigation tree. These can be easily drawn on paper, or if you're collaborating with other people, index cards on a magnetic whiteboard (or even a pin-board) are very effective.

The idea is to not just draw out the possible screens in your app, but how the user will get to each one. Navigation diagrams don't just help to define what screens your application actually needs, but will help ensure that the user will never be "lost" in your application. If the navigation lines become too complex, then you need to simplify the navigation (possibly by adding or removing some of the screens). Overly complex navigation is often hidden in the use of an application, but when drawn on a diagram, the complex relationships between screens become obvious, and...

Tabbed navigation


When applications are broken down into a small number of logical areas, tabs often become the most obvious and simplest method of navigation. Most application's navigation is deeply hierarchical, and in these cases, tabs are not a good choice for a navigation mechanism. Tab navigation is best used when each tab will be used roughly as much as each of the other tabs (that is, they have roughly equal importance). There are two major types of tabbed layouts in Android: bottom tabs and top tabs (also known as action bar tabs or toolbar tabs).

Top tabs are the classic method of adding tabs to an Android application, and are perfect when the application areas are not switched between often. This is because they are at the top of the screen and typically far away from where the user's fingers are. Most typically, a user has their fingers near the bottom of the screen, close to the software keyboard and system navigation buttons:

Bottom tabs, on the other hand, are a far more subtle...

Test your knowledge


  1. When using bottom tabs for navigation, which of these is important?
    • They all have single color icons
    • The tabs are of roughly equal importance
    • There are always exactly three tabs
  1. Top tabs are preferred to bottom tabs in which of these situations?
    • When the user won't need to navigate as frequently
    • When the tabs don't have icons
    • When there are more than three tabs
  2. Fragments can be used for navigation in which of these cases?
    • Only when a navigation drawer is used as well
    • Any time the user navigates within the application
    • When they can be nested in a FrameLayout
  3. When the user selects an item in a navigation drawer, which of these is true?
    • The drawer needs to be closed by the user
    • The drawer should be closed programmatically
    • The drawer is closed automatically after a short delay

Summary


Navigation is a critical part of a user's experience, and should be carefully thought out and designed. Material design has various different design structures and widgets to help you implement more effective navigation, but it's important to use them carefully and in the right place. As with any screen design, it's important to consider what the user will want to do most often, and to rank each possible action and navigation from the most important to the least on every screen they are available in.

In many applications, dedicated navigation components won't even be needed, and navigation will be achieved purely through goal-oriented actions from an overview screen or dashboard. In all instances, it's a good idea to draw up a navigation map ahead of time (even if it's incomplete or overly simplified). They will often tell you what sort of navigation structure and components your application will require.

Navigation achieved using the FragmentManager instead of always launching a new...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Hands-On Android UI Development
Published in: Nov 2017Publisher: PacktISBN-13: 9781788475051
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime

Author (1)

author image
Jason Morris

Jason Morris has been developing software for as long as he can remember. He's written software for the desktop, the server, for feature phones and for smart phones. He's written in many languages, and deployed in a variety of countries. Jason loves a good programming challenge, and when he's not writing code, or spending time with his family, taking photo's or camping: he's probably thinking about programming. In 2010 / 2011 he wrote Android User Interface Development: A Beginners Guide, which helped many beginner Android developers take their first steps into the realm of User Interface design and development for mobile devices.
Read more about Jason Morris