Author: admin

  • A Java Android Studio Gesture Detection Tutorial

    The term “gesture” defines a contiguous sequence of interactions between the touch screen and the user. A typical gesture begins at the point that the screen is first touched and ends when the last finger or pointing device leaves the display surface. When correctly harnessed, gestures can be implemented to communicate between the user and…

  • An Android Java Touch and Multi-touch Event Tutorial

    Most Android-based devices use a touch screen as the primary interface between the user and the device. The previous chapter introduced how a touch on the screen translates into an action within a running Android application. There is, however, much more to touch event handling than responding to a single finger tap on a view…

  • An Android Studio Java Event Handling Tutorial

    Much has been covered in the previous chapters relating to the design of user interfaces for Android applications. However, an area that has yet to be covered involves how a user’s interaction with the user interface triggers the underlying activity to perform a task. In other words, from the previous chapters, we know how to…

  • Quick Building with Android Studio Apply Changes

    Now that some of the basic concepts of Android development using Android Studio have been covered, this is a good time to introduce the Android Studio Apply Changes feature. As all experienced developers know, every second spent waiting for an app to compile and run is better spent writing and refining code. Introducing Apply Changes…

  • An Android Java ConstraintSet Example

    The previous chapter introduced the basic concepts of creating and modifying user interface layouts in Java code using the ConstraintLayout and ConstraintSet classes. This chapter will put these concepts into practice by creating an example layout created entirely in Java code and without using the Android Studio Layout Editor tool. Creating the Example Project in…

  • Android Java Constraint Sets

    Until this point in the book, all user interface design tasks have been performed using the Android Studio Layout Editor tool, either in text or design mode. An alternative to writing XML resource files or using the Android Studio Layout Editor is to write Java code to directly create, configure and manipulate the view objects…

  • Save and Restore Android Activity State in Java

    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 A Java Android Activity State Changes Tutorial…

  • A Java 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…

  • Handling Android Activity State Changes in Java

    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 View Binding in Java

    An essential part of developing Android apps involves the interaction between the code and the views that make up the user interface layouts. This chapter will look at the options available for gaining access to layout views in code, emphasizing an option known as view binding. Once the basics of view bindings have been covered,…