⭐ 1. What is Android Studio?
Android Studio is a software development environment that helps us:
✔ Write Kotlin/Java code
✔ Design app screens (UI)
✔ Connect screens with logic
✔ Test apps on virtual/emulated devices
✔ Build APKs to run apps on a real phone
✔ Debug and fix errors
✔ Manage resources (images, icons, layouts)
It gives everything a developer needs in one software.
Think of Android Studio as:
“A complete workshop where you write, design, test, and publish your Android apps.”
⭐ 2. Why Use Android Studio?
It has built-in support for Kotlin (recommended language)
Easy UI designing with XML Layout Editor
Smart code suggestions (IntelliSense)
Virtual devices (emulators)
Tools to monitor performance (CPU, memory, network)
Built-in version control (Git)
Firebase and Google services integration
⭐ 3. Opening Android Studio — First Screen
When you open Android Studio, you see the Welcome Screen:
It contains:
1. New Project – create a new app
2. Open Project – open an existing app
3. Recent Projects – continue previously opened ones
4. Settings / Plugins
5. Learn Android Studio – documentation
⭐ 4. Creating a New Android Project
Steps:
1. Click New Project
2. Choose a template
(Empty Activity, Basic Activity, Login Screen, etc.)
3. Give project details:
o App Name
o Package Name
o Save Location
o Language → Kotlin
o Minimum SDK (Android version support)
4. Click Finish
Android Studio takes a few minutes to set everything up.
⭐ 5. Understanding the Android Studio UI
Once the project loads, several panels and tools appear.
Let’s explore them one by one.
🔹 A. Toolbar (Top Area)
Contains:
Run app ▶️
Debug mode
Device selection
AVD (Android Virtual Device) Manager
SDK Manager
Sync Project
Build options
It helps you quickly run and manage your app.
🔹 B. Project Panel (Left Side)
This is one of the MOST IMPORTANT areas.
Here you see all files of your app.
Switch the view to Android View (recommended for beginners).
The project is divided into:
⭐ 6. Project Structure Explained
Android apps follow a specific structure.
Let’s understand the most important parts:
📁 1. app (Main Module)
This contains all code and resources.
Inside app:
📁 manifests → [Link]
This file defines important things:
App name
Permissions (camera, internet, location)
First screen (launcher activity)
App icons
It is like the "identity card" of the app.
📁 java → Your Kotlin Files
You will find:
1. [Link] (main package)
This contains:
Activities
Fragments
ViewModels
Classes
Kotlin code logic
Example:
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
[Link](savedInstanceState)
setContentView([Link].activity_main)
}
}
📁 res (Resources Folder)
Contains everything related to UI.
Inside res/:
🖼 layout/
XML files defining the screens.
Example: activity_main.xml
You design UI with:
Buttons
TextView
EditText
Images
ConstraintLayout
LinearLayout
🎨 drawable/
Images, icons, shapes, backgrounds.
You store:
PNG / JPG images
Vector icons
Custom shape XML designs (rounded corners, gradients)
🎨 values/
Contains XML files like:
[Link] → App colors
[Link] → Themes
[Link] → App text
[Link] → Margins & sizes
Example [Link]:
<string name="app_name">MyFirstApp</string>
🖼 mipmap/
App launcher icons (for different screen densities).
⭐ 7. Editor Window (Center Area)
This is where you:
Write Kotlin code
Edit XML layout
View Design + Code side-by-side
Layout Editor has two views:
✔ Design View
Drag and drop buttons, text fields, images.
✔ Code View
Write XML manually.
⭐ 8. Component Tree (Right Side of Layout
Editor)
Shows UI elements in a hierarchy.
Example:
ConstraintLayout
├── TextView
└── Button
This makes it easy to select and modify elements.
⭐ 9. Properties Panel (Right Side)
Shows details of selected UI components:
Width / height
Margins
Text
Font size
Color
Constraints
You configure UI components here.
⭐ 10. Logcat (Bottom Panel)
A tool showing:
Logs
Errors
App crashes
Debug messages
Example:
Log.d("MainActivity", "App Started")
⭐ 11. AVD Manager (Android Virtual
Device)
This lets you create virtual phones to run apps on your computer.
You can choose:
Pixel phones
Samsung-like emulators
Android versions (Q, R, S, T)
⭐ 12. Running Your First App
Steps:
1. Click Run ▶️
2. Choose emulator or real device
3. Wait for build process
4. Your app appears on the screen!
⭐ 13. Important Files to Know
File Purpose
[Link] App logic (Kotlin)
activity_main.xml App UI
[Link] App declaration
[Link] Build settings
[Link] App text
[Link] Theme colors
⭐ 14. Understanding [Link]
This file includes:
SDK versions
App dependencies
Plugins
⭐ 15. Common Mistakes
❌ Deleting important folders
❌ Wrong layout constraints
❌ Ignoring error messages in Logcat
❌ Forgetting to sync Gradle
❌ Not selecting emulator before clicking Run
⭐ 16. Summary
✔ Android Studio is the main tool to build Android apps
✔ You design UI using XML layouts
✔ You write logic using Kotlin in Activities
✔ App files are organized in java/, res/, and manifest/
✔ Logcat shows errors
✔ Emulator lets you test apps
✅ 1. Difference Between Empty Activity and
Empty View Activity
These are project templates when creating a new Android app.
Feature Empty Activity Empty Views Activity
UI System Jetpack Compose (Modern UI) XML Layout System (Traditional UI)
UI Code Written In Kotlin only XML + Kotlin
Beginner Friendly ❌ Slightly harder ✅ Best for beginners
Layout File Created ❌ No XML layout ✅ Creates activity_main.xml
Industry Usage ✅ Modern apps ✅ Still very widely used
Drag & Drop UI ❌ Not available ✅ Available
📌 Empty Activity
Uses Jetpack Compose
UI is written directly in Kotlin
No activity_main.xml file is created
Example of UI code:
Text(text = "Hello World")
📌 Empty Views Activity
Uses XML layouts
UI is designed in activity_main.xml
Logic is in [Link]
This is best for learning UI basics
✅ 2. What Are Layouts in Android?
A layout defines:
✅ How your app screen looks
✅ Where buttons, text, images appear
✅ How UI elements are arranged
Layouts are written in XML and stored in:
res → layout → activity_main.xml
✅ 3. Major Types of Layouts in Android
These are the most important layout types:
⭐ 1. LinearLayout
Arranges items in one direction only:
Vertical OR Horizontal
<LinearLayout
android:orientation="vertical">
✅ Simple
✅ Good for small screens
❌ Not flexible for complex UI
⭐ 2. RelativeLayout
Positions views relative to each other
android:layout_below="@id/button1"
✅ More flexible than LinearLayout
✅ Good for medium UI designs
❌ Now mostly replaced by ConstraintLayout
⭐ 3. ConstraintLayout ✅ ✅ ✅ (MOST IMPORTANT)
Allows you to position views using constraints.
You can say:
Align left to parent
Below another view
Center of screen
✅ Best performance
✅ Best for complex designs
✅ Most used in real apps
✅ Drag & Drop supported
⭐ 4. FrameLayout
Used to stack views on top of each other.
✅ Used for:
Fragments
Video overlays
Background + foreground designs
⭐ 5. TableLayout
Arranges views in rows and columns like a table.
✅ Used for:
Forms
Timetables
❌ Rare in real apps now
✅ 4. Layout Comparison Summary
Layout Direction Usage
LinearLayout One direction Simple UI
RelativeLayout Relative positioning Medium UI
ConstraintLayout Constraints Best for all
FrameLayout Stacking Fragments
TableLayout Rows/Columns Forms
✅ Most recommended layout:
ConstraintLayout
✅ 5. What is [Link]?
The Manifest file is the brain of the app configuration.
It tells Android:
✅ What is this app?
✅ What does it contain?
✅ What is allowed to run?
✅ Who can access it?
✅ 6. What Do We Declare in [Link]?
Here is what we define using Manifest:
✅ 1. Application Info
App name
App icon
App theme
✅ 2. Activities (Screens)
Every screen must be declared:
<activity android:name=".MainActivity">
✅ 3. Launcher Screen
The first screen that opens when the app runs:
<intent-filter>
<action android:name="[Link]"/>
<category android:name="[Link]"/>
</intent-filter>
✅ 4. Permissions
Examples:
<uses-permission android:name="[Link]"/>
<uses-permission android:name="[Link]"/>
✅ 5. Minimum Android Version
<uses-sdk android:minSdkVersion="21"/>
✅ 6. Services, Receivers & Providers
Used for background features (advanced concepts)
✅ 7. Basic Purpose of Manifest (In Simple
Words)
📌 The Manifest file officially registers your app with Android.
📌 It tells the Android system:
Which screens exist
Which permissions the app wants
Which screen opens first
What hardware/features the app needs
✅ 8. Simple Example of a Manifest File
<manifest package="[Link]">
<uses-permission android:name="[Link]"/>
<application
android:allowBackup="true"
android:label="My App">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="[Link]"/>
<category android:name="[Link]"/>
</intent-filter>
</activity>
</application>
</manifest>
✅ 9. One-Line Student Summary
✅ Empty Activity → Jetpack Compose
✅ Empty Views Activity → XML Layout
✅ Layouts define UI design
✅ ConstraintLayout is best
✅ Manifest defines app identity, permissions, and screens
If you want, I can now also give you:
✔ Interview questions
✔ Student exercises with solutions
✔ Diagram-based explanation
✔ A quiz for class
Would you like practice exercises next? 😊