Category: Android Studio

  • An Android Studio Layout Editor ConstraintLayout Tutorial

    The easiest and most productive way to design a user interface for an Android application is to use the Android Studio Layout Editor tool. This chapter will provide an overview of how to create a ConstraintLayout-based user interface using this approach. The exercise included in this chapter will also be used as an opportunity to…

  • ConstraintLayout Chains and Ratios in Android Studio

    The previous chapters have introduced the key features of the ConstraintLayout class and outlined the best practices for ConstraintLayout-based user interface design within the Android Studio Layout Editor. Although the concepts of ConstraintLayout chains and ratios were outlined in the chapter entitled A Guide to the Android ConstraintLayout, we have not yet addressed how to…

  • Using ConstraintLayout in Android Studio

    As mentioned more than once in previous chapters, Google has made significant changes to the Android Studio Layout Editor tool, many of which were made solely to support user interface layout design using ConstraintLayout. Now that the basic concepts of ConstraintLayout have been outlined in the previous chapter, this chapter will explore these concepts in…

  • A Guide to the Android ConstraintLayout

    As discussed in the chapter entitled Android Views, View Groups, and Layouts, Android provides several layout managers to design user interfaces. With Android 7, Google introduced a layout that addressed many of the shortcomings of the older layout managers. This layout, called ConstraintLayout, combines a simple, expressive, and flexible layout system with powerful features built…

  • A Guide to the Android Studio Layout Editor Tool

    It is challenging to think of an Android application concept that does not require some form of user interface. Most Android devices come equipped with a touch screen and keyboard (either virtual or physical), and taps and swipes are the primary interaction between the user and the application. Invariably these interactions take place through the…

  • Android Views, View Groups, and Layouts

    With the possible exception of listening to streaming audio, a user’s interaction with an Android device is primarily visual and tactile. All of this interaction occurs through the user interfaces of the applications installed on the device, including both the built-in applications and any third-party applications installed by the user. Therefore, it should come as…

  • Saving and Restoring the State of an Android Activity

    If the previous few chapters have achieved their objective, it should now be clearer as to the importance of saving and restoring the state of a user interface at particular points in the lifetime of an activity. In this chapter, we will extend the example application created in Android Activity State Changes Tutorial to demonstrate…

  • Android Activity State Changes Tutorial

    The previous chapters have discussed in detail the different states and lifecycles of the activities comprising an Android application. In this chapter, we will put the theory of handling activity state changes into practice by creating an example application. The purpose of this example application is to provide a real-world demonstration of an activity as…

  • Android Activity State Changes

    Based on the information outlined in the chapter entitled Android App and Activity Lifecycles it is now evident that the activities and fragments that make up an application pass through various different states during the application’s lifespan. The Android runtime system imposes the change from one state to the other and is, therefore, largely beyond…

  • Android App and Activity Lifecycles

    In earlier chapters, we learned that Android applications run within processes and comprise multiple components in the form of activities, services, and broadcast receivers. This chapter aims to expand on this knowledge by looking at the lifecycle of applications and activities within the Android runtime system. Regardless of the fanfare about how much memory and…