Book Image

Android Studio 3.5 Development Essentials - Java Edition

By : Neil Smyth
Book Image

Android Studio 3.5 Development Essentials - Java Edition

By: Neil Smyth

Overview of this book

Android applications have become an important part of our daily lives and lots of effort goes into developing an Android application. This book will help you to build you own Android applications using Java. Android Studio 3.5 Development Essentials – Java Edition first teaches you to install Android development and test environment on different operating systems. Next, you will create an Android app and a virtual device in Android Studio, and install an Android application on emulator. You will test apps on physical Android devices, then study Android Studio code editor and constraint layout, Android architecture, the anatomy of an Android app, and Android activity state changes. The book then covers advanced topics such as views and widgets implementation, multi-window support integration, and biometric authentication, and finally, you will learn to upload your app to Google Play console and handle the build process with Gradle. By the end of this book, you will have gained enough knowledge to develop powerful Android applications using Java.
Table of Contents (86 chapters)
86
Index

46.2 An Overview of the CardView

The CardView class is a user interface view that allows information to be presented in groups using a card metaphor. Cards are usually presented in lists using a RecyclerView instance and may be configured to appear with shadow effects and rounded corners. Figure 46-4, for example, shows three CardView instances configured to display a layout consisting of an ImageView and two TextViews:

Figure 46-4

The user interface layout to be presented with a CardView instance is defined within an XML layout resource file and loaded into the CardView at runtime. The CardView layout can contain a layout of any complexity using the standard layout managers such as RelativeLayout and LinearLayout. The following XML layout file represents a card view layout consisting of a RelativeLayout and a single ImageView. The card is configured to be elevated to create shadowing effect and to appear with rounded corners:

<?xml version="1.0" encoding...