Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
84 views34 pages

Android Studio Beginner Guide

The document introduces Android Studio, the official IDE for Android development, discussing how to download, open, and launch a new project in Android Studio along with an overview of the main views and how to create a simple class with getter and setter methods using code generation tools. It also demonstrates how to configure the emulator and run a simple "Hello World" app.

Uploaded by

vishal
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)
84 views34 pages

Android Studio Beginner Guide

The document introduces Android Studio, the official IDE for Android development, discussing how to download, open, and launch a new project in Android Studio along with an overview of the main views and how to create a simple class with getter and setter methods using code generation tools. It also demonstrates how to configure the emulator and run a simple "Hello World" app.

Uploaded by

vishal
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
You are on page 1/ 34

Android Studio - Introduction

Michael Pan
Why Android Studio
Most advanced IDE

Google Official support

Current version 0.51


Hi, I am Android Studio
Download
http://developer.android.com/sdk/installing/studio.html
Open & Launch
New Project
Blank Activity
Activity & Layout
Waiting
Overview
Project View
Editor View
Editor Tab - File name
Import folders & files

src/
main/
java/
res/
layout/
values/
AndroidManifest.xml
UI Layout - activity_record.xml
UILayout - Design
Design View Preview Hierarchy

Components

Attributes
Create a new Class - Project Window
Source
Record.java
public class Record {!
String description;!
int type;!
int cost;!
}
How about getter & setter
Android Studio Tool
Record.java
public class Record {!
String description;!
int type;!
int cost;!
!

public String getDescription() {!


return description;!
}!
!

public void setDescription(String description) {!


this.description = description;!
}!
}
Repeat steps on other fields
But how about naming convention
public class Record {!
String mDescription;!
int mType;!
int mCost;!
}
Getter & Setter Not good

public class Record {!


String mDescription;!
int mType;!
int mCost;!
!

public String getmDescription() {!


return mDescription;!
}!
!

public void setmDescription(String mDescription) {!


this.mDescription = mDescription;!
}!
}
Preferences - Code Style -> Java
Code Generation
Generate it again
public class Record {!
String mDescription;!
int mType;!
int mCost;!
!

public String getDescription() {!


return mDescription;!
}!
!

public void setDescription(String description) {!


mDescription = description;!
}!
}
Run the Emulator
Create Emulator first

Reference http://developer-s-note-blog.logdown.com/posts/98744-hello-
android-studio
Start Genymotion
Run the app
Hello World
開發者選項
設定

點擊 Build Number 7 次

出現開發者項⺫⽬目
USB Debugging Enable
Question

You might also like