Category: Android Studio
-
Android Studio Jetpack Data Binding in Java
In the chapter entitled “Modern Android App Architecture with Jetpack”, we introduced the concept of Android Data Binding. We explained how it is used to directly connect the views in a user interface layout to the methods and data located in other objects within an app without the need to write code. This chapter will…
-
An Android Studio Java LiveData Tutorial
The previous chapter began building an app to conform to the recommended Jetpack architecture guidelines. These initial steps involved implementing the data model for the app user interface within a ViewModel instance. This chapter will further enhance the app design using the LiveData architecture component. Once LiveData support has been added to the project in…
-
An Android Studio Java ViewModel Tutorial
The previous chapter introduced the fundamental concepts of Android Jetpack and outlined the basics of modern Android app architecture. Jetpack defines a set of recommendations describing how an Android app project should be structured while providing a set of libraries and components that make it easier to conform to these guidelines to develop reliable apps…
-
An Android Studio Java Fragment Example
As outlined in the previous chapter, fragments provide a convenient mechanism for creating reusable modules of application functionality consisting of both sections of a user interface and the corresponding behavior. Once created, fragments can be embedded within activities. Having explored the general theory of fragments in the previous chapter, this chapter aims to create an…
-
An Introduction to Java Fragments in Android Studio
As you progress through the chapters of this book, it will become increasingly evident that many of the design concepts behind the Android system were conceived to promote the reuse of and interaction between the different elements that make up an application. One such area that will be explored in this chapter involves using Fragments.…
-
An Android Studio Java Pinch Gesture Tutorial
Before moving on from touch handling in general and gesture recognition in particular, the topic of this chapter is handling pinch gestures. While it is possible to create and detect a wide range of gestures using the steps outlined in the previous sections of this chapter, it is, in fact, not possible to detect a…
-
An Android Studio Java Custom Gesture Recognition Tutorial
The previous chapter covered the detection of what is referred to as “common gestures” from within an Android application. In practice, however, a gesture can conceivably involve just about any sequence of touch motions on the display of an Android device. In recognition of this, the Android SDK allows custom gestures of just about any…
-
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…