0% found this document useful (0 votes)
2 views6 pages

Android Studio Complete Lecture Notes

The document provides a comprehensive overview of Android Studio, the official IDE for Android app development, detailing its features, interface, and project structure. It covers essential components such as activities, layouts, and UI elements, along with step-by-step instructions for creating a new project and connecting UI with Kotlin code. Additionally, it outlines a recommended learning path for students to effectively learn Android development.

Uploaded by

Tehreem Fatima
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views6 pages

Android Studio Complete Lecture Notes

The document provides a comprehensive overview of Android Studio, the official IDE for Android app development, detailing its features, interface, and project structure. It covers essential components such as activities, layouts, and UI elements, along with step-by-step instructions for creating a new project and connecting UI with Kotlin code. Additionally, it outlines a recommended learning path for students to effectively learn Android development.

Uploaded by

Tehreem Fatima
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

📘 Android Studio – Complete Lecture for Students

1. Introduction to Android Studio


What is Android Studio?
Android Studio is the official Integrated Development Environment (IDE) for Android
app development. It is based on IntelliJ IDEA and provides tools to design, develop,
test, and debug Android applications.

Why Android Studio?


 Officially supported by Google
 Built-in Android SDK
 Visual UI designer
 Emulator for testing
 Supports Kotlin, Java, XML, C++

2. Android Studio Interface (IDE Overview)


Main Parts of Android Studio
1. Toolbar
o Run ▶️app
o Stop 📘 app
o Build project
o Device selector (emulator/real device)
2. Project Window
o Shows files and folders
o Can switch views (Android / Project)
3. Editor Window
o Where you write code (Kotlin / XML)
4. Design Editor
o Visual UI builder for XML layouts
5. Logcat
o Shows app logs and errors
6. Status Bar
o Shows background tasks and progress
3. Creating a New Android Project (Step-by-Step)
1. Open Android Studio
2. Click New Project
3. Choose Empty Activity (Compose or Views)
4. Enter:
o App name
o Package name
o Language (Kotlin)
o Minimum SDK
5. Click Finish

4. Android Project Structure (Very Important)


Android View (Recommended for Beginners)
app/
├── manifests/
│ └── [Link]
├── java/
│ └── [Link]
│ └── [Link]
├── res/
│ ├── layout/
│ │ └── activity_main.xml
│ ├── drawable/
│ ├── values/
│ │ ├── [Link]
│ │ ├── [Link]
│ │ └── [Link]
└── Gradle Scripts/

Explanation of Important Files


[Link]
 Entry point of the app
 Declares activities and permissions
[Link]
 Kotlin file
 Controls app logic
activity_main.xml
 UI layout file
res/layout
 Stores UI XML files
res/drawable
 Images and shapes
res/values
 Colors, strings, styles

5. Activities and Layouts


Activity
An Activity represents a single screen in an app.
Example:
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
[Link](savedInstanceState)
setContentView([Link].activity_main)
}
}

Layout
Layouts define the UI structure using XML.

6. UI Elements (Views) in Android


What are UI Elements?
UI elements are components used to build the user interface, such as buttons, text
fields, images, etc.

Types of UI Elements
1. Text-based Views
2. Input Views
3. Button Views
4. Image Views
5. Layout Containers

7. Basic UI Elements (With XML Code)


1️⃣📘 TextView
Used to display text.
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello Android"
android:textSize="18sp" />

2️⃣📘 EditText
Used to take user input.
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter your name" />

3️⃣📘 Button
Used for user actions.
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Submit" />

4️⃣📘 ImageView
Displays images.
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_launcher_foreground" />

5️⃣📘 CheckBox
Multiple selections.
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Accept terms" />
6️⃣📘 RadioButton & RadioGroup
Single selection.
<RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<RadioButton
android:text="Male" />

<RadioButton
android:text="Female" />
</RadioGroup>

8. Layout Containers (Very Important)


Common Layout Types
1. LinearLayout – Arranges views in row or column
2. RelativeLayout – Positions views relative to others
3. ConstraintLayout – Modern, flexible layout (Recommended)

LinearLayout Example
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<TextView android:text="Welcome" />


<Button android:text="Click Me" />
</LinearLayout>

ConstraintLayout Example
<[Link]
android:layout_width="match_parent"
android:layout_height="match_parent">

<Button
android:id="@+id/btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Submit"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</[Link]>

9. Connecting UI with Kotlin Code


val button = findViewById<Button>([Link])
[Link] {
println("Button clicked")
}

10. Emulator and Running the App


1. Open Device Manager
2. Create Virtual Device
3. Select phone & Android version
4. Click 📘 Run

11. Summary for Students


 Android Studio is the main tool for Android apps
 XML defines UI
 Kotlin defines logic
 UI elements build screens
 Activities control behavior

12. Recommended Learning Path


1. Android Studio basics
2. Project structure
3. UI elements
4. Layouts
5. Event handling
6. Navigation

You might also like