SlideShare a Scribd company logo
1 of 12
This work is licensed under the Apache 2.0 License
Repose with
jetpack
compose
This work is licensed under the Apache 2.0 License
What is Jetpack Compose?
Jetpack Compose is a modern toolkit for building
Android UIs. Compose simplifies and accelerates UI
development on Android with less code, powerful
tools, and intuitive Kotlin capabilities.
This work is licensed under the Apache 2.0 License
Composable functions
Composable functions are the basic
building block of a UI in Compose. A
composable function:
1) Describes some part of your UI.
2) Doesn't return anything.
3) Takes some input and generates
what's shown on the screen.
4) Might emit several UI elements.
This work is licensed under the Apache 2.0 License
Example of a composable function
@Composable
fun Greeting(name: String) {
Text(text = "Hello $name!")
}
This work is licensed under the Apache 2.0 License
UI Hierarchy
The UI hierarchy is based on containment, meaning one component can contain one or
more components, and the terms parent and child are sometimes used.
This work is licensed under the Apache 2.0 License
The three basic, standard layout elements in Compose are Column, Row and Box
composables.
This work is licensed under the Apache 2.0 License
Box layout is one of the standard layout elements in Compose. Use Box layout to stack
elements on top of one another. Box layout also lets you configure the specific
alignment of the elements that it contains.
This work is licensed under the Apache 2.0 License
Modifiers
Modifiers are used to decorate or add behavior to Jetpack Compose UI elements. For
example, you can add backgrounds, padding or behavior to rows, text, or buttons. To
set them, a composable needs to accept a modifier as a parameter.
For example, this Text composable has a Modifier argument that changes the
background color to green.
Text(
text = "Hello, World!",
// Solid element background color
modifier = Modifier.background(color = Color.Green)
)
This work is licensed under the Apache 2.0 License
Padding
A UI element wraps itself around its content. To prevent it from wrapping too tightly, you
can specify the amount of padding on each side.
This work is licensed under the Apache 2.0 License
Padding is used as a modifier, which means that you can apply it to any composable.
For each side of the composable, the padding modifier takes an optional argument that
defines the amount of padding.
This work is licensed under the Apache 2.0 License
Scan the QR
Code to RSVP
This work is licensed under the Apache 2.0 License
Q & A

More Related Content

Similar to Day 2.pptx

Introduction to the INTEGRAL FRAMEWORK
Introduction to the INTEGRAL FRAMEWORKIntroduction to the INTEGRAL FRAMEWORK
Introduction to the INTEGRAL FRAMEWORK
Karthik Subramanian
 
Asp.Net 2.0 Presentation
Asp.Net 2.0 PresentationAsp.Net 2.0 Presentation
Asp.Net 2.0 Presentation
sasidhar
 

Similar to Day 2.pptx (20)

Session-1 edited.pptx
Session-1 edited.pptxSession-1 edited.pptx
Session-1 edited.pptx
 
Compose Camp S1.pptx
Compose Camp S1.pptxCompose Camp S1.pptx
Compose Camp S1.pptx
 
Introduction to compose camps.pdf
Introduction to compose camps.pdfIntroduction to compose camps.pdf
Introduction to compose camps.pdf
 
Compose Camp 2.pdf
Compose Camp 2.pdfCompose Camp 2.pdf
Compose Camp 2.pdf
 
Compose Camp.pdf
Compose Camp.pdfCompose Camp.pdf
Compose Camp.pdf
 
Compose Camp: Introduction to Kotlin.pptx
Compose Camp: Introduction to Kotlin.pptxCompose Camp: Introduction to Kotlin.pptx
Compose Camp: Introduction to Kotlin.pptx
 
Google Compose Camp Session 3.pptx.pdf
Google Compose Camp Session 3.pptx.pdfGoogle Compose Camp Session 3.pptx.pdf
Google Compose Camp Session 3.pptx.pdf
 
COMPOSE CAMP SESSION 4.pdf
COMPOSE CAMP SESSION 4.pdfCOMPOSE CAMP SESSION 4.pdf
COMPOSE CAMP SESSION 4.pdf
 
Diving deep in compose.pdf
Diving deep in compose.pdfDiving deep in compose.pdf
Diving deep in compose.pdf
 
Compose Camp Slide Deck Template.pptx
Compose Camp Slide Deck Template.pptxCompose Camp Slide Deck Template.pptx
Compose Camp Slide Deck Template.pptx
 
Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)
 
David Rey Lessons Learned Updating Content Licensing To Be Plone 3 Compat...
David Rey   Lessons Learned   Updating Content Licensing To Be Plone 3 Compat...David Rey   Lessons Learned   Updating Content Licensing To Be Plone 3 Compat...
David Rey Lessons Learned Updating Content Licensing To Be Plone 3 Compat...
 
Compose Camp.pptx
Compose Camp.pptxCompose Camp.pptx
Compose Camp.pptx
 
Android Study Jam 2
Android Study Jam 2Android Study Jam 2
Android Study Jam 2
 
Copy of Compose Camp _ Looking through the view.pptx
Copy of Compose Camp _ Looking through the view.pptxCopy of Compose Camp _ Looking through the view.pptx
Copy of Compose Camp _ Looking through the view.pptx
 
Compose Camp Day 3.pptx
Compose Camp Day 3.pptxCompose Camp Day 3.pptx
Compose Camp Day 3.pptx
 
Introduction to the INTEGRAL FRAMEWORK
Introduction to the INTEGRAL FRAMEWORKIntroduction to the INTEGRAL FRAMEWORK
Introduction to the INTEGRAL FRAMEWORK
 
Introduction to the integral framework
Introduction to the integral frameworkIntroduction to the integral framework
Introduction to the integral framework
 
Getting Started with Adobe AIR 1.5
Getting Started with Adobe AIR 1.5Getting Started with Adobe AIR 1.5
Getting Started with Adobe AIR 1.5
 
Asp.Net 2.0 Presentation
Asp.Net 2.0 PresentationAsp.Net 2.0 Presentation
Asp.Net 2.0 Presentation
 

More from AkankshaPathak42 (11)

Flutter (1).pdf
Flutter (1).pdfFlutter (1).pdf
Flutter (1).pdf
 
Web.pdf
Web.pdfWeb.pdf
Web.pdf
 
API 101 event.pdf
API 101 event.pdfAPI 101 event.pdf
API 101 event.pdf
 
NLP with TensorFlow.pdf
NLP with TensorFlow.pdfNLP with TensorFlow.pdf
NLP with TensorFlow.pdf
 
Hacktober 2022.pptx
Hacktober 2022.pptxHacktober 2022.pptx
Hacktober 2022.pptx
 
Day3.pptx
Day3.pptxDay3.pptx
Day3.pptx
 
Introduction to KOTLIN.pptx
Introduction to KOTLIN.pptxIntroduction to KOTLIN.pptx
Introduction to KOTLIN.pptx
 
ANDROID info session.pdf
ANDROID info session.pdfANDROID info session.pdf
ANDROID info session.pdf
 
GDSC Mescoe -Info session.pdf
GDSC Mescoe -Info session.pdfGDSC Mescoe -Info session.pdf
GDSC Mescoe -Info session.pdf
 
Getting Started with AI&ML on Azure.pptx
Getting Started with AI&ML on Azure.pptxGetting Started with AI&ML on Azure.pptx
Getting Started with AI&ML on Azure.pptx
 
ML Kit , Cloud FF GDSC MESCOE.pdf
ML Kit , Cloud FF GDSC MESCOE.pdfML Kit , Cloud FF GDSC MESCOE.pdf
ML Kit , Cloud FF GDSC MESCOE.pdf
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Recently uploaded (20)

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 

Day 2.pptx

  • 1. This work is licensed under the Apache 2.0 License Repose with jetpack compose
  • 2. This work is licensed under the Apache 2.0 License What is Jetpack Compose? Jetpack Compose is a modern toolkit for building Android UIs. Compose simplifies and accelerates UI development on Android with less code, powerful tools, and intuitive Kotlin capabilities.
  • 3. This work is licensed under the Apache 2.0 License Composable functions Composable functions are the basic building block of a UI in Compose. A composable function: 1) Describes some part of your UI. 2) Doesn't return anything. 3) Takes some input and generates what's shown on the screen. 4) Might emit several UI elements.
  • 4. This work is licensed under the Apache 2.0 License Example of a composable function @Composable fun Greeting(name: String) { Text(text = "Hello $name!") }
  • 5. This work is licensed under the Apache 2.0 License UI Hierarchy The UI hierarchy is based on containment, meaning one component can contain one or more components, and the terms parent and child are sometimes used.
  • 6. This work is licensed under the Apache 2.0 License The three basic, standard layout elements in Compose are Column, Row and Box composables.
  • 7. This work is licensed under the Apache 2.0 License Box layout is one of the standard layout elements in Compose. Use Box layout to stack elements on top of one another. Box layout also lets you configure the specific alignment of the elements that it contains.
  • 8. This work is licensed under the Apache 2.0 License Modifiers Modifiers are used to decorate or add behavior to Jetpack Compose UI elements. For example, you can add backgrounds, padding or behavior to rows, text, or buttons. To set them, a composable needs to accept a modifier as a parameter. For example, this Text composable has a Modifier argument that changes the background color to green. Text( text = "Hello, World!", // Solid element background color modifier = Modifier.background(color = Color.Green) )
  • 9. This work is licensed under the Apache 2.0 License Padding A UI element wraps itself around its content. To prevent it from wrapping too tightly, you can specify the amount of padding on each side.
  • 10. This work is licensed under the Apache 2.0 License Padding is used as a modifier, which means that you can apply it to any composable. For each side of the composable, the padding modifier takes an optional argument that defines the amount of padding.
  • 11. This work is licensed under the Apache 2.0 License Scan the QR Code to RSVP
  • 12. This work is licensed under the Apache 2.0 License Q & A