
Jetpack Compose 1.6 Essentials
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
This book teaches you how to build Android applications using Jetpack Compose 1.6, Android Studio Iguana (2023.2.1), Material Design 3, and the Kotlin programming language.
The book begins with the basics by explaining how to set up an Android Studio development environment.
The book also includes in-depth chapters introducing the Kotlin programming language, including data types, operators, control flow, functions, lambdas, coroutines, and object-oriented programming.
An introduction to the key concepts of Jetpack Compose and Android project architecture is followed by a guided tour of Android Studio in Compose development mode. The book also covers the creation of custom Composables and explains how functions are combined to create user interface layouts, including row, column, box, flow, pager, and list components.
Other topics covered include data handling using state properties and key user interface design concepts such as modifiers, navigation bars, and user interface navigation. Additional chapters explore building your own reusable custom layout components, securing your apps with Biometric authentication, and integrating Google Maps.
The book covers graphics drawing, user interface animation, transitions, Kotlin Flows, and gesture handling.
Chapters also cover view models, SQLite databases, Room database access, the Database Inspector, live data, and custom theme creation. You will also learn to generate extra revenue from your app using in-app billing.
Finally, the book explains how to package up a completed app and upload it to the Google Play Store for publication.
Along the way, the topics covered in the book are put into practice through detailed tutorials, the source code for which is also available for download.
Assuming you already have some rudimentary programming experience, are ready to download Android Studio and the Android SDK, and have access to a Windows, Mac, or Linux system, you are ready to start.
More details
Other editions
Additional editions

Content
- Intro
- 1. Start Here
- 1.1 For Kotlin programmers
- 1.2 For new Kotlin programmers
- 1.3 Downloading the code samples
- 1.4 Feedback
- 1.5 Errata
- 1.6 Find more books
- 1.7 Authors wanted
- 2. Setting up an Android Studio Development Environment
- 2.1 System requirements
- 2.2 Downloading the Android Studio package
- 2.3 Installing Android Studio
- 2.3.1 Installation on Windows
- 2.3.2 Installation on macOS
- 2.3.3 Installation on Linux
- 2.4 The Android Studio setup wizard
- 2.5 Installing additional Android SDK packages
- 2.6 Installing the Android SDK Command-line Tools
- 2.6.1 Windows 8.1
- 2.6.2 Windows 10
- 2.6.3 Windows 11
- 2.6.4 Linux
- 2.6.5 macOS
- 2.7 Android Studio memory management
- 2.8 Updating Android Studio and the SDK
- 2.9 Summary
- 3. A Compose Project Overview
- 3.1 About the project
- 3.2 Creating the project
- 3.3 Creating an activity
- 3.4 Defining the project and SDK settings
- 3.5 Enabling the New Android Studio UI
- 3.6 Previewing the example project
- 3.7 Reviewing the main activity
- 3.8 Preview updates
- 3.9 Bill of Materials and the Compose version
- 3.10 Summary
- 4. An Example Compose Project
- 4.1 Getting started
- 4.2 Removing the template Code
- 4.3 The Composable hierarchy
- 4.4 Adding the DemoText composable
- 4.5 Previewing the DemoText composable
- 4.6 Adding the DemoSlider composable
- 4.7 Adding the DemoScreen composable
- 4.8 Previewing the DemoScreen composable
- 4.9 Adjusting preview settings
- 4.10 Testing in interactive mode
- 4.11 Completing the project
- 4.12 Summary
- 5. Creating an Android Virtual Device (AVD) in Android Studio
- 5.1 About Android Virtual Devices
- 5.2 Starting the Emulator
- 5.3 Running the Application in the AVD
- 5.4 Real-time updates with Live Edit
- 5.5 Running on Multiple Devices
- 5.6 Stopping a Running Application
- 5.7 Supporting Dark Theme
- 5.8 Running the Emulator in a Separate Window
- 5.9 Removing the Device Frame
- 5.10 Summary
- 6. Using and Configuring the Android Studio AVD Emulator
- 6.1 The Emulator Environment
- 6.2 Emulator Toolbar Options
- 6.3 Working in Zoom Mode
- 6.4 Resizing the Emulator Window
- 6.5 Extended Control Options
- 6.5.1 Location
- 6.5.2 Displays
- 6.5.3 Cellular
- 6.5.4 Battery
- 6.5.5 Camera
- 6.5.6 Phone
- 6.5.7 Directional Pad
- 6.5.8 Microphone
- 6.5.9 Fingerprint
- 6.5.10 Virtual Sensors
- 6.5.11 Snapshots
- 6.5.12 Record and Playback
- 6.5.13 Google Play
- 6.5.14 Settings
- 6.5.15 Help
- 6.6 Working with Snapshots
- 6.7 Configuring Fingerprint Emulation
- 6.8 The Emulator in Tool Window Mode
- 6.9 Creating a Resizable Emulator
- 6.10 Summary
- 7. A Tour of the Android Studio User Interface
- 7.1 The Welcome Screen
- 7.2 The Menu Bar
- 7.3 The Main Window
- 7.4 The Tool Windows
- 7.5 The Tool Window Menus
- 7.6 Android Studio Keyboard Shortcuts
- 7.7 Switcher and Recent Files Navigation
- 7.8 Changing the Android Studio Theme
- 7.9 Summary
- 8. Testing Android Studio Apps on a Physical Android Device
- 8.1 An Overview of the Android Debug Bridge (ADB)
- 8.2 Enabling USB Debugging ADB on Android Devices
- 8.2.1 macOS ADB Configuration
- 8.2.2 Windows ADB Configuration
- 8.2.3 Linux adb Configuration
- 8.3 Resolving USB Connection Issues
- 8.4 Enabling Wireless Debugging on Android Devices
- 8.5 Testing the adb Connection
- 8.6 Device Mirroring
- 8.7 Summary
- 9. The Basics of the Android Studio Code Editor
- 9.1 The Android Studio Editor
- 9.2 Splitting the Editor Window
- 9.3 Code Completion
- 9.4 Statement Completion
- 9.5 Parameter Information
- 9.6 Parameter Name Hints
- 9.7 Code Generation
- 9.8 Code Folding
- 9.9 Quick Documentation Lookup
- 9.10 Code Reformatting
- 9.11 Finding Sample Code
- 9.12 Live Templates
- 9.13 Summary
- 10. An Overview of the Android Architecture
- 10.1 The Android Software Stack
- 10.2 The Linux Kernel
- 10.3 Hardware Abstraction Layer
- 10.4 Android Runtime - ART
- 10.5 Android Libraries
- 10.5.1 C/C++ Libraries
- 10.6 Application Framework
- 10.7 Applications
- 10.8 Summary
- 11. An Introduction to Kotlin
- 11.1 What is Kotlin?
- 11.2 Kotlin and Java
- 11.3 Converting from Java to Kotlin
- 11.4 Kotlin and Android Studio
- 11.5 Experimenting with Kotlin
- 11.6 Semi-colons in Kotlin
- 11.7 Summary
- 12. Kotlin Data Types, Variables and Nullability
- 12.1 Kotlin data types
- 12.1.1 Integer data types
- 12.1.2 Floating point data types
- 12.1.3 Boolean data type
- 12.1.4 Character data type
- 12.1.5 String data type
- 12.1.6 Escape sequences
- 12.2 Mutable variables
- 12.3 Immutable variables
- 12.4 Declaring mutable and immutable variables
- 12.5 Data types are objects
- 12.6 Type annotations and type inference
- 12.7 Nullable type
- 12.8 The safe call operator
- 12.9 Not-null assertion
- 12.10 Nullable types and the let function
- 12.11 Late initialization (lateinit)
- 12.12 The Elvis operator
- 12.13 Type casting and type checking
- 12.14 Summary
- 13. Kotlin Operators and Expressions
- 13.1 Expression syntax in Kotlin
- 13.2 The Basic assignment operator
- 13.3 Kotlin arithmetic operators
- 13.4 Augmented assignment operators
- 13.5 Increment and decrement operators
- 13.6 Equality operators
- 13.7 Boolean logical operators
- 13.8 Range operator
- 13.9 Bitwise operators
- 13.9.1 Bitwise inversion
- 13.9.2 Bitwise AND
- 13.9.3 Bitwise OR
- 13.9.4 Bitwise XOR
- 13.9.5 Bitwise left shift
- 13.9.6 Bitwise right shift
- 13.10 Summary
- 14. Kotlin Control Flow
- 14.1 Looping control flow
- 14.1.1 The Kotlin for-in Statement
- 14.1.2 The while loop
- 14.1.3 The do ... while loop
- 14.1.4 Breaking from Loops
- 14.1.5 The continue statement
- 14.1.6 Break and continue labels
- 14.2 Conditional control flow
- 14.2.1 Using the if expressions
- 14.2.2 Using if ... else . expressions
- 14.2.3 Using if ... else if ... Expressions
- 14.2.4 Using the when statement
- 14.3 Summary
- 15. An Overview of Kotlin Functions and Lambdas
- 15.1 What is a function?
- 15.2 How to declare a Kotlin function
- 15.3 Calling a Kotlin function
- 15.4 Single expression functions
- 15.5 Local functions
- 15.6 Handling return values
- 15.7 Declaring default function parameters
- 15.8 Variable number of function parameters
- 15.9 Lambda expressions
- 15.10 Higher-order functions
- 15.11 Summary
- 16. The Basics of Object-Oriented Programming in Kotlin
- 16.1 What is an object?
- 16.2 What is a class?
- 16.3 Declaring a Kotlin class
- 16.4 Adding properties to a class
- 16.5 Defining methods
- 16.6 Declaring and initializing a class instance
- 16.7 Primary and secondary constructors
- 16.8 Initializer blocks
- 16.9 Calling methods and accessing properties
- 16.10 Custom accessors
- 16.11 Nested and inner classes
- 16.12 Companion objects
- 16.13 Summary
- 17. An Introduction to Kotlin Inheritance and Subclassing
- 17.1 Inheritance, classes, and subclasses
- 17.2 Subclassing syntax
- 17.3 A Kotlin inheritance example
- 17.4 Extending the functionality of a subclass
- 17.5 Overriding inherited methods
- 17.6 Adding a custom secondary constructor
- 17.7 Using the SavingsAccount class
- 17.8 Summary
- 18. An Overview of Compose
- 18.1 Development before Compose
- 18.2 Compose declarative syntax
- 18.3 Compose is data-driven
- 18.4 Summary
- 19. A Guide to Gradle Version Catalogs
- 19.1 Library and Plugin Dependencies
- 19.2 Project Gradle Build File
- 19.3 Module Gradle Build Files
- 19.4 Version Catalog File
- 19.5 Adding Dependencies
- 19.6 Library Updates
- 19.7 Summary
- 20. Composable Functions Overview
- 20.1 What is a composable function?
- 20.2 Stateful vs. stateless composables
- 20.3 Composable function syntax
- 20.4 Foundation and Material composables
- 20.5 Summary
- 21. An Overview of Compose State and Recomposition
- 21.1 The basics of state
- 21.2 Introducing recomposition
- 21.3 Creating the StateExample project
- 21.4 Declaring state in a composable
- 21.5 Unidirectional data flow
- 21.6 State hoisting
- 21.7 Saving state through configuration changes
- 21.8 Summary
- 22. An Introduction to Composition Local
- 22.1 Understanding CompositionLocal
- 22.2 Using CompositionLocal
- 22.3 Creating the CompLocalDemo project
- 22.4 Designing the layout
- 22.5 Adding the CompositionLocal state
- 22.6 Accessing the CompositionLocal state
- 22.7 Testing the design
- 22.8 Summary
- 23. An Overview of Compose Slot APIs
- 23.1 Understanding slot APIs
- 23.2 Declaring a slot API
- 23.3 Calling slot API composables
- 23.4 Summary
- 24. A Compose Slot API Tutorial
- 24.1 About the project
- 24.2 Creating the SlotApiDemo project
- 24.3 Preparing the MainActivity class file
- 24.4 Creating the MainScreen composable
- 24.5 Adding the ScreenContent composable
- 24.6 Creating the Checkbox composable
- 24.7 Implementing the ScreenContent slot API
- 24.8 Adding an Image drawable resource
- 24.9 Coding the TitleImage composable
- 24.10 Completing the MainScreen composable
- 24.11 Previewing the project
- 24.12 Summary
- 25. Using Modifiers in Compose
- 25.1 An overview of modifiers
- 25.2 Creating the ModifierDemo project
- 25.3 Creating a modifier
- 25.4 Modifier ordering
- 25.5 Adding modifier support to a composable
- 25.6 Common built-in modifiers
- 25.7 Combining modifiers
- 25.8 Summary
- 26. Annotated Strings and Brush Styles
- 26.1 What are annotated strings?
- 26.2 Using annotated strings
- 26.3 Brush Text Styling
- 26.4 Creating the example project
- 26.5 An example SpanStyle annotated string
- 26.6 An example ParagraphStyle annotated string
- 26.7 A Brush style example
- 26.8 Summary
- 27. Composing Layouts with Row and Column
- 27.1 Creating the RowColDemo project
- 27.2 Row composable
- 27.3 Column composable
- 27.4 Combining Row and Column composables
- 27.5 Layout alignment
- 27.6 Layout arrangement positioning
- 27.7 Layout arrangement spacing
- 27.8 Row and Column scope modifiers
- 27.9 Scope modifier weights
- 27.10 Summary
- 28. Box Layouts in Compose
- 28.1 An introduction to the Box composable
- 28.2 Creating the BoxLayout project
- 28.3 Adding the TextCell composable
- 28.4 Adding a Box layout
- 28.5 Box alignment
- 28.6 BoxScope modifiers
- 28.7 Using the clip() modifier
- 28.8 Summary
- 29. An Introduction to FlowRow and FlowColumn
- 29.1 FlowColumn and FlowRow
- 29.2 Maximum number of items
- 29.3 Working with main axis arrangement
- 29.4 Understanding cross-axis arrangement
- 29.5 Item alignment
- 29.6 Controlling item size
- 29.7 Summary
- 30. A FlowRow and FlowColumn Tutorial
- 30.1 Creating the FlowLayoutDemo project
- 30.2 Generating random height and color values
- 30.3 Adding the Box Composable
- 30.4 Modifying the Flow arrangement
- 30.5 Modifying item alignment
- 30.6 Switching to FlowColumn
- 30.7 Using cross-axis arrangement
- 30.8 Adding item weights
- 30.9 Summary
- 31. Custom Layout Modifiers
- 31.1 Compose layout basics
- 31.2 Custom layouts
- 31.3 Creating the LayoutModifier project
- 31.4 Adding the ColorBox composable
- 31.5 Creating a custom layout modifier
- 31.6 Understanding default position
- 31.7 Completing the layout modifier
- 31.8 Using a custom modifier
- 31.9 Working with alignment lines
- 31.10 Working with baselines
- 31.11 Summary
- 32. Building Custom Layouts
- 32.1 An overview of custom layouts
- 32.2 Custom layout syntax
- 32.3 Using a custom layout
- 32.4 Creating the CustomLayout project
- 32.5 Creating the CascadeLayout composable
- 32.6 Using the CascadeLayout composable
- 32.7 Summary
- 33. A Guide to ConstraintLayout in Compose
- 33.1 An introduction to ConstraintLayout
- 33.2 How ConstraintLayout works
- 33.2.1 Constraints
- 33.2.2 Margins
- 33.2.3 Opposing constraints
- 33.2.4 Constraint bias
- 33.2.5 Chains
- 33.2.6 Chain styles
- 33.3 Configuring dimensions
- 33.4 Guideline helper
- 33.5 Barrier helper
- 33.6 Summary
- 34. Working with ConstraintLayout in Compose
- 34.1 Calling ConstraintLayout
- 34.2 Generating references
- 34.3 Assigning a reference to a composable
- 34.4 Adding constraints
- 34.5 Creating the ConstraintLayout project
- 34.6 Adding the ConstraintLayout library
- 34.7 Adding a custom button composable
- 34.8 Basic constraints
- 34.9 Opposing constraints
- 34.10 Constraint bias
- 34.11 Constraint margins
- 34.12 The importance of opposing constraints and bias
- 34.13 Creating chains
- 34.14 Working with guidelines
- 34.15 Working with barriers
- 34.16 Decoupling constraints with constraint sets
- 34.17 Summary
- 35. Working with IntrinsicSize in Compose
- 35.1 Intrinsic measurements
- 35.2 Max. vs Min. Intrinsic Size measurements
- 35.3 About the example project
- 35.4 Creating the IntrinsicSizeDemo project
- 35.5 Creating the custom text field
- 35.6 Adding the Text and Box components
- 35.7 Adding the top-level Column
- 35.8 Testing the project
- 35.9 Applying IntrinsicSize.Max measurements
- 35.10 Applying IntrinsicSize.Min measurements
- 35.11 Summary
- 36. Coroutines and LaunchedEffects in Jetpack Compose
- 36.1 What are coroutines?
- 36.2 Threads vs. coroutines
- 36.3 Coroutine Scope
- 36.4 Suspend functions
- 36.5 Coroutine dispatchers
- 36.6 Coroutine builders
- 36.7 Jobs
- 36.8 Coroutines - suspending and resuming
- 36.9 Coroutine channel communication
- 36.10 Understanding side effects
- 36.11 Summary
- 37. An Overview of Lists and Grids in Compose
- 37.1 Standard vs. lazy lists
- 37.2 Working with Column and Row lists
- 37.3 Creating lazy lists
- 37.4 Enabling scrolling with ScrollState
- 37.5 Programmatic scrolling
- 37.6 Sticky headers
- 37.7 Responding to scroll position
- 37.8 Creating a lazy grid
- 37.9 Summary
- 38. A Compose Row and Column List Tutorial
- 38.1 Creating the ListDemo project
- 38.2 Creating a Column-based list
- 38.3 Enabling list scrolling
- 38.4 Manual scrolling
- 38.5 A Row list example
- 38.6 Summary
- 39. A Compose Lazy List Tutorial
- 39.1 Creating the LazyListDemo project
- 39.2 Adding list data to the project
- 39.3 Reading the XML data
- 39.4 Handling image loading
- 39.5 Designing the list item composable
- 39.6 Building the lazy list
- 39.7 Testing the project
- 39.8 Making list items clickable
- 39.9 Summary
- 40. Lazy List Sticky Headers and Scroll Detection
- 40.1 Grouping the list item data
- 40.2 Displaying the headers and items
- 40.3 Adding sticky headers
- 40.4 Reacting to scroll position
- 40.5 Adding the scroll button
- 40.6 Testing the finished app
- 40.7 Summary
- 41. A Compose Lazy Staggered Grid Tutorial
- 41.1 Lazy Staggered Grids
- 41.2 Creating the StaggeredGridDemo project
- 41.3 Adding the Box composable
- 41.4 Generating random height and color values
- 41.5 Creating the Staggered List
- 41.6 Testing the project
- 41.7 Switching to a horizontal staggered grid
- 41.8 Summary
- 42. VerticalPager and HorizontalPager in Compose
- 42.1 The Pager composables
- 42.2 Working with pager state
- 42.3 About the PagerDemo project
- 42.4 Creating the PagerDemo project
- 42.5 Adding the book cover images
- 42.6 Adding the HorizontalPager
- 42.7 Creating the page content
- 42.8 Testing the pager
- 42.9 Adding the arrow buttons
- 42.10 Summary
- 43. Compose Visibility Animation
- 43.1 Creating the AnimateVisibility project
- 43.2 Animating visibility
- 43.3 Defining enter and exit animations
- 43.4 Animation specs and animation easing
- 43.5 Repeating an animation
- 43.6 Different animations for different children
- 43.7 Auto-starting an animation
- 43.8 Implementing crossfading
- 43.9 Summary
- 44. Compose State-Driven Animation
- 44.1 Understanding state-driven animation
- 44.2 Introducing animate as state functions
- 44.3 Creating the AnimateState project
- 44.4 Animating rotation with animateFloatAsState
- 44.5 Animating color changes with animateColorAsState
- 44.6 Animating motion with animateDpAsState
- 44.7 Adding spring effects
- 44.8 Working with keyframes
- 44.9 Combining multiple animations
- 44.10 Using the Animation Inspector
- 44.11 Summary
- 45. Canvas Graphics Drawing in Compose
- 45.1 Introducing the Canvas component
- 45.2 Creating the CanvasDemo project
- 45.3 Drawing a line and getting the canvas size
- 45.4 Drawing dashed lines
- 45.5 Drawing a rectangle
- 45.6 Applying rotation
- 45.7 Drawing circles and ovals
- 45.8 Drawing gradients
- 45.9 Drawing arcs
- 45.10 Drawing paths
- 45.11 Drawing points
- 45.12 Drawing an image
- 45.13 Drawing text
- 45.14 Summary
- 46. Working with ViewModels in Compose
- 46.1 What is Android Jetpack?
- 46.2 The "old" architecture
- 46.3 Modern Android architecture
- 46.4 The ViewModel component
- 46.5 ViewModel implementation using state
- 46.6 Connecting a ViewModel state to an activity
- 46.7 ViewModel implementation using LiveData
- 46.8 Observing ViewModel LiveData within an activity
- 46.9 Summary
- 47. A Compose ViewModel Tutorial
- 47.1 About the project
- 47.2 Creating the ViewModelDemo project
- 47.3 Adding the ViewModel
- 47.4 Accessing DemoViewModel from MainActivity
- 47.5 Designing the temperature input composable
- 47.6 Designing the temperature input composable
- 47.7 Completing the user interface design
- 47.8 Testing the app
- 47.9 Summary
- 48. An Overview of Android SQLite Databases
- 48.1 Understanding database tables
- 48.2 Introducing database schema
- 48.3 Columns and data types
- 48.4 Database rows
- 48.5 Introducing primary keys
- 48.6 What is SQLite?
- 48.7 Structured Query Language (SQL)
- 48.8 Trying SQLite on an Android Virtual Device (AVD)
- 48.9 The Android Room persistence library
- 48.10 Summary
- 49. Room Databases and Compose
- 49.1 Revisiting modern app architecture
- 49.2 Key elements of Room database persistence
- 49.2.1 Repository
- 49.2.2 Room database
- 49.2.3 Data Access Object (DAO)
- 49.2.4 Entities
- 49.2.5 SQLite database
- 49.3 Understanding entities
- 49.4 Data Access Objects
- 49.5 The Room database
- 49.6 The Repository
- 49.7 In-Memory databases
- 49.8 Database Inspector
- 49.9 Summary
- 50. A Compose Room Database and Repository Tutorial
- 50.1 About the RoomDemo project
- 50.2 Creating the RoomDemo project
- 50.3 Modifying the build configuration
- 50.4 Building the entity
- 50.5 Creating the Data Access Object
- 50.6 Adding the Room database
- 50.7 Adding the repository
- 50.8 Adding the ViewModel
- 50.9 Designing the user interface
- 50.10 Writing a ViewModelProvider Factory class
- 50.11 Completing the MainScreen function
- 50.12 Testing the RoomDemo app
- 50.13 Using the Database Inspector
- 50.14 Summary
- 51. An Overview of Navigation in Compose
- 51.1 Understanding navigation
- 51.2 Declaring a navigation controller
- 51.3 Declaring a navigation host
- 51.4 Adding destinations to the navigation graph
- 51.5 Navigating to destinations
- 51.6 Passing arguments to a destination
- 51.7 Working with bottom navigation bars
- 51.8 Summary
- 52. A Compose Navigation Tutorial
- 52.1 Creating the NavigationDemo project
- 52.2 About the NavigationDemo project
- 52.3 Declaring the navigation routes
- 52.4 Adding the home screen
- 52.5 Adding the welcome screen
- 52.6 Adding the profile screen
- 52.7 Creating the navigation controller and host
- 52.8 Implementing the screen navigation
- 52.9 Passing the user name argument
- 52.10 Testing the project
- 52.11 Summary
- 53. A Compose Navigation Bar Tutorial
- 53.1 Creating the BottomBarDemo project
- 53.2 Declaring the navigation routes
- 53.3 Designing bar items
- 53.4 Creating the bar item list
- 53.5 Adding the destination screens
- 53.6 Creating the navigation controller and host
- 53.7 Designing the navigation bar
- 53.8 Working with the Scaffold component
- 53.9 Testing the project
- 53.10 Summary
- 54. Detecting Gestures in Compose
- 54.1 Compose gesture detection
- 54.2 Creating the GestureDemo project
- 54.3 Detecting click gestures
- 54.4 Detecting taps using PointerInputScope
- 54.5 Detecting drag gestures
- 54.6 Detecting drag gestures using PointerInputScope
- 54.7 Scrolling using the scrollable modifier
- 54.8 Scrolling using the scroll modifiers
- 54.9 Detecting pinch gestures
- 54.10 Detecting rotation gestures
- 54.11 Detecting translation gestures
- 54.12 Summary
- 55. Working with Anchored Draggable Components
- 55.1 Dragging and anchors
- 55.2 Detecting dragging gestures
- 55.3 Declaring the anchor points
- 55.4 Declaring thresholds
- 55.5 Declaring draggable state
- 55.6 Moving a component in response to a drag
- 55.7 About the DraggableDemo project
- 55.8 Creating the DraggableDemo project
- 55.9 Adding Foundation library
- 55.10 Adding the anchors enumeration
- 55.11 Setting up the draggable state and anchors
- 55.12 Designing the parent Box
- 55.13 Adding the draggable box
- 55.14 Testing the project
- 55.15 Summary
- 56. An Introduction to Kotlin Flow
- 56.1 Understanding Flows
- 56.2 Creating the sample project
- 56.3 Adding a view model to the project
- 56.4 Declaring the flow
- 56.5 Emitting flow data
- 56.6 Collecting flow data as state
- 56.7 Transforming data with intermediaries
- 56.8 Collecting flow data
- 56.9 Adding a flow buffer
- 56.10 More terminal flow operators
- 56.11 Flow flattening
- 56.12 Combining multiple flows
- 56.13 Hot and cold flows
- 56.14 StateFlow
- 56.15 SharedFlow
- 56.16 Converting a flow from cold to hot
- 56.17 Summary
- 57. A Jetpack Compose SharedFlow Tutorial
- 57.1 About the project
- 57.2 Creating the SharedFlowDemo project
- 57.3 Adding a view model to the project
- 57.4 Declaring the SharedFlow
- 57.5 Collecting the flow values
- 57.6 Testing the SharedFlowDemo app
- 57.7 Handling flows in the background
- 57.8 Summary
- 58. An Android Biometric Authentication Tutorial
- 58.1 An overview of biometric authentication
- 58.2 Creating the biometric authentication project
- 58.3 Adding the biometric dependency
- 58.4 Configuring device fingerprint authentication
- 58.5 Adding the biometric permissions to the manifest file
- 58.6 Checking the security settings
- 58.7 Designing the user interface
- 58.8 Configuring the authentication callbacks
- 58.9 Starting the biometric prompt
- 58.10 Testing the project
- 58.11 Summary
- 59. Working with the Google Maps Android API in Android Studio
- 59.1 The elements of the Google Maps Android API
- 59.2 Creating the Google Maps project
- 59.3 Creating a Google Cloud billing account
- 59.4 Creating a new Google Cloud project
- 59.5 Enabling the Google Maps SDK
- 59.6 Generating a Google Maps API key
- 59.7 Adding the API key to the Android Studio project
- 59.8 Adding the compose map dependency
- 59.9 Creating a map
- 59.10 Testing the application
- 59.11 Understanding geocoding and reverse geocoding
- 59.12 Specifying a map location
- 59.13 Changing the map type
- 59.14 Displaying map controls to the user
- 59.15 Handling map gesture interaction
- 59.15.1 Map zooming gestures
- 59.15.2 Map scrolling/panning gestures
- 59.15.3 Map tilt gestures
- 59.15.4 Map rotation gestures
- 59.16 Creating map markers
- 59.17 Controlling the map camera
- 59.18 Summary
- 60. Creating, Testing, and Uploading an Android App Bundle
- 60.1 The Release Preparation Process
- 60.2 Android App Bundles
- 60.3 Register for a Google Play Developer Console Account
- 60.4 Configuring the App in the Console
- 60.5 Enabling Google Play App Signing
- 60.6 Creating a Keystore File
- 60.7 Creating the Android App Bundle
- 60.8 Generating Test APK Files
- 60.9 Uploading the App Bundle to the Google Play Developer Console
- 60.10 Exploring the App Bundle
- 60.11 Managing Testers
- 60.12 Rolling the App Out for Testing
- 60.13 Uploading New App Bundle Revisions
- 60.14 Analyzing the App Bundle File
- 60.15 Summary
- 61. An Overview of Android In-App Billing
- 61.1 Preparing a project for In-App purchasing
- 61.2 Creating In-App products and subscriptions
- 61.3 Billing client initialization
- 61.4 Connecting to the Google Play Billing library
- 61.5 Querying available products
- 61.6 Starting the purchase process
- 61.7 Completing the purchase
- 61.8 Querying previous purchases
- 61.9 Summary
- 62. An Android In-App Purchasing Tutorial
- 62.1 About the In-App purchasing example project
- 62.2 Creating the InAppPurchase project
- 62.3 Adding libraries to the project
- 62.4 Adding the App to the Google Play Store
- 62.5 Creating an In-App product
- 62.6 Enabling license testers
- 62.7 Creating a purchase helper class
- 62.8 Adding the StateFlow streams
- 62.9 Initializing the billing client
- 62.10 Querying the product
- 62.11 Handling purchase updates
- 62.12 Launching the purchase flow
- 62.13 Consuming the product
- 62.14 Restoring a previous purchase
- 62.15 Completing the MainActivity
- 62.16 Testing the app
- 62.17 Troubleshooting
- 62.18 Summary
- 63. Working with Compose Theming
- 63.1 Material Design 2 vs. Material Design 3
- 63.2 Material Design 3 theming
- 63.3 Building a custom theme
- 63.4 Summary
- 64. A Material Design 3 Theming Tutorial
- 64.1 Creating the ThemeDemo project
- 64.2 Designing the user interface
- 64.3 Building a new theme
- 64.4 Adding the theme to the project
- 64.5 Enabling dynamic colors
- 64.6 Summary
- 65. An Overview of Gradle in Android Studio
- 65.1 An Overview of Gradle
- 65.2 Gradle and Android Studio
- 65.2.1 Sensible Defaults
- 65.2.2 Dependencies
- 65.2.3 Build Variants
- 65.2.4 Manifest Entries
- 65.2.5 APK Signing
- 65.2.6 ProGuard Support
- 65.3 The Property and Settings Gradle Build File
- 65.4 The Top-level Gradle Build File
- 65.5 Module Level Gradle Build Files
- 65.6 Configuring Signing Settings in the Build File
- 65.7 Running Gradle Tasks from the Command Line
- 65.8 Summary
- Index
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.