SlideShare a Scribd company logo
1 of 36
行動APP開發管理實務
Android Studio Overview and Practice
尹君耀 Xavier Yin
Outline
 Environment
 Android Studio Overview
 Project Structure
 The First Android App
Environment
 JDK
– Download JDK (or from Oracle)
– Installation and Environment Variable Settings
 JAVA_HOME
 PATH
 Installation result on cmd
 Android SDK and Studio
– Download Android SDK and Studio (or from Android Developer)
– Installation
 Launch the .exe file you just downloaded
 Follow the setup wizard
Android SDK
 Platform-tools folder
– Adb(Android Debug Bridge) instructions
 devices: Prints a list of all attached emulator/device instances.
 logcat: Prints log data to the screen.
 push: Copies a specified file from an emulator/device instance to your
development computer
 pull: Copies a specified file from your development computer to an
emulator/device instance.
 Tools folder
 Android
– avd: Launch the AVD Manager
– sdk: Launch the Android SDK Manager
Devices
 Real Devices
– With USB
 Android Emulator
– android avd
 Genymotion
– Plugin
Android Studio Overview
 Interface
Android Studio Overview
 Interface
– Tool bar
Android Studio Overview
 Interface
– Tool bar
– Navigation bar
Android Studio Overview
 Interface
– Tool bar
– Navigation bar
– Project structure
Android Studio Overview
 Interface
– Tool bar
– Navigation bar
– Project structure
– Code editor
Android Studio Overview
 Features
– Flexible Gradle-based build system
– Build variants and multiple apk file generation
– Code templates to help you build common app features
– Rich layout editor with support for drag and drop theme editing
– lint tools to catch performance, usability, version compatibility, and
other problems
– And much more
Android Studio Overview
 Details
– Auto Complete
– Build Variants
– Productivity Guild
– Multi Devices Debug
– Layout Preview for Multi Devices
– Plugins
– Code Template
– Layout Tools Attributes
– Resource Preview
– And much more
Android Studio Overview
 Details
– Auto Complete
– Build Variants
– Productivity Guild
– Multi Devices Debug
– Layout Preview for Multi Devices
– Plugins
– Code Template
– Layout Tools Attributes
– Resource Preview
– And much more
Android Studio Overview
 Details
– Auto Complete
– Build Variants
– Productivity Guild
– Multi Devices Debug
– Layout Preview for Multi Devices
– Plugins
– Code Template
– Layout Tools Attributes
– Resource Preview
– And much more
Android Studio Overview
 Details
– Auto Complete
– Build Variants
– Productivity Guild
– Multi Devices Debug
– Layout Preview for Multi Devices
– Plugins
– Code Template
– Layout Tools Attributes
– Resource Preview
– And much more
Android Studio Overview
 Details
– Auto Complete
– Build Variants
– Productivity Guild
– Multi Devices Debug
– Layout Preview for Multi Devices
– Plugins
– Code Template
– Layout Tools Attributes
– Resource Preview
– And much more
Android Studio Overview
 Details
– Auto Complete
– Build Variants
– Productivity Guild
– Multi Devices Debug
– Layout Preview for Multi Devices
– Plugins
– Code Template
– Layout Tools Attributes
– Resource Preview
– And much more
Android Studio Overview
 Details
– Auto Complete
– Build Variants
– Productivity Guild
– Multi Devices Debug
– Layout Preview for Multi Devices
– Plugins
– Code Template
– Layout Tools Attributes
– Resource Preview
– And much more
Android Studio Overview
 Details
– Auto Complete
– Build Variants
– Productivity Guild
– Multi Devices Debug
– Layout Preview for Multi Devices
– Plugins
– Code Template
– Layout Tools Attributes
– Resource Preview
– And much more
Android Studio Overview
 Details
– Auto Complete
– Build Variants
– Productivity Guild
– Multi Devices Debug
– Layout Preview for Multi Devices
– Plugins
– Code Template
– Layout Tools Attributes
– Resource Preview
– And much more
Android Studio Overview
 Details
– Auto Complete
– Build Variants
– Productivity Guild
– Multi Devices Debug
– Layout Preview for Multi Devices
– Plugins
– Code Template
– Layout Tools Attributes
– Resource Preview
– And much more
Android Studio Overview
 Details
– Auto Complete
– Build Variants
– Productivity Guild
– Multi Devices Debug
– Layout Preview for Multi Devices
– Plugins
– Code Template
– Layout Tools Attributes
– Resource Preview
– And much more
Project Structure
 /app
– /src
 /main/java
– /your_package_name (ex: /com/tku/android -> com.tku.android)
 Java files
– AndroidManifest.xml
 /androidTest(For Android Test)
– /java/your_package_name
 Test cases
 /res
– /drawable
– /layout
– /values
 colors.xml, dimens.xml, strings.xml, styles.xml…etc.
 build.gradle
Resources
 Drawable
– A drawable resource is a general concept for a graphic that can be
drawn to the scree.
 values
– strings: A string resource provides text strings for your application with
optional text styling and formatting.
– colors: A ColorStateList is an object you can define in XML that you can
apply as a color, but will actually change colors, depending on the state of
the View object to which it is applied.
– styles: A style resource defines the format and look for a UI.
– dimens: A dimension is specified with a number followed by a unit of
measure.
App Manifest
 Manifest file
– The manifest file presents essential information about your app to the
Android system, information the system must have before it can run
any of the app's code.
 Permission
– A basic Android application has no permissions associated with it by
default, meaning it cannot do anything that would adversely impact
the user experience or any data on the device.
– To make use of protected features of the device, you must include in
your AndroidManifest.xml one or more <uses-permission> tags
declaring the permissions that your application needs.
App Manifest
App Manifest
App Manifest
Dimens
 DPI (Dots Per Inch)
– The quantity of pixels within a physical area of the screen; usually
referred to as dpi (dots per inch).
Dimens
 PX, DPI and DP(DIP)
– Icon size = 160px
 MDPI -> 160px/160dpi = 1 inch
 XHDPI -> 160px/320dpi = 0.5 inch
– Icon size = 160dp -> px = dp * (dpi / 160 )
 MDPI -> px = 160 * ( 160dpi / 160dpi ) , px = 160
 XHDPI -> px = 160 * ( 320dpi / 160dpi) , px = 320
Dimens
 Suggestions
– Because it's important that you design and implement your layouts for
multiple densities, the guidelines below and throught the
documentation refer to layout dimensions with dp measurements
instead of pixels.
– Similarly, you should prefer the sp (scale-independent pixel) to define
text sizes. The sp scale factor depends on a user setting and the system
scales the size the same as it does for dp.
The First Android App
 Requirements
The First Android App
 Requirements 10dp
10dp
#FFEFAAE5
The First Android App
 Create a new project
– Empty project
 Define resources that you need
– Colors.xml, dimens.xml, strings.xml, styles.xml, drawable
 Prepare Layout files
– Add Android Resource Directory named layout within res folder
– Add a layout.xml
 LinearLayout
The First Android App
 Bind the above files with your java files
– Activity
 SetContentView()
 FindViewById()
 Define App Manifest file
– Intent
– Intent-filter
 Launch your App in a device
Sample Code and Slides
 Slides
– Slideshare
 Sample Code
– https://github.com/xavier0507/TKUSampleCode.git

More Related Content

What's hot

Разработка приложений для Android Honeycomb: ActionBar & Fragments
Разработка приложений для Android Honeycomb: ActionBar & FragmentsРазработка приложений для Android Honeycomb: ActionBar & Fragments
Разработка приложений для Android Honeycomb: ActionBar & FragmentsAlexey Ustenko
 
Swing !!! y shikhar!!
Swing !!! y shikhar!!Swing !!! y shikhar!!
Swing !!! y shikhar!!shikhar199
 
Tku-行動app開發管理實務-如何開發Android應用程式
Tku-行動app開發管理實務-如何開發Android應用程式Tku-行動app開發管理實務-如何開發Android應用程式
Tku-行動app開發管理實務-如何開發Android應用程式Xavier Yin
 
Day: 2 Environment Setup for Android Application Development
Day: 2 Environment Setup for Android Application DevelopmentDay: 2 Environment Setup for Android Application Development
Day: 2 Environment Setup for Android Application DevelopmentAhsanul Karim
 
What's new in android jakarta gdg (2015-08-26)
What's new in android   jakarta gdg (2015-08-26)What's new in android   jakarta gdg (2015-08-26)
What's new in android jakarta gdg (2015-08-26)Google
 
View groups containers
View groups containersView groups containers
View groups containersMani Selvaraj
 

What's hot (9)

Android tools
Android toolsAndroid tools
Android tools
 
AndroidManifest
AndroidManifestAndroidManifest
AndroidManifest
 
Разработка приложений для Android Honeycomb: ActionBar & Fragments
Разработка приложений для Android Honeycomb: ActionBar & FragmentsРазработка приложений для Android Honeycomb: ActionBar & Fragments
Разработка приложений для Android Honeycomb: ActionBar & Fragments
 
Swing !!! y shikhar!!
Swing !!! y shikhar!!Swing !!! y shikhar!!
Swing !!! y shikhar!!
 
Tku-行動app開發管理實務-如何開發Android應用程式
Tku-行動app開發管理實務-如何開發Android應用程式Tku-行動app開發管理實務-如何開發Android應用程式
Tku-行動app開發管理實務-如何開發Android應用程式
 
Day: 2 Environment Setup for Android Application Development
Day: 2 Environment Setup for Android Application DevelopmentDay: 2 Environment Setup for Android Application Development
Day: 2 Environment Setup for Android Application Development
 
What's new in android jakarta gdg (2015-08-26)
What's new in android   jakarta gdg (2015-08-26)What's new in android   jakarta gdg (2015-08-26)
What's new in android jakarta gdg (2015-08-26)
 
Android xml-based layouts-chapter5
Android xml-based layouts-chapter5Android xml-based layouts-chapter5
Android xml-based layouts-chapter5
 
View groups containers
View groups containersView groups containers
View groups containers
 

Similar to 行動App開發管理實務 unit1

Android installation guide
Android installation guideAndroid installation guide
Android installation guidemagicshui
 
Titanium Studio [Updated - 18/12/2011]
Titanium Studio [Updated - 18/12/2011]Titanium Studio [Updated - 18/12/2011]
Titanium Studio [Updated - 18/12/2011]Sentinel Solutions Ltd
 
Module-I_Introduction-to-Android.pptx
Module-I_Introduction-to-Android.pptxModule-I_Introduction-to-Android.pptx
Module-I_Introduction-to-Android.pptxlancelotlaytan1996
 
Android Programming made easy
Android Programming made easyAndroid Programming made easy
Android Programming made easyLars Vogel
 
Android For Java Developers
Android For Java DevelopersAndroid For Java Developers
Android For Java DevelopersMike Wolfson
 
Developing for Android-Types of Android Application
Developing for Android-Types of Android ApplicationDeveloping for Android-Types of Android Application
Developing for Android-Types of Android ApplicationNandini Prabhu
 
Industrial Training in Android Application
Industrial Training in Android ApplicationIndustrial Training in Android Application
Industrial Training in Android ApplicationArcadian Learning
 
9780134433646 annuzzi ch02 (1)
9780134433646 annuzzi ch02 (1)9780134433646 annuzzi ch02 (1)
9780134433646 annuzzi ch02 (1)Peter Mburu
 
Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programmingPERKYTORIALS
 
.NET Recommended Resources
.NET Recommended Resources.NET Recommended Resources
.NET Recommended ResourcesGreg Sohl
 
Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11 Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11 Lars Vogel
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User InterfaceMarko Gargenta
 
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...Ted Chien
 
Android tools for testers
Android tools for testersAndroid tools for testers
Android tools for testersMaksim Kovalev
 
Lec005 android start_program
Lec005 android start_programLec005 android start_program
Lec005 android start_programEyad Almasri
 
Android App Development - 01 Introduction
Android App Development - 01 IntroductionAndroid App Development - 01 Introduction
Android App Development - 01 IntroductionDiego Grancini
 

Similar to 行動App開發管理實務 unit1 (20)

Android installation guide
Android installation guideAndroid installation guide
Android installation guide
 
Titanium Studio [Updated - 18/12/2011]
Titanium Studio [Updated - 18/12/2011]Titanium Studio [Updated - 18/12/2011]
Titanium Studio [Updated - 18/12/2011]
 
Module-I_Introduction-to-Android.pptx
Module-I_Introduction-to-Android.pptxModule-I_Introduction-to-Android.pptx
Module-I_Introduction-to-Android.pptx
 
Android Programming made easy
Android Programming made easyAndroid Programming made easy
Android Programming made easy
 
Android For Java Developers
Android For Java DevelopersAndroid For Java Developers
Android For Java Developers
 
Android
AndroidAndroid
Android
 
Developing for Android-Types of Android Application
Developing for Android-Types of Android ApplicationDeveloping for Android-Types of Android Application
Developing for Android-Types of Android Application
 
Industrial Training in Android Application
Industrial Training in Android ApplicationIndustrial Training in Android Application
Industrial Training in Android Application
 
Session 2 beccse
Session 2 beccseSession 2 beccse
Session 2 beccse
 
9780134433646 annuzzi ch02 (1)
9780134433646 annuzzi ch02 (1)9780134433646 annuzzi ch02 (1)
9780134433646 annuzzi ch02 (1)
 
Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programming
 
PPT Companion to Android
PPT Companion to AndroidPPT Companion to Android
PPT Companion to Android
 
Android develop guideline
Android develop guidelineAndroid develop guideline
Android develop guideline
 
.NET Recommended Resources
.NET Recommended Resources.NET Recommended Resources
.NET Recommended Resources
 
Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11 Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User Interface
 
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
 
Android tools for testers
Android tools for testersAndroid tools for testers
Android tools for testers
 
Lec005 android start_program
Lec005 android start_programLec005 android start_program
Lec005 android start_program
 
Android App Development - 01 Introduction
Android App Development - 01 IntroductionAndroid App Development - 01 Introduction
Android App Development - 01 Introduction
 

More from Xavier Yin

UI/UX - 別讓我思考
UI/UX - 別讓我思考UI/UX - 別讓我思考
UI/UX - 別讓我思考Xavier Yin
 
機器學習與資料探勘:決策樹
機器學習與資料探勘:決策樹機器學習與資料探勘:決策樹
機器學習與資料探勘:決策樹Xavier Yin
 
Test automation
Test automationTest automation
Test automationXavier Yin
 
Tku-網路資料的串接與資料儲存
Tku-網路資料的串接與資料儲存Tku-網路資料的串接與資料儲存
Tku-網路資料的串接與資料儲存Xavier Yin
 
Tku-行動app開發管理實務-Android應用程式開發基礎
Tku-行動app開發管理實務-Android應用程式開發基礎Tku-行動app開發管理實務-Android應用程式開發基礎
Tku-行動app開發管理實務-Android應用程式開發基礎Xavier Yin
 
TKU行動APP開發管理實務 - ListView & Custom Adapter
TKU行動APP開發管理實務 - ListView & Custom AdapterTKU行動APP開發管理實務 - ListView & Custom Adapter
TKU行動APP開發管理實務 - ListView & Custom AdapterXavier Yin
 
Material design introduction
Material design introductionMaterial design introduction
Material design introductionXavier Yin
 

More from Xavier Yin (7)

UI/UX - 別讓我思考
UI/UX - 別讓我思考UI/UX - 別讓我思考
UI/UX - 別讓我思考
 
機器學習與資料探勘:決策樹
機器學習與資料探勘:決策樹機器學習與資料探勘:決策樹
機器學習與資料探勘:決策樹
 
Test automation
Test automationTest automation
Test automation
 
Tku-網路資料的串接與資料儲存
Tku-網路資料的串接與資料儲存Tku-網路資料的串接與資料儲存
Tku-網路資料的串接與資料儲存
 
Tku-行動app開發管理實務-Android應用程式開發基礎
Tku-行動app開發管理實務-Android應用程式開發基礎Tku-行動app開發管理實務-Android應用程式開發基礎
Tku-行動app開發管理實務-Android應用程式開發基礎
 
TKU行動APP開發管理實務 - ListView & Custom Adapter
TKU行動APP開發管理實務 - ListView & Custom AdapterTKU行動APP開發管理實務 - ListView & Custom Adapter
TKU行動APP開發管理實務 - ListView & Custom Adapter
 
Material design introduction
Material design introductionMaterial design introduction
Material design introduction
 

Recently uploaded

Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 

Recently uploaded (20)

Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 

行動App開發管理實務 unit1

  • 1. 行動APP開發管理實務 Android Studio Overview and Practice 尹君耀 Xavier Yin
  • 2. Outline  Environment  Android Studio Overview  Project Structure  The First Android App
  • 3. Environment  JDK – Download JDK (or from Oracle) – Installation and Environment Variable Settings  JAVA_HOME  PATH  Installation result on cmd  Android SDK and Studio – Download Android SDK and Studio (or from Android Developer) – Installation  Launch the .exe file you just downloaded  Follow the setup wizard
  • 4. Android SDK  Platform-tools folder – Adb(Android Debug Bridge) instructions  devices: Prints a list of all attached emulator/device instances.  logcat: Prints log data to the screen.  push: Copies a specified file from an emulator/device instance to your development computer  pull: Copies a specified file from your development computer to an emulator/device instance.  Tools folder  Android – avd: Launch the AVD Manager – sdk: Launch the Android SDK Manager
  • 5. Devices  Real Devices – With USB  Android Emulator – android avd  Genymotion – Plugin
  • 7. Android Studio Overview  Interface – Tool bar
  • 8. Android Studio Overview  Interface – Tool bar – Navigation bar
  • 9. Android Studio Overview  Interface – Tool bar – Navigation bar – Project structure
  • 10. Android Studio Overview  Interface – Tool bar – Navigation bar – Project structure – Code editor
  • 11. Android Studio Overview  Features – Flexible Gradle-based build system – Build variants and multiple apk file generation – Code templates to help you build common app features – Rich layout editor with support for drag and drop theme editing – lint tools to catch performance, usability, version compatibility, and other problems – And much more
  • 12. Android Studio Overview  Details – Auto Complete – Build Variants – Productivity Guild – Multi Devices Debug – Layout Preview for Multi Devices – Plugins – Code Template – Layout Tools Attributes – Resource Preview – And much more
  • 13. Android Studio Overview  Details – Auto Complete – Build Variants – Productivity Guild – Multi Devices Debug – Layout Preview for Multi Devices – Plugins – Code Template – Layout Tools Attributes – Resource Preview – And much more
  • 14. Android Studio Overview  Details – Auto Complete – Build Variants – Productivity Guild – Multi Devices Debug – Layout Preview for Multi Devices – Plugins – Code Template – Layout Tools Attributes – Resource Preview – And much more
  • 15. Android Studio Overview  Details – Auto Complete – Build Variants – Productivity Guild – Multi Devices Debug – Layout Preview for Multi Devices – Plugins – Code Template – Layout Tools Attributes – Resource Preview – And much more
  • 16. Android Studio Overview  Details – Auto Complete – Build Variants – Productivity Guild – Multi Devices Debug – Layout Preview for Multi Devices – Plugins – Code Template – Layout Tools Attributes – Resource Preview – And much more
  • 17. Android Studio Overview  Details – Auto Complete – Build Variants – Productivity Guild – Multi Devices Debug – Layout Preview for Multi Devices – Plugins – Code Template – Layout Tools Attributes – Resource Preview – And much more
  • 18. Android Studio Overview  Details – Auto Complete – Build Variants – Productivity Guild – Multi Devices Debug – Layout Preview for Multi Devices – Plugins – Code Template – Layout Tools Attributes – Resource Preview – And much more
  • 19. Android Studio Overview  Details – Auto Complete – Build Variants – Productivity Guild – Multi Devices Debug – Layout Preview for Multi Devices – Plugins – Code Template – Layout Tools Attributes – Resource Preview – And much more
  • 20. Android Studio Overview  Details – Auto Complete – Build Variants – Productivity Guild – Multi Devices Debug – Layout Preview for Multi Devices – Plugins – Code Template – Layout Tools Attributes – Resource Preview – And much more
  • 21. Android Studio Overview  Details – Auto Complete – Build Variants – Productivity Guild – Multi Devices Debug – Layout Preview for Multi Devices – Plugins – Code Template – Layout Tools Attributes – Resource Preview – And much more
  • 22. Android Studio Overview  Details – Auto Complete – Build Variants – Productivity Guild – Multi Devices Debug – Layout Preview for Multi Devices – Plugins – Code Template – Layout Tools Attributes – Resource Preview – And much more
  • 23. Project Structure  /app – /src  /main/java – /your_package_name (ex: /com/tku/android -> com.tku.android)  Java files – AndroidManifest.xml  /androidTest(For Android Test) – /java/your_package_name  Test cases  /res – /drawable – /layout – /values  colors.xml, dimens.xml, strings.xml, styles.xml…etc.  build.gradle
  • 24. Resources  Drawable – A drawable resource is a general concept for a graphic that can be drawn to the scree.  values – strings: A string resource provides text strings for your application with optional text styling and formatting. – colors: A ColorStateList is an object you can define in XML that you can apply as a color, but will actually change colors, depending on the state of the View object to which it is applied. – styles: A style resource defines the format and look for a UI. – dimens: A dimension is specified with a number followed by a unit of measure.
  • 25. App Manifest  Manifest file – The manifest file presents essential information about your app to the Android system, information the system must have before it can run any of the app's code.  Permission – A basic Android application has no permissions associated with it by default, meaning it cannot do anything that would adversely impact the user experience or any data on the device. – To make use of protected features of the device, you must include in your AndroidManifest.xml one or more <uses-permission> tags declaring the permissions that your application needs.
  • 29. Dimens  DPI (Dots Per Inch) – The quantity of pixels within a physical area of the screen; usually referred to as dpi (dots per inch).
  • 30. Dimens  PX, DPI and DP(DIP) – Icon size = 160px  MDPI -> 160px/160dpi = 1 inch  XHDPI -> 160px/320dpi = 0.5 inch – Icon size = 160dp -> px = dp * (dpi / 160 )  MDPI -> px = 160 * ( 160dpi / 160dpi ) , px = 160  XHDPI -> px = 160 * ( 320dpi / 160dpi) , px = 320
  • 31. Dimens  Suggestions – Because it's important that you design and implement your layouts for multiple densities, the guidelines below and throught the documentation refer to layout dimensions with dp measurements instead of pixels. – Similarly, you should prefer the sp (scale-independent pixel) to define text sizes. The sp scale factor depends on a user setting and the system scales the size the same as it does for dp.
  • 32. The First Android App  Requirements
  • 33. The First Android App  Requirements 10dp 10dp #FFEFAAE5
  • 34. The First Android App  Create a new project – Empty project  Define resources that you need – Colors.xml, dimens.xml, strings.xml, styles.xml, drawable  Prepare Layout files – Add Android Resource Directory named layout within res folder – Add a layout.xml  LinearLayout
  • 35. The First Android App  Bind the above files with your java files – Activity  SetContentView()  FindViewById()  Define App Manifest file – Intent – Intent-filter  Launch your App in a device
  • 36. Sample Code and Slides  Slides – Slideshare  Sample Code – https://github.com/xavier0507/TKUSampleCode.git