A (175)

(Tuis.) #1

286 CHAPTER 8: Android UI Design: Using Advanced ViewGroup Layout Containers


Figure 8-18. Use the Graphical Layout Editor tab to render or visualize the EditText UI element, now right-aligned


Go ahead and use the Run As ➤ Android Application menu sequence to check out your
GridLayout in the AVD. Next, we are going to look at another advanced UI layout container class
which was also added in Android 4.0, the SlidingPaneLayout class, which is another cool UI layout
class that you can use to design impressive UIs!


Using the Android SlidingPaneLayout Class


The SlidingPaneLayout class was another recent class addition to the Android OS, as of the Android
4.0 Ice Cream Sandwich release. This UI layout class was designed to help Android developers to
design a two panel, side-by-side, sliding-overlay UI design that can morph between different screen
sizes, shapes, and orientations.


The SlidingPaneLayout class was utilized to create the UI foundation for the Google Hangouts
application, so if you wanted to see the SlidingPaneLayout user interface in action on your own
Android device, it is utilized in at least one of your Android OS-supplied applications, if not more.


What we are going to do with your Hello Universe application in the second part of this chapter is
to create the SlidingPaneLayout “Sliding UI” design. This will allow users to slide your main content
pane (home screen) to the right to reveal Galaxy selection ImageButton UI elements. Your users will
be able to click on the alternate galaxy ImageButtons to create and display galaxy information about
each of three well-known and popular galaxies in our Hello Universe.

Free download pdf