LibCoder

Jetpack Compose 1.3 Essentials: Developing Android Apps with Jetpack Compose 1.3, Android Studio, and Kotlin

1C Agda Kotlin
Jetpack Compose 1.3 Essentials: Developing Android Apps with Jetpack Compose 1.3, Android Studio, and Kotlin
Автор: Smyth Neil
Дата выхода: 2023
Издательство: Payload Media, Inc.
Количество страниц: 575
Размер файла: 5,3 МБ
Тип файла: PDF
Добавил: LibCoder
Оглавление
1. Start Here....20 1.1 For Kotlin programmers....20 1.2 For new Kotlin programmers....20 1.3 Downloading the code samples....20 1.4 Feedback....21 1.5 Errata....21 2. Setting up an Android Studio Development Environment....22 2.1 System requirements....22 2.2 Downloading the Android Studio package....22 2.3 Installing Android Studio....23 2.3.1 Installation on Windows....23 2.3.2 Installation on macOS....23 2.3.3 Installation on Linux....24 2.4 The Android Studio setup wizard....24 2.5 Installing additional Android SDK packages....25 2.6 Installing the Android SDK Command-line Tools....28 2.6.1 Windows 8.1....29 2.6.2 Windows 10....29 2.6.3 Windows 11....30 2.6.4 Linux....30 2.6.5 macOS....30 2.7 Android Studio memory management....30 2.8 Updating Android Studio and the SDK....31 2.9 Summary....31 3. A Compose Project Overview....32 3.1 About the project....32 3.2 Creating the project....33 3.3 Creating an activity....33 3.4 Defining the project and SDK settings....34 3.5 Previewing the example project....35 3.6 Reviewing the main activity....37 3.7 Preview updates....41 3.8 Bill of Materials and the Compose version....41 3.9 Summary....43 4. An Example Compose Project....44 4.1 Getting started....44 4.2 Removing the template Code....44 4.3 The Composable hierarchy....45 4.4 Adding the DemoText composable....45 4.5 Previewing the DemoText composable....47 4.6 Adding the DemoSlider composable....47 4.7 Adding the DemoScreen composable....48 4.8 Previewing the DemoScreen composable....50 4.9 Adjusting preview settings....50 4.10 Testing in interactive mode....51 4.11 Completing the project....52 4.12 Summary....53 5. Creating an Android Virtual Device (AVD) in Android Studio....54 5.1 About Android Virtual Devices....54 5.2 Starting the emulator....55 5.3 Running the application in the AVD....56 5.4 Real-time updates with Live Edit....58 5.5 Running on multiple devices....59 5.6 Stopping a running application....59 5.7 Supporting dark theme....60 5.8 Running the emulator in a separate window....60 5.9 Enabling the device frame....62 5.10 Summary....62 6. Using and Configuring the Android Studio AVD Emulator ....64 6.1 The Emulator Environment....64 6.2 Emulator Toolbar Options....64 6.3 Working in Zoom Mode....66 6.4 Resizing the Emulator Window....66 6.5 Extended Control Options....66 6.5.1 Location....67 6.5.2 Displays....67 6.5.3 Cellular....67 6.5.4 Battery....67 6.5.5 Camera....67 6.5.6 Phone....67 6.5.7 Directional Pad....67 6.5.8 Microphone....67 6.5.9 Fingerprint....67 6.5.10 Virtual Sensors....68 6.5.11 Snapshots....68 6.5.12 Record and Playback....68 6.5.13 Google Play....68 6.5.14 Settings....68 6.5.15 Help....68 6.6 Working with Snapshots....68 6.7 Configuring Fingerprint Emulation....69 6.8 The Emulator in Tool Window Mode....70 6.9 Creating a Resizable Emulator....71 6.10 Summary....72 7. A Tour of the Android Studio User Interface....74 7.1 The Welcome Screen....74 7.2 The Main Window....75 7.3 The Tool Windows....76 7.4 Android Studio Keyboard Shortcuts....79 7.5 Switcher and Recent Files Navigation....80 7.6 Changing the Android Studio Theme....81 7.7 Summary....82 8. Testing Android Studio Apps on a Physical Android Device....84 8.1 An overview of the Android Debug Bridge (ADB)....84 8.2 Enabling USB debugging ADB on Android devices....84 8.2.1 macOS ADB configuration....85 8.2.2 Windows ADB configuration....86 8.2.3 Linux adb configuration....87 8.3 Resolving USB connection issues....87 8.4 Enabling wireless debugging on Android devices....88 8.5 Testing the adb connection....90 8.6 Summary....90 9. The Basics of the Android Studio Code Editor....92 9.1 The Android Studio editor....92 9.2 Code mode....94 9.3 Splitting the editor window....95 9.4 Code completion....95 9.5 Statement completion....97 9.6 Parameter information....97 9.7 Parameter name hints....97 9.8 Code generation....97 9.9 Code folding....98 9.10 Quick documentation lookup....100 9.11 Code reformatting....100 9.12 Finding sample code....101 9.13 Live templates....101 9.14 Summary....102 10. An Overview of the Android Architecture....104 10.1 The Android software stack....104 10.2 The Linux kernel....105 10.3 Android runtime – ART....105 10.4 Android libraries....105 10.4.1 C/C++ libraries....105 10.5 Application framework....106 10.6 Applications....106 10.7 Summary....106 11. An Introduction to Kotlin....108 11.1 What is Kotlin?....108 11.2 Kotlin and Java....108 11.3 Converting from Java to Kotlin....108 11.4 Kotlin and Android Studio....109 11.5 Experimenting with Kotlin....109 11.6 Semi-colons in Kotlin....110 11.7 Summary....110 12. Kotlin Data Types, Variables and Nullability....112 12.1 Kotlin data types....112 12.1.1 Integer data types....113 12.1.2 Floating point data types....113 12.1.3 Boolean data type....113 12.1.4 Character data type....113 12.1.5 String data type....113 12.1.6 Escape sequences....114 12.2 Mutable variables....115 12.3 Immutable variables....115 12.4 Declaring mutable and immutable variables....115 12.5 Data types are objects....115 12.6 Type annotations and type inference....116 12.7 Nullable type....117 12.8 The safe call operator....117 12.9 Not-null assertion....118 12.10 Nullable types and the let function....118 12.11 Late initialization (lateinit)....119 12.12 The Elvis operator....120 12.13 Type casting and type checking....120 12.14 Summary....121 13. Kotlin Operators and Expressions....122 13.1 Expression syntax in Kotlin....122 13.2 The Basic assignment operator....122 13.3 Kotlin arithmetic operators....122 13.4 Augmented assignment operators....123 13.5 Increment and decrement operators....123 13.6 Equality operators....124 13.7 Boolean logical operators....124 13.8 Range operator....125 13.9 Bitwise operators....125 13.9.1 Bitwise inversion....125 13.9.2 Bitwise AND....126 13.9.3 Bitwise OR....126 13.9.4 Bitwise XOR....126 13.9.5 Bitwise left shift....127 13.9.6 Bitwise right shift....127 13.10 Summary....128 14. Kotlin Control Flow....130 14.1 Looping control flow....130 14.1.1 The Kotlin for-in Statement....130 14.1.2 The while loop ....131 14.1.3 The do ... while loop ....132 14.1.4 Breaking from Loops....132 14.1.5 The continue statement ....133 14.1.6 Break and continue labels....133 14.2 Conditional control flow....134 14.2.1 Using the if expressions ....134 14.2.2 Using if ... else … expressions ....135 14.2.3 Using if ... else if ... Expressions ....135 14.2.4 Using the when statement....135 14.3 Summary....136 15. An Overview of Kotlin Functions and Lambdas....138 15.1 What is a function?....138 15.2 How to declare a Kotlin function....138 15.3 Calling a Kotlin function....139 15.4 Single expression functions....139 15.5 Local functions....139 15.6 Handling return values....140 15.7 Declaring default function parameters....140 15.8 Variable number of function parameters ....140 15.9 Lambda expressions....141 15.10 Higher-order functions....142 15.11 Summary....143 16. The Basics of Object-Oriented Programming in Kotlin....144 16.1 What is an object?....144 16.2 What is a class?....144 16.3 Declaring a Kotlin class....144 16.4 Adding properties to a class....145 16.5 Defining methods....145 16.6 Declaring and initializing a class instance....145 16.7 Primary and secondary constructors....145 16.8 Initializer blocks....148 16.9 Calling methods and accessing properties....148 16.10 Custom accessors....148 16.11 Nested and inner classes....149 16.12 Companion objects....150 16.13 Summary....152 17. An Introduction to Kotlin Inheritance and Subclassing....154 17.1 Inheritance, classes, and subclasses....154 17.2 Subclassing syntax....154 17.3 A Kotlin inheritance example....155 17.4 Extending the functionality of a subclass....156 17.5 Overriding inherited methods....157 17.6 Adding a custom secondary constructor....158 17.7 Using the SavingsAccount class....158 17.8 Summary....158 18. An Overview of Compose....160 18.1 Development before Compose....160 18.2 Compose declarative syntax....160 18.3 Compose is data-driven....161 18.4 Summary....161 19. Composable Functions Overview....162 19.1 What is a composable function?....162 19.2 Stateful vs. stateless composables....162 19.3 Composable function syntax....163 19.4 Foundation and Material composables....165 19.5 Summary....166 20. An Overview of Compose State and Recomposition....168 20.1 The basics of state....168 20.2 Introducing recomposition....168 20.3 Creating the StateExample project....169 20.4 Declaring state in a composable....169 20.5 Unidirectional data flow....172 20.6 State hoisting....174 20.7 Saving state through configuration changes....176 20.8 Summary....177 21. An Introduction to Composition Local....180 21.1 Understanding CompositionLocal....180 21.2 Using CompositionLocal....181 21.3 Creating the CompLocalDemo project....182 21.4 Designing the layout....182 21.5 Adding the CompositionLocal state....183 21.6 Accessing the CompositionLocal state....184 21.7 Testing the design....184 21.8 Summary....187 22. An Overview of Compose Slot APIs....188 22.1 Understanding slot APIs....188 22.2 Declaring a slot API....189 22.3 Calling slot API composables....189 22.4 Summary....191 23. A Compose Slot API Tutorial....192 23.1 About the project....192 23.2 Creating the SlotApiDemo project....192 23.3 Preparing the MainActivity class file....192 23.4 Creating the MainScreen composable....193 23.5 Adding the ScreenContent composable ....194 23.6 Creating the Checkbox composable....195 23.7 Implementing the ScreenContent slot API....196 23.8 Adding an Image drawable resource....197 23.9 Writing the TitleImage composable....198 23.10 Completing the MainScreen composable....199 23.11 Previewing the project....201 23.12 Summary....202 24. Using Modifiers in Compose....204 24.1 An overview of modifiers....204 24.2 Creating the ModifierDemo project....204 24.3 Creating a modifier....205 24.4 Modifier ordering....207 24.5 Adding modifier support to a composable....207 24.6 Common built-in modifiers....211 24.7 Combining modifiers....211 24.8 Summary....212 25. Annotated Strings and Brush Styles....214 25.1 What are annotated strings?....214 25.2 Using annotated strings....214 25.3 Brush Text Styling....215 25.4 Creating the example project....216 25.5 An example SpanStyle annotated string....216 25.6 An example ParagraphStyle annotated string....217 25.7 A Brush style example....220 25.8 Summary....221 26. Composing Layouts with Row and Column....222 26.1 Creating the RowColDemo project....222 26.2 Row composable....223 26.3 Column composable....223 26.4 Combining Row and Column composables....224 26.5 Layout alignment....225 26.6 Layout arrangement positioning....227 26.7 Layout arrangement spacing....229 26.8 Row and Column scope modifiers....230 26.9 Scope modifier weights....234 26.10 Summary....235 27. Box Layouts in Compose....236 27.1 An introduction to the Box composable....236 27.2 Creating the BoxLayout project....236 27.3 Adding the TextCell composable....236 27.4 Adding a Box layout....237 27.5 Box alignment....238 27.6 BoxScope modifiers....240 27.7 Using the clip() modifier....240 27.8 Summary....242 28. Custom Layout Modifiers....244 28.1 Compose layout basics....244 28.2 Custom layouts....244 28.3 Creating the LayoutModifier project....244 28.4 Adding the ColorBox composable....245 28.5 Creating a custom layout modifier....246 28.6 Understanding default position....246 28.7 Completing the layout modifier....246 28.8 Using a custom modifier....247 28.9 Working with alignment lines....248 28.10 Working with baselines....250 28.11 Summary....250 29. Building Custom Layouts....252 29.1 An overview of custom layouts....252 29.2 Custom layout syntax....252 29.3 Using a custom layout....253 29.4 Creating the CustomLayout project....254 29.5 Creating the CascadeLayout composable....254 29.6 Using the CascadeLayout composable....256 29.7 Summary....257 30. A Guide to ConstraintLayout in Compose....258 30.1 An introduction to ConstraintLayout....258 30.2 How ConstraintLayout works....258 30.2.1 Constraints....258 30.2.2 Margins....259 30.2.3 Opposing constraints....259 30.2.4 Constraint bias....260 30.2.5 Chains....261 30.2.6 Chain styles....261 30.3 Configuring dimensions....262 30.4 Guideline helper....262 30.5 Barrier helper....263 30.6 Summary....264 31. Working with ConstraintLayout in Compose....266 31.1 Calling ConstraintLayout....266 31.2 Generating references....266 31.3 Assigning a reference to a composable....266 31.4 Adding constraints....267 31.5 Creating the ConstraintLayout project....267 31.6 Adding the ConstraintLayout library....268 31.7 Adding a custom button composable....268 31.8 Basic constraints....269 31.9 Opposing constraints....270 31.10 Constraint bias....271 31.11 Constraint margins....272 31.12 The importance of opposing constraints and bias....273 31.13 Creating chains....276 31.14 Working with guidelines....277 31.15 Working with barriers....278 31.16 Decoupling constraints with constraint sets....281 31.17 Summary....283 32. Working with IntrinsicSize in Compose....284 32.1 Intrinsic measurements....284 32.2 Max. vs Min. Intrinsic Size measurements....284 32.3 About the example project....285 32.4 Creating the IntrinsicSizeDemo project....286 32.5 Creating the custom text field....286 32.6 Adding the Text and Box components....287 32.7 Adding the top-level Column....287 32.8 Testing the project....288 32.9 Applying IntrinsicSize.Max measurements....288 32.10 Applying IntrinsicSize.Min measurements....289 32.11 Summary....289 33. Coroutines and LaunchedEffects in Jetpack Compose....290 33.1 What are coroutines?....290 33.2 Threads vs. coroutines....290 33.3 Coroutine Scope....291 33.4 Suspend functions....291 33.5 Coroutine dispatchers....291 33.6 Coroutine builders....292 33.7 Jobs....292 33.8 Coroutines – suspending and resuming....293 33.9 Coroutine channel communication....294 33.10 Understanding side effects....295 33.11 Summary....296 34. An Overview of Lists and Grids in Compose....298 34.1 Standard vs. lazy lists....298 34.2 Working with Column and Row lists....298 34.3 Creating lazy lists....299 34.4 Enabling scrolling with ScrollState....300 34.5 Programmatic scrolling....300 34.6 Sticky headers....301 34.7 Responding to scroll position....303 34.8 Creating a lazy grid....303 34.9 Summary....306 35. A Compose Row and Column List Tutorial ....308 35.1 Creating the ListDemo project....308 35.2 Creating a Column-based list....308 35.3 Enabling list scrolling....310 35.4 Manual scrolling....310 35.5 A Row list example....313 35.6 Summary....313 36. A Compose Lazy List Tutorial ....314 36.1 Creating the LazyListDemo project....314 36.2 Adding list data to the project....314 36.3 Reading the XML data....316 36.4 Handling image loading....317 36.5 Designing the list item composable....319 36.6 Building the lazy list....320 36.7 Testing the project....321 36.8 Making list items clickable....321 36.9 Summary....323 37. Lazy List Sticky Headers and Scroll Detection ....324 37.1 Grouping the list item data....324 37.2 Displaying the headers and items....324 37.3 Adding sticky headers....325 37.4 Reacting to scroll position....326 37.5 Adding the scroll button....328 37.6 Testing the finished app....329 37.7 Summary....330 38. A Compose Lazy Staggered Grid Tutorial ....332 38.1 Lazy Staggered Grids....332 38.2 Creating the StaggeredGridDemo project....333 38.3 Adding the Box composable....334 38.4 Generating random height and color values....334 38.5 Creating the Staggered List....335 38.6 Testing the project....336 38.7 Switching to a horizontal staggered grid....337 38.8 Summary....338 39. Compose Visibility Animation....340 39.1 Creating the AnimateVisibility project....340 39.2 Animating visibility....340 39.3 Defining enter and exit animations....343 39.4 Animation specs and animation easing....344 39.5 Repeating an animation....346 39.6 Different animations for different children....346 39.7 Auto-starting an animation....347 39.8 Implementing crossfading....348 39.9 Summary....350 40. Compose State-Driven Animation....352 40.1 Understanding state-driven animation....352 40.2 Introducing animate as state functions....352 40.3 Creating the AnimateState project....353 40.4 Animating rotation with animateFloatAsState....353 40.5 Animating color changes with animateColorAsState....356 40.6 Animating motion with animateDpAsState....358 40.7 Adding spring effects....361 40.8 Working with keyframes....362 40.9 Combining multiple animations....363 40.10 Using the Animation Inspector....366 40.11 Summary....367 41. Canvas Graphics Drawing in Compose....368 41.1 Introducing the Canvas component....368 41.2 Creating the CanvasDemo project....368 41.3 Drawing a line and getting the canvas size....368 41.4 Drawing dashed lines....370 41.5 Drawing a rectangle....370 41.6 Applying rotation....374 41.7 Drawing circles and ovals....375 41.8 Drawing gradients....376 41.9 Drawing arcs....379 41.10 Drawing paths....380 41.11 Drawing points....381 41.12 Drawing an image....382 41.13 Drawing text....384 41.14 Summary....386 42. Working with ViewModels in Compose....388 42.1 What is Android Jetpack?....388 42.2 The “old” architecture....388 42.3 Modern Android architecture....388 42.4 The ViewModel component....388 42.5 ViewModel implementation using state....389 42.6 Connecting a ViewModel state to an activity....390 42.7 ViewModel implementation using LiveData....391 42.8 Observing ViewModel LiveData within an activity....392 42.9 Summary....392 43. A Compose ViewModel Tutorial....394 43.1 About the project....394 43.2 Creating the ViewModelDemo project....395 43.3 Adding the ViewModel....395 43.4 Accessing DemoViewModel from MainActivity....396 43.5 Designing the temperature input composable....397 43.6 Designing the temperature input composable....399 43.7 Completing the user interface design....401 43.8 Testing the app....403 43.9 Summary....403 44. An Overview of Android SQLite Databases....404 44.1 Understanding database tables....404 44.2 Introducing database schema ....404 44.3 Columns and data types ....404 44.4 Database rows ....405 44.5 Introducing primary keys ....405 44.6 What is SQLite?....405 44.7 Structured Query Language (SQL)....405 44.8 Trying SQLite on an Android Virtual Device (AVD)....406 44.9 The Android Room persistence library....408 44.10 Summary....408 45. Room Databases and Compose ....410 45.1 Revisiting modern app architecture....410 45.2 Key elements of Room database persistence....410 45.2.1 Repository....410 45.2.2 Room database....411 45.2.3 Data Access Object (DAO)....411 45.2.4 Entities....411 45.2.5 SQLite database....411 45.3 Understanding entities....412 45.4 Data Access Objects....414 45.5 The Room database....415 45.6 The Repository....416 45.7 In-Memory databases....417 45.8 Database Inspector....418 45.9 Summary....418 46. A Compose Room Database and Repository Tutorial....420 46.1 About the RoomDemo project....420 46.2 Creating the RoomDemo project....421 46.3 Modifying the build configuration....421 46.4 Building the entity....422 46.5 Creating the Data Access Object....423 46.6 Adding the Room database....424 46.7 Adding the repository....425 46.8 Adding the ViewModel....427 46.9 Designing the user interface....429 46.10 Writing a ViewModelProvider Factory class....431 46.11 Completing the MainScreen function....433 46.12 Testing the RoomDemo app....436 46.13 Using the Database Inspector....436 46.14 Summary....437 47. An Overview of Navigation in Compose....438 47.1 Understanding navigation....438 47.2 Declaring a navigation controller....440 47.3 Declaring a navigation host....440 47.4 Adding destinations to the navigation graph....440 47.5 Navigating to destinations....441 47.6 Passing arguments to a destination....443 47.7 Working with bottom navigation bars....444 47.8 Summary....446 48. A Compose Navigation Tutorial....448 48.1 Creating the NavigationDemo project....448 48.2 About the NavigationDemo project....448 48.3 Declaring the navigation routes....448 48.4 Adding the home screen....449 48.5 Adding the welcome screen....450 48.6 Adding the profile screen....451 48.7 Creating the navigation controller and host....452 48.8 Implementing the screen navigation....452 48.9 Passing the user name argument....453 48.10 Testing the project....454 48.11 Summary....456 49. A Compose Navigation Bar Tutorial....458 49.1 Creating the BottomBarDemo project....458 49.2 Declaring the navigation routes....458 49.3 Designing bar items....459 49.4 Creating the bar item list....459 49.5 Adding the destination screens....460 49.6 Creating the navigation controller and host....462 49.7 Designing the navigation bar....462 49.8 Working with the Scaffold component....464 49.9 Testing the project....465 49.10 Summary....465 50. Detecting Gestures in Compose....466 50.1 Compose gesture detection....466 50.2 Creating the GestureDemo project....466 50.3 Detecting click gestures....466 50.4 Detecting taps using PointerInputScope....468 50.5 Detecting drag gestures....469 50.6 Detecting drag gestures using PointerInputScope....471 50.7 Scrolling using the scrollable modifier....472 50.8 Scrolling using the scroll modifiers....473 50.9 Detecting pinch gestures....475 50.10 Detecting rotation gestures....476 50.11 Detecting translation gestures....477 50.12 Summary....478 51. An Introduction to Kotlin Flow....480 51.1 Understanding Flows....480 51.2 Creating the sample project....480 51.3 Adding a view model to the project....481 51.4 Declaring the flow....482 51.5 Emitting flow data....482 51.6 Collecting flow data as state....483 51.7 Transforming data with intermediaries....484 51.8 Collecting flow data....486 51.9 Adding a flow buffer....487 51.10 More terminal flow operators....488 51.11 Flow flattening....489 51.12 Combining multiple flows....491 51.13 Hot and cold flows....492 51.14 StateFlow....492 51.15 SharedFlow....493 51.16 Converting a flow from cold to hot....495 51.17 Summary....495 52. A Jetpack Compose SharedFlow Tutorial....496 52.1 About the project....496 52.2 Creating the SharedFlowDemo project....496 52.3 Adding a view model to the project....497 52.4 Declaring the SharedFlow....497 52.5 Collecting the flow values....498 52.6 Testing the SharedFlowDemo app....500 52.7 Handling flows in the background....500 52.8 Summary....502 53. Creating, Testing, and Uploading an Android App Bundle....504 53.1 The release preparation process....504 53.2 Android app bundles....504 53.3 Register for a Google Play Developer Console account....505 53.4 Configuring the app in the console....506 53.5 Enabling Google Play app signing....507 53.6 Creating a keystore file....507 53.7 Creating the Android app bundle....509 53.8 Generating test APK files....510 53.9 Uploading the app bundle to the Google Play Developer Console....511 53.10 Exploring the app bundle....512 53.11 Managing testers....513 53.12 Rolling the app out for testing....513 53.13 Uploading new app bundle revisions....514 53.14 Analyzing the app bundle file....515 53.15 Summary....515 54. An Overview of Android In-App Billing....518 54.1 Preparing a project for In-App purchasing....518 54.2 Creating In-App products and subscriptions....518 54.3 Billing client initialization....519 54.4 Connecting to the Google Play Billing library....520 54.5 Querying available products....520 54.6 Starting the purchase process....521 54.7 Completing the purchase....521 54.8 Querying previous purchases....522 54.9 Summary....523 55. An Android In-App Purchasing Tutorial....524 55.1 About the In-App purchasing example project....524 55.2 Creating the InAppPurchase project....524 55.3 Adding libraries to the project....524 55.4 Adding the App to the Google Play Store....525 55.5 Creating an In-App product....525 55.6 Enabling license testers....526 55.7 Creating a purchase helper class....527 55.8 Adding the StateFlow streams....528 55.9 Initializing the billing client....528 55.10 Querying the product....529 55.11 Handling purchase updates....530 55.12 Launching the purchase flow....530 55.13 Consuming the product....531 55.14 Restoring a previous purchase....531 55.15 Completing the MainActivity....532 55.16 Testing the app....534 55.17 Troubleshooting....536 55.18 Summary....537 56. Working with Compose Theming....538 56.1 Material Design 2 vs. Material Design 3....538 56.2 Material Design 3 theming....538 56.3 Building a custom theme....542 56.4 Summary....543 57. A Material Design 3 Theming Tutorial....544 57.1 Creating the ThemeDemo project....544 57.2 Designing the user interface....544 57.3 Building a new theme....546 57.4 Adding the theme to the project....547 57.5 Enabling dynamic colors....548 57.6 Summary....549 58. An Overview of Gradle in Android Studio....550 58.1 An overview of Gradle....550 58.2 Gradle and Android Studio....550 58.2.1 Sensible defaults....550 58.2.2 Dependencies....550 58.2.3 Build variants....551 58.2.4 Manifest entries....551 58.2.5 APK signing....551 58.2.6 ProGuard support....551 58.3 The Properties and Settings Gradle build files....551 58.4 The top-level gradle build file....552 58.5 Module level Gradle build files....553 58.6 Configuring signing settings in the build file....556 58.7 Running Gradle tasks from the command-line....557 58.8 Summary....557 Index....558

Описание

В этом материале разберём тему: book.

This book aims to teach you how to build Android applications using Jetpack Compose 1.3, Android Studio Flamingo (2022.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, and list components.

Other topics covered include data handling using state properties, key user interface design concepts such as modifiers, navigation bars, and user interface navigation. Additional chapters explore building your own reusable custom layout components.

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. Using in-app billing, you will also learn to generate extra revenue from your app.

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.

На этом основные моменты по теме закрыты.

android book compose studio also jetpack kotlin programming

Частые вопросы

Можно ли скачать «Jetpack Compose 1.3 Essentials: Developing Android Apps with Jetpack Compose 1.3, Android Studio, and Kotlin» бесплатно?

Да, «Jetpack Compose 1.3 Essentials: Developing Android Apps with Jetpack Compose 1.3, Android Studio, and Kotlin» доступна для бесплатного скачивания на нашем сайте в формате PDF. Ссылка на файл находится на этой странице.

В каком формате и какого размера файл?

Книга предоставляется в формате PDF, размер файла 5,3 МБ.

Кто автор и когда вышла книга?

автор — Smyth Neil, издательство Payload Media, Inc., год выпуска 2023, 575 страниц.

О чём книга «Jetpack Compose 1.3 Essentials: Developing Android Apps with Jetpack Compose 1.3, Android Studio, and Kotlin»?

This book aims to teach you how to build Android applications using Jetpack Compose 1.3, Android Studio Flamingo (2022.2.1), Material Design 3, and the Kotlin programming language.The book begins with the basics by explaining how to set up

Похожие материалы