Book Image

Android Studio 4.0 Development Essentials - Java Edition

By : Neil Smyth
Book Image

Android Studio 4.0 Development Essentials - Java Edition

By: Neil Smyth

Overview of this book

Android rolls out frequent updates to meet the demands of the dynamic mobile market and to enable its developer community to lead advancements in application development. This book focuses on the updated features of Android Studio (the fully integrated development environment launched by Google) to build reliable Android applications using Java. The book starts by outlining the steps necessary to set up an Android development and testing environment. You’ll then learn how to create user interfaces with the help of Android Studio Layout Editor, XML files, and by writing the code in Java. The book introduces you to Android architecture components and advanced topics such as intents, touchscreen handling, gesture recognition, multi-window support integration, and biometric authentication, and lets you explore key features of Android Studio 4.0, including the layout editor, direct reply notifications, and dynamic delivery. You’ll also cover Android Jetpack in detail and create a sample app project using the ViewModel component. Finally, you’ll upload your app to the Google Play Console and handle the build process with Gradle. By the end of this book, you’ll have gained the skills necessary to develop applications using Android Studio 4.0 and Java.
Table of Contents (88 chapters)
88
Index

44.8 Adding Position Keyframes

The final task for this tutorial is to add two position keyframes (KeyPosition) to the animation path to introduce some lateral movement in to the animation. With the transition timeline visible in the MotionLayout editor, click on the button to create a keyframe as highlighed in Figure 44-13 above and select the KeyPosition option from the menu as shown in Figure 44-21 below:

Figure 44-21

In the resulting dialog, set the properties as illustrated in Figure 44-22:

Figure 44-22

Click on the Add button to commit the change, then repeat the above steps to add a second position keyframe configured as follows:

Position: 75

Type: parentRelative

PercentX: 0.85

PercentY: 0.75

On completion of these changes, the following keyframe entries will have been added to the transition element in the activity_main_scene.xml file:

<KeyFrameSet>

.

.

   <KeyPosition

...