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

19.13 Adding Barriers

Barriers are added by right-clicking on the layout and selecting either the Add Vertical Barrier or Add Horizontal Barrier option from the Helpers menu, or using the toolbar menu options as shown previously in Figure 19-28.

Once a barrier has been added to the layout, it will appear as an entry in the Component Tree panel:

Figure 19-31

To add views as reference views (in other words, the views that control the position of the barrier), simply drag the widgets from within the Component Tree onto the barrier entry. In Figure 19-32, for example, widgets named textView1 and textView2 have been assigned as the reference widgets for barrier1:

Figure 19-32

After the reference views have been added, the barrier needs to be configured to specify the direction of the barrier in relation those views. This is the barrier direction setting and is defined within the Attributes tool window when the barrier is selected in the Component Tree panel:

...