Introduction to Android Studio

3,321 views

Published on

Michael's Android Lesson

Published in: Technology
0 Comments
8 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,321
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
508
Comments
0
Likes
8
Embeds 0
No embeds

No notes for slide

Introduction to Android Studio

  1. 1. Android Studio - Introduction Michael Pan
  2. 2. Why Android Studio Most advanced IDE Google Official support Current version 0.51 Hi, I am Android Studio
  3. 3. Download http://developer.android.com/sdk/installing/studio.html
  4. 4. Open & Launch
  5. 5. New Project
  6. 6. Blank Activity
  7. 7. Activity & Layout
  8. 8. Waiting
  9. 9. Overview
  10. 10. Project View
  11. 11. Editor View
  12. 12. Editor Tab - File name
  13. 13. Import folders & files src/ main/ java/ res/ layout/ values/ AndroidManifest.xml
  14. 14. UI Layout - activity_record.xml
  15. 15. UILayout - Design
  16. 16. Design View Components Preview Hierarchy Attributes
  17. 17. Create a new Class - Project Window
  18. 18. Source
  19. 19. Record.java public class Record {! String description;! int type;! int cost;! }
  20. 20. How about getter & setter Android Studio Tool
  21. 21. Record.java public class Record {! String description;! int type;! int cost;! ! public String getDescription() {! return description;! }! ! public void setDescription(String description) {! this.description = description;! }! }
  22. 22. Repeat steps on other fields
  23. 23. But how about naming convention public class Record {! String mDescription;! int mType;! int mCost;! }
  24. 24. Getter & Setter public class Record {! String mDescription;! int mType;! int mCost;! ! public String getmDescription() {! return mDescription;! }! ! public void setmDescription(String mDescription) {! this.mDescription = mDescription;! }! } Not good
  25. 25. Preferences - Code Style -> Java
  26. 26. Code Generation
  27. 27. Generate it again public class Record {! String mDescription;! int mType;! int mCost;! ! public String getDescription() {! return mDescription;! }! ! public void setDescription(String description) {! mDescription = description;! }! }
  28. 28. Run the Emulator Create Emulator first Reference http://developer-s-note-blog.logdown.com/posts/98744-hello- android-studio
  29. 29. Start Genymotion
  30. 30. Run the app
  31. 31. Hello World
  32. 32. 開發者選項 設定 點擊 Build Number 7 次 出現開發者項⺫⽬目
  33. 33. USB Debugging Enable
  34. 34. Question

×