The document summarizes an Android study jam session that covered basic Android concepts like layouts, XML, and Gradle. It included a session outline discussing these topics, code reviews of two sample apps, and a Q&A period. Layouts define the app's user interface structure using views and view groups. XML is used to store and organize UI data and includes layout files, manifests, strings, and more. Gradle is Android's build system and contains build.gradle files that automate building, testing, and deployment.
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
Android Study Jams Session 2 - Layouts XML Gradle Code Review
1. This work is licensed under the Apache 2.0 License
Android Study Jams
Session 2 - 24th Dec 2021
Rishi Balamurugan, Facilitator
Pranshu Aggarwal, Mentor
GDSC Shiv Nadar University
2. This work is licensed under the Apache 2.0 License
Session Outline:
● Basic concepts overview
○ Layouts
○ XML
○ Gradle
● Code Review
○ Tiptime
○ Affirmations
● Q & A
3. This work is licensed under the Apache 2.0 License
Some important concepts
4. This work is licensed under the Apache 2.0 License
Layouts
● Defines the structure for user interface
● Consists of views and viewgroups
● Can be declared in two ways:
○ Declare in XML
○ Instantiate at runtime
5. This work is licensed under the Apache 2.0 License
● XML stands for Extended Markup
Language.
● It’s mainly used to describe data
● Uses
● Used to store and organize UI-related
data in Android dev
XML
Empty XML tag
Example XML
6. This work is licensed under the Apache 2.0 License
● Layout files
● Android Manifest file
● Strings file
● Theme
● Drawable
● Colors
Different types of XML in Android:
7. This work is licensed under the Apache 2.0 License
Gradle is a build system that is used to
automate building, testing, deployment, etc.
Main modules:
● Top-level build.gradle
● Module-level build.gradle
● settings.gradle
● gradle.properties and local.properties
Gradle:
9. Which of the following can
be considered as a View?
ⓘ Start presenting to display the poll results on this slide.
10. What does a gradle do?
ⓘ Start presenting to display the poll results on this slide.
11. This work is licensed under the Apache 2.0 License
Code Review
12. Audience Q&A Session
ⓘ Start presenting to display the audience questions on this slide.
13. This work is licensed under the Apache 2.0 License
THANK YOU
and have fun helping your communities
become Android developers!
Editor's Notes
How are you doing today? Give thumbs up or say in chat
Q&A at end, feel free to put questions in the chat
Pranshu will address them
Ppl with coding experience have patience
Ppl without, go thru course and recording
What I’m gonna discuss is compiled info and it’ll take some time to find on course and net
UI in activity
A View usually draws something the user can see and interact with.
Viewgroup - multiple view; layout
Declare UI elements in XML. straightforward vocabulary that corresponds to the View classes and subclasses
Android Studio's Layout Editor - drag & drop
Instantiate layout elements at runtime. Create objects programmatically.
OOPS instantiate
tags not predefined (define, implement)
Three types of tags: open, close, empty
Element between open & close tags
Only contains tags, need to be invoked when implementing
Helps in separating UI from logic
Simplified text view; tag start, end; attribute;
aka empty tag
Few set of rules, very simple, info on net
Seems like a lot of info to take in, but is much simpler
You would have already learnt about this through the course
It might seem like a lot of info, but you’ll slowly get used to it
Manifest: Describes essential info; package name, components like activities, etc
Permissions; coz android user security is priority; It asks for info upfront
Strings: Contains texts for all the TextView widgets;
different languages; replace all hardcoded text in the entire app
Theme: Defines the base, customized themes & styles for UI
Styles can customize how the views or widgets look on the UI
Drawable: Provide graphics to elements like custom background for the buttons and its ripple effects;
Various gradients can also be created. This also holds the vector graphics like icons.
Except manifest, others are in res folder
Generating an apk. Takes all the source files (java and XML) and applies appropriate tools, e.g., converts the java files into dex files and compresses into apk
Dex files are just an intermediate file type before apk
Top: function is to define the build configurations that will be applied to all the modules in the project
Module: dependencies are defined and where the SDK versions are declared; specify app id;
Sdk version is another name for android version; min and target
Settings.gradle: located in the root project directory; tells Gradle which modules it should include when building your app
include ‘:app’
Properties: wont use much; specifies settings for gradle itself
📣 This is Slido interaction slide, please don't delete it.✅ Click on 'Present with Slido' and the joining instructions will appear when you get to this slide.
📣 This is Slido interaction slide, please don't delete it.✅ Click on 'Present with Slido' and the poll will launch automatically when you get to this slide.
📣 This is Slido interaction slide, please don't delete it.✅ Click on 'Present with Slido' and the poll will launch automatically when you get to this slide.
📣 This is Slido interaction slide, please don't delete it.✅ Click on 'Present with Slido' and the questions from your audience will appear when you get to this slide.