SlideShare a Scribd company logo
1 of 14
This work is licensed under the Apache 2.0 License
Compose Camp
Session 2
Google Developer Student Clubs
M.S.Bidve Engineering College Latur
This work is licensed under the Apache 2.0 License
Introduction to Kotlin
Installation of Android
Studio
How to build UI
This work is licensed under the Apache 2.0 License
This work is licensed under the Apache 2.0 License
Kotlin Programming
Language
Use Kotlin to start writing Android
apps.
Kotlin helps developers be more
productive
This work is licensed under the Apache 2.0 License
Write and run
kotlin code in the
browser.
Kotlin Playground
This work is licensed under the Apache 2.0 License
Program
A Series of instructions for a
computer to perform some action.
Fun main( ) {
println(“Hello, world!”)
}
Output
Hello, world!
This work is licensed under the Apache 2.0 License
Functions
A function is a segment of a program that performs a
specific task.
You can have many functions in your program or only a
single one.
Defining a function
Functions begin with the fun keyword.
fun displayIntroduction() {
}
This work is licensed under the Apache 2.0 License
https://developer.androi
d.com/
This work is licensed under the Apache 2.0 License
The User Interface (UI) for an Android app is built as a hierarchy of
layout and widgets.The layouts are viewGroup objects, containers
that control how their child views positioned on the screen.Widgets
are view objects, UI components such as buttons and text boxes.
How to build UI
This work is licensed under the Apache 2.0 License
Open the Layout Editor
To get started, set up your workspace
as follows:
1. In the project window, open app>res>layout>
Activity_main.xml.
2.To make room for the Layout Editor, hide the
Project window. To do so, select view>Tool windows>Project,
or just click Project on the left side of the Android Studio Screen.
3.If your editor shows the XML source,click the Design tab at the top right of the
window
4.click (Select Design Surface) and select Blueprint.
This work is licensed under the Apache 2.0 License
5.Click (View Options) in the Layout Editor toolbar and make sure that Show All
Constraints is checked.
6.Make sure Autoconnect is off. A tooltip in the toolbar displays (Enable Autoconnection
to Parent)
When Autoconnect is off.
7. Click (Default Margins) in the toolbar and select 16. If needed, you can adjust the
margins for each view later.
8. Click (Device for preview) in the toolbar and select 5.5, 1440 x 2560, 560 dpi (Pixel
XL).
This work is licensed under the Apache 2.0 License
1.In the Palette panel, click Buttons.
2.Drag the Button widget into the design editor and drop it near the right side.
3.Create a constraint from the left side of the button to the right side of the text box.
This work is licensed under the Apache 2.0 License
4.To constrain the views in a horizontal alignment, create a constraint
between the text baselines.To do so, right - click the button and then
select Show Baseline. The baseline anchor appears inside the button.
Click and hold this anchor,and then drag it to the baseline anchor that
appears in the adjacement text box.
Thank You!
M.S.Bidve Engineering College Latur

More Related Content

Similar to Jetpack Compose Session 2 (1).pptx

Android Study Jams - New to Programming [27th december]
Android Study Jams - New to Programming [27th december]Android Study Jams - New to Programming [27th december]
Android Study Jams - New to Programming [27th december]
PragatiVerma31
 

Similar to Jetpack Compose Session 2 (1).pptx (20)

Android Study Jams - Session 1
Android Study Jams - Session 1Android Study Jams - Session 1
Android Study Jams - Session 1
 
Android study jams
Android study jamsAndroid study jams
Android study jams
 
Compose Camp 1.pdf
Compose Camp 1.pdfCompose Camp 1.pdf
Compose Camp 1.pdf
 
Introduction of VS2012 IDE and ASP.NET Controls
Introduction of VS2012 IDE and ASP.NET ControlsIntroduction of VS2012 IDE and ASP.NET Controls
Introduction of VS2012 IDE and ASP.NET Controls
 
Compose Camp 1.pdf
Compose Camp 1.pdfCompose Camp 1.pdf
Compose Camp 1.pdf
 
Android software development – the first few hours
Android software development – the first few hoursAndroid software development – the first few hours
Android software development – the first few hours
 
Intro session kotlin
Intro session kotlinIntro session kotlin
Intro session kotlin
 
Android Study Jams - New to Programming [27th december]
Android Study Jams - New to Programming [27th december]Android Study Jams - New to Programming [27th december]
Android Study Jams - New to Programming [27th december]
 
Vit bhopal android study jams 2.0 session 1
Vit bhopal android study jams 2.0 session 1Vit bhopal android study jams 2.0 session 1
Vit bhopal android study jams 2.0 session 1
 
Android Study Jams Session 01
Android Study Jams Session 01Android Study Jams Session 01
Android Study Jams Session 01
 
Google DSC Android Study Jams Session 1
Google DSC Android Study Jams Session 1Google DSC Android Study Jams Session 1
Google DSC Android Study Jams Session 1
 
Getting started with android studio
Getting started with android studioGetting started with android studio
Getting started with android studio
 
ASJ Workshop - Introduction
ASJ Workshop - IntroductionASJ Workshop - Introduction
ASJ Workshop - Introduction
 
Final session 1
Final session 1Final session 1
Final session 1
 
DSC Android Study Jam
DSC Android Study JamDSC Android Study Jam
DSC Android Study Jam
 
How to develop a Flutter app.pdf
How to develop a Flutter app.pdfHow to develop a Flutter app.pdf
How to develop a Flutter app.pdf
 
Final NEWS.pdf
Final NEWS.pdfFinal NEWS.pdf
Final NEWS.pdf
 
Final NewsApp.pdf
Final NewsApp.pdfFinal NewsApp.pdf
Final NewsApp.pdf
 
Android Study Jam - Info Session
Android Study Jam - Info SessionAndroid Study Jam - Info Session
Android Study Jam - Info Session
 
Android Study Jam - Introduction
Android Study Jam - IntroductionAndroid Study Jam - Introduction
Android Study Jam - Introduction
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 

Jetpack Compose Session 2 (1).pptx

  • 1. This work is licensed under the Apache 2.0 License Compose Camp Session 2 Google Developer Student Clubs M.S.Bidve Engineering College Latur
  • 2. This work is licensed under the Apache 2.0 License Introduction to Kotlin Installation of Android Studio How to build UI
  • 3. This work is licensed under the Apache 2.0 License
  • 4. This work is licensed under the Apache 2.0 License Kotlin Programming Language Use Kotlin to start writing Android apps. Kotlin helps developers be more productive
  • 5. This work is licensed under the Apache 2.0 License Write and run kotlin code in the browser. Kotlin Playground
  • 6. This work is licensed under the Apache 2.0 License Program A Series of instructions for a computer to perform some action. Fun main( ) { println(“Hello, world!”) } Output Hello, world!
  • 7. This work is licensed under the Apache 2.0 License Functions A function is a segment of a program that performs a specific task. You can have many functions in your program or only a single one. Defining a function Functions begin with the fun keyword. fun displayIntroduction() { }
  • 8. This work is licensed under the Apache 2.0 License https://developer.androi d.com/
  • 9. This work is licensed under the Apache 2.0 License The User Interface (UI) for an Android app is built as a hierarchy of layout and widgets.The layouts are viewGroup objects, containers that control how their child views positioned on the screen.Widgets are view objects, UI components such as buttons and text boxes. How to build UI
  • 10. This work is licensed under the Apache 2.0 License Open the Layout Editor To get started, set up your workspace as follows: 1. In the project window, open app>res>layout> Activity_main.xml. 2.To make room for the Layout Editor, hide the Project window. To do so, select view>Tool windows>Project, or just click Project on the left side of the Android Studio Screen. 3.If your editor shows the XML source,click the Design tab at the top right of the window 4.click (Select Design Surface) and select Blueprint.
  • 11. This work is licensed under the Apache 2.0 License 5.Click (View Options) in the Layout Editor toolbar and make sure that Show All Constraints is checked. 6.Make sure Autoconnect is off. A tooltip in the toolbar displays (Enable Autoconnection to Parent) When Autoconnect is off. 7. Click (Default Margins) in the toolbar and select 16. If needed, you can adjust the margins for each view later. 8. Click (Device for preview) in the toolbar and select 5.5, 1440 x 2560, 560 dpi (Pixel XL).
  • 12. This work is licensed under the Apache 2.0 License 1.In the Palette panel, click Buttons. 2.Drag the Button widget into the design editor and drop it near the right side. 3.Create a constraint from the left side of the button to the right side of the text box.
  • 13. This work is licensed under the Apache 2.0 License 4.To constrain the views in a horizontal alignment, create a constraint between the text baselines.To do so, right - click the button and then select Show Baseline. The baseline anchor appears inside the button. Click and hold this anchor,and then drag it to the baseline anchor that appears in the adjacement text box.