JETPACK COMPOSE - Quick Start
JETPACK COMPOSE - Quick Start
Version: 2.0 - Date: 04.2021
About the Book
Content
Intention of this Book is to get you quickly started with Jetpack Compose. Jetpack Compose is declarative programming language for building user interface for Android Applications. It is based on Kotlin programming language and it is supported by Android Studio Integrated Development Environment (IDE) .
Standalone Tutorials
The core of this Book are standalone tutorials that explain different functionalities of KOTLIN Programming Language. Each tutorial contains minimum amount of code and text needed to explain specific functionality. Such simple examples allow full understanding of the functionality without any unnecessary distractions. This approach allows students to grasp presented concepts in a fast and efficient manner.
Theoretical Background
Where needed tutorials are preceded by chapters focusing on theoretical background. This way reader can fully understand functionalities explained in the subsequent chapters. But such chapters are in minority and of secondary importance because the main focus is on code examples.
Table of Contents
- 1. Quick Start
- 1.1 Android Studio
- 1.1.1 Install
- 1.1.2 Start
- 1.2 Create Application
- 1.2.1 Create Project
- 1.2.2 Create Android Virtual Device (AVD)
- 1.2.3 Setup Physical Device
- 1.2.4 Select Device
- 1.2.5 Run Application
- 2. Android Studio
- 2.1 Settings
- 2.1.1 Emulator: Enable Auto Rotate
- 2.1.2 Auto Import
- 2.1.3 Kotlin
- 2.1.4 XML
- 2.2 Commands
- 2.2.1 Emulator: Take Screenshot
- 2.2.2 Optimize Imports
- 3. View Operations
- 3.1 Basic Operations
- 3.1.1 Create Custom View
- 3.1.2 Create Custom View - In a separate File
- 3.1.3 Create Custom Container
- 3.1.4 Create Views using For Loop
- 3.1.5 Conditional View
- 3.1.6 Conditional View's Parameter
- 3.1.7 Conditional View's Modifier
- 3.1.8 State Variable
- 3.2 Advanced Operations
- 3.2.1 Custom .layout
- 3.2.2 Custom Layout
- 3.2.3 Custom Navigation - Basic
- 3.2.4 Custom Navigation - Stack
- 3.2.5 Composable as Function Parameter
- 4. View Types
- 4.1 Visible Views
- 4.1.1 Button
- 4.1.2 Image
- 4.1.3 Text
- 4.2 Container Views
- 4.2.1 Column
- 4.2.2 LazyColumnFor
- 4.2.3 LazyRowFor
- 4.2.4 MaterialTheme
- 4.2.5 Row
- 4.2.6 Box
- 4.2.7 ScrollableColumn
- 4.2.8 ScrollableRow
- 4.2.9 Surface
- 4.3 Helper Views
- 4.3.1 Divider
- 4.3.2 Spacer
- 4.4 Navigation Views
- 4.4.1 BottomDrawerLayout
- 4.4.2 ModalDrawerLayout
- 4.4.3 TabRow
- 4.5 Geometrical Shapes (Canvas)
- 4.5.1 drawArc
- 4.5.2 drawCircle
- 4.5.3 drawLine
- 4.5.4 drawOval
- 4.5.5 drawRect
- 4.5.6 drawRoundRect
- 4.5.7 drawPoints - Lines
- 4.5.8 drawPoints - Points
- 4.5.9 drawPoints - Polygon
- 4.5.10 drawPath
- 5. View Modifiers
- 5.1 Common
- 5.1.1 .background
- 5.1.2 .border
- 5.1.3 .clip
- 5.1.4 .clickable
- 5.1.5 .offset
- 5.1.6 .padding
- 5.2 Dimensions
- 5.2.1 .size
- 5.2.2 .width
- 5.2.3 .height
- 5.2.4 .fillMaxSize
- 5.2.5 .fillMaxWidth
- 5.2.6 .fillMaxHeight
- 5.2.7 .weight
- 6. Errors
- 6.1 Run: INSTALL_FAILED_OLDER_SDK
- 6.2 Run: Expected minSdkVersion >= 21 but found 1
- 6.3 Emulator: Content doesn't rotate with Emulator
- 6.4 Type mismatch: Required () → Unit
- 7. Appendix
- 7.1 Declarative vs Imperative Language
- 7.2 Compose vs SwiftUI
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them