Next Step, Android Studio! 
Federal University of Ceará 
Federal 
University of Ceará 
ÉDIPO DA SILVA SOUZA 
www.ediposouza.com
• Introduction 
• New Concepts 
• Advantages 
• Gradle 
• The Environment 
• Features 
• Productivity 
Federal University of Ceará 
SCHObEjeDtivUoLE
Federal University of Ceará 
Objetivo 
INTRODUCTION 
• Google project 
• Alpha version 0.1 was announced in Google IO 2013 (May/15) 
• Beta version 0.8 was announced in Google IO 2014 (June/25) 
• Actual(Nov/18) beta version is 0.8.14 
• Actual(Nov/18) canary version is 0.9.3 
• Based on JetBrain' IntelliJ IDEA 
• Gradle based build system and dependency manager 
• Free available for Windows, Mac OS X and Linux 
• Support for Java 7 language features
NEW CONCEPTS 
Federal University of Ceará 
Objetivo 
• One Project open at time 
• New project structure 
• Build-in dependency manager 
• Dependency (Eclipse jar files in libs) 
• Modules (Eclipse project library)
Federal University of Ceará 
Objetivo 
ADVANTAGES 
• IntelliJ IDEA is faster and lighter 
• Very stable and does not leak memory forcing constant reboots 
• No need to constantly clean my projects 
• Layout editor tools are vastly improved 
• Live layout let you see the UI preview as you type layout XML 
• UI previews elements and correspondent layout XML tag are synchronized 
• Many news Lint checks 
• Better code complete action 
• Smart Code Completion 
• Integrated console terminal 
• Integrated Version Control more efficient 
• Can use external merging tool
Federal University of Ceará 
Objetivo 
What??? 
GRADLE 
Gradle is a project automation tool used for Android Studio as build system 
and dependency manager. 
Cool, but what is a dependency??? 
Understand how what you know as a library, whether a jar file or a project 
marked as ‘is library’. If you project need external sources, it’s a dependency. 
Without it... 
• We search on google for a jar file, download and put it on libs folder. 
• Push the jar files to our remote repository, making it grow up. 
• Have some painkiller when us taken a project that use a old jar version (what 
we don’t know) and when we put the latest jar version, it broken.
Federal University of Ceará 
Objetivo 
GRADLE 
With it!!! 
• We just need to indicate the package of the dependence we want. 
• We can specify the dependency version or ‘+’ for latest version. 
• Gradle search the dependency, download and configure your project to use it. 
• With scripted build process, we can customize to add new features. 
• Build variants make easy to configure an Internal, Demo, Free, Paid build. 
• Export APKs with the version number in the filename 
• Run a script when your APK is exported like automatically upload the APK to 
TestFlight for internal testing. 
After hate it, you will love it!
THE ENVIRONMENT 
Federal University of Ceará
THE ENVIRONMENT 
Federal University of Ceará
Federal University of Ceará 
Objetivo 
Better Project Wizard 
• Steps better distributed. 
• Helper for choose the 
Minimum/Maximum SDK level. 
• Many Templates. 
• Better Template configuration. 
FEATURES 
Source: http://tools.android.com/recent/androidstudio061released
Federal University of Ceará 
Objetivo 
FEATURES 
Android Project View 
• Groups the build files for all modules at the 
top level of the project hierarchy. 
• Shows the most important source directories 
at the top level of the module hierarchy. 
• Groups all the manifest files for each module. 
• Shows resource files from all Gradle source 
sets. 
• Groups resource files for different locales, 
orientations, and screen types in a single 
group per resource type. 
Source: http://developer.android.com/sdk/installing/studio-androidview.html
Federal University of Ceará 
Objetivo 
FEATURES 
New Layout Editor 
• You can edit the XML layout and see the 
preview at same time. 
• Synchronized XML Tag and layout selection. 
• Resource inlining like strings and dimens. 
• Multi layout and real time preview based in 
many device configuration (Language, RTL, 
Android version, Screen Size, SDK version). 
• Save screenshot from Layout editor preview. 
• Support for xliff strings in Layout Rendering. 
Source: http://tools.android.com/recent/androidstudiobetareleased
Federal University of Ceará 
Objetivo 
Designtime Layout Attributes 
You can edit the XML layout and see the preview at same time. 
• text 
• visibility 
• listitem 
• listheader 
• listfooter 
• menu 
• actionBarNavMode 
• fastScrollAlwaysVisible 
FEATURES 
More info: http://tools.android.com/tech-docs/tools-attributes Source: http://tools.android.com/tips/layout-designtime-attributes
Federal University of Ceará 
Objetivo 
FEATURES 
Enhanced Code Editor 
• Instant Completion 
• Context-aware Completion 
• Smart code completion search 
• Multi-language Refactorings 
• Drawable preview in code editor 
• Color preview in code editor 
• Code visualization simplified 
• Resource inline 
More info: 
● http://www.jetbrains.com/idea/features/refactoring.html 
● http://www.jetbrains.com/idea/features/code_completion.html 
● http://jetbrains.dzone.com/articles/top-20-code-completions-in-intellij-idea 
Source: http://tools.android.com/recent/androidstudio044released
Federal University of Ceará 
Objetivo 
New AVD Manager 
• Wizard for AVD creation. 
• More integrated to IDE. 
• Easy to create a new AVD 
base on existence hardware. 
• Differents device category. 
FEATURES 
Source: http://tools.android.com/recent/androidstudio0812released
Federal University of Ceará 
Objetivo 
FEATURES 
Library Dependency Editor 
• More easy than just type the package. 
• Easy search for the library package. 
• Google libraries. 
• Most commonly requested libraries. 
Source: http://tools.android.com/recent/androidstudio045released
Federal University of Ceará 
Objetivo 
Translate Editor 
• Multi language at same time. 
• Check untranslated strings. 
• Quick Inline edit. 
• Open it with right click on a file 
named "strings.xml". 
FEATURES 
Source: http://tools.android.com/recent/androidstudio087released
Federal University of Ceará 
Objetivo 
FEATURES 
• Integrated terminal console 
• Integrated Version control 
• Build variants 
• Live updated with small patch 
• Screen record feature in DDMS 
• Drawable preview in code editor (Shapes, Colors, Menus). 
• Bitmap rendering in the debugger 
• New memory monitor 
• Code Checker 
• Copyright manager 
• Auto import
Federal University of Ceará 
Objetivo 
PRODUCTIVITY 
List keyboard shortcuts for common operations. 
Source: http://developer.android.com/sdk/installing/studio-tips.html
Federal University of Ceará 
PRODOUbjeCtivToIVITY 
Source: http://developer.android.com/sdk/installing/studio-tips.html
Federal University of Ceará 
Objetivo 
PRODUCTIVITY 
Mac OSX Windows/Linux Eclipse (Windows) equivalent Description 
● Cmd+ ← Ctrl+Y Ctrl+D Delete line 
● Cmd+Shift+ ← Ctrl+shift+ ← - Last edit location 
● Cmd+Option+V Ctrl+Alt+V Alt+Shift+L Extract variable 
● Cmd+Option+F Ctrl+Alt+F - Extract Field 
● Cmd+Option+C Ctrl+Alt+C - Extract constant 
● Cmd+Option+P Ctrl+Alt+P - Extract param 
● Cmd+Option+M Ctrl+Alt+M Alt+Shift+M Extract Method 
● Cmd+Option+T Ctrl+Alt+T Alt+Shift+Z Surround with 
● Cmd+Option+/ Ctrl+Shift+/ Ctrl+Shift+/ Block Comment 
● Cmd+/ Ctrl+/ Ctrl+Shift+C Inline Comment 
● Cmd+P Ctrl+P Ctrl+Shift+Space Show method params 
● Cmd+1 Alt+1 Alt+Shift+Q, P Show/hide Project view 
● Cmd+ + Ctrl+ + - Expand block 
● Cmd+ - Ctrl+ - - Contract block 
● Cmd+J Ctrl+J - Live template
Federal University of Ceará 
Objetivo 
PRODUCTIVITY 
Mac OSX Windows/Linux Eclipse (Windows) equivalent Description 
● Cmd+K Ctrl+K Ctrl+# Commit vcs changes 
● Cmd+T Ctrl+T - Update vcs changes 
● Ctrl+V Ctrl+ ` - Version Control popup 
● Ctrl+Enter Alt+Insert Ctrl+Shift+S Generate popup 
● Ctrl+Tab Ctrl+Tab - Next tab 
● Ctrl+Shift+Tab Ctrl+Shift+Tab - Previous tab 
● Ctrl+R Shift+F10 Ctrl+F11 Run app 
● Ctrl+D Shift+F9 F11 Debug app 
● Ctrl+O Ctrl+O - Override method 
● Ctrl+Up Alt+Up Ctrl+Shift+Up Navigate next method 
● Ctrl+Down Alt+Down Ctrl+Shift+Down Navigate previous method 
● Crtl+Option+O Ctrl+Alt+O Ctrl+Shift+O Organize imports 
● Option+Space Ctrl+Shift+I - Quick definition 
● Option+Enter Alt+Enter Ctrl+1 Quick Fix 
● Shift+F6 Shift+F6 Alt+Shift+R Rename refactoring
Federal University of Ceará 
Objetivo 
PRODUCTIVITY 
Android Studio have many many keyboard shortcuts, to learn some of the most useful, check the Philippe 
Breault work on Google+ and his blog. 
• https://plus.google.com/u/0/+PhilippeBreault/posts 
• https://github.com/pavlospt/Android-Studio-Tips-by-Philippe-Breault/wiki 
• http://www.developerphil.com/android-studio-tips-of-the-day-roundup-1/ 
• http://www.developerphil.com/android-studio-tips-of-the-day-roundup-2/
Federal University of Ceará 
Thank you!!! 
Contact: 
edipo2s@gmail.com 
More info: 
http://ediposouza.com/iniciando-com-o-android-studio?lang=en

Next Step, Android Studio!

  • 1.
    Next Step, AndroidStudio! Federal University of Ceará Federal University of Ceará ÉDIPO DA SILVA SOUZA www.ediposouza.com
  • 2.
    • Introduction •New Concepts • Advantages • Gradle • The Environment • Features • Productivity Federal University of Ceará SCHObEjeDtivUoLE
  • 3.
    Federal University ofCeará Objetivo INTRODUCTION • Google project • Alpha version 0.1 was announced in Google IO 2013 (May/15) • Beta version 0.8 was announced in Google IO 2014 (June/25) • Actual(Nov/18) beta version is 0.8.14 • Actual(Nov/18) canary version is 0.9.3 • Based on JetBrain' IntelliJ IDEA • Gradle based build system and dependency manager • Free available for Windows, Mac OS X and Linux • Support for Java 7 language features
  • 4.
    NEW CONCEPTS FederalUniversity of Ceará Objetivo • One Project open at time • New project structure • Build-in dependency manager • Dependency (Eclipse jar files in libs) • Modules (Eclipse project library)
  • 5.
    Federal University ofCeará Objetivo ADVANTAGES • IntelliJ IDEA is faster and lighter • Very stable and does not leak memory forcing constant reboots • No need to constantly clean my projects • Layout editor tools are vastly improved • Live layout let you see the UI preview as you type layout XML • UI previews elements and correspondent layout XML tag are synchronized • Many news Lint checks • Better code complete action • Smart Code Completion • Integrated console terminal • Integrated Version Control more efficient • Can use external merging tool
  • 6.
    Federal University ofCeará Objetivo What??? GRADLE Gradle is a project automation tool used for Android Studio as build system and dependency manager. Cool, but what is a dependency??? Understand how what you know as a library, whether a jar file or a project marked as ‘is library’. If you project need external sources, it’s a dependency. Without it... • We search on google for a jar file, download and put it on libs folder. • Push the jar files to our remote repository, making it grow up. • Have some painkiller when us taken a project that use a old jar version (what we don’t know) and when we put the latest jar version, it broken.
  • 7.
    Federal University ofCeará Objetivo GRADLE With it!!! • We just need to indicate the package of the dependence we want. • We can specify the dependency version or ‘+’ for latest version. • Gradle search the dependency, download and configure your project to use it. • With scripted build process, we can customize to add new features. • Build variants make easy to configure an Internal, Demo, Free, Paid build. • Export APKs with the version number in the filename • Run a script when your APK is exported like automatically upload the APK to TestFlight for internal testing. After hate it, you will love it!
  • 8.
    THE ENVIRONMENT FederalUniversity of Ceará
  • 9.
    THE ENVIRONMENT FederalUniversity of Ceará
  • 10.
    Federal University ofCeará Objetivo Better Project Wizard • Steps better distributed. • Helper for choose the Minimum/Maximum SDK level. • Many Templates. • Better Template configuration. FEATURES Source: http://tools.android.com/recent/androidstudio061released
  • 11.
    Federal University ofCeará Objetivo FEATURES Android Project View • Groups the build files for all modules at the top level of the project hierarchy. • Shows the most important source directories at the top level of the module hierarchy. • Groups all the manifest files for each module. • Shows resource files from all Gradle source sets. • Groups resource files for different locales, orientations, and screen types in a single group per resource type. Source: http://developer.android.com/sdk/installing/studio-androidview.html
  • 12.
    Federal University ofCeará Objetivo FEATURES New Layout Editor • You can edit the XML layout and see the preview at same time. • Synchronized XML Tag and layout selection. • Resource inlining like strings and dimens. • Multi layout and real time preview based in many device configuration (Language, RTL, Android version, Screen Size, SDK version). • Save screenshot from Layout editor preview. • Support for xliff strings in Layout Rendering. Source: http://tools.android.com/recent/androidstudiobetareleased
  • 13.
    Federal University ofCeará Objetivo Designtime Layout Attributes You can edit the XML layout and see the preview at same time. • text • visibility • listitem • listheader • listfooter • menu • actionBarNavMode • fastScrollAlwaysVisible FEATURES More info: http://tools.android.com/tech-docs/tools-attributes Source: http://tools.android.com/tips/layout-designtime-attributes
  • 14.
    Federal University ofCeará Objetivo FEATURES Enhanced Code Editor • Instant Completion • Context-aware Completion • Smart code completion search • Multi-language Refactorings • Drawable preview in code editor • Color preview in code editor • Code visualization simplified • Resource inline More info: ● http://www.jetbrains.com/idea/features/refactoring.html ● http://www.jetbrains.com/idea/features/code_completion.html ● http://jetbrains.dzone.com/articles/top-20-code-completions-in-intellij-idea Source: http://tools.android.com/recent/androidstudio044released
  • 15.
    Federal University ofCeará Objetivo New AVD Manager • Wizard for AVD creation. • More integrated to IDE. • Easy to create a new AVD base on existence hardware. • Differents device category. FEATURES Source: http://tools.android.com/recent/androidstudio0812released
  • 16.
    Federal University ofCeará Objetivo FEATURES Library Dependency Editor • More easy than just type the package. • Easy search for the library package. • Google libraries. • Most commonly requested libraries. Source: http://tools.android.com/recent/androidstudio045released
  • 17.
    Federal University ofCeará Objetivo Translate Editor • Multi language at same time. • Check untranslated strings. • Quick Inline edit. • Open it with right click on a file named "strings.xml". FEATURES Source: http://tools.android.com/recent/androidstudio087released
  • 18.
    Federal University ofCeará Objetivo FEATURES • Integrated terminal console • Integrated Version control • Build variants • Live updated with small patch • Screen record feature in DDMS • Drawable preview in code editor (Shapes, Colors, Menus). • Bitmap rendering in the debugger • New memory monitor • Code Checker • Copyright manager • Auto import
  • 19.
    Federal University ofCeará Objetivo PRODUCTIVITY List keyboard shortcuts for common operations. Source: http://developer.android.com/sdk/installing/studio-tips.html
  • 20.
    Federal University ofCeará PRODOUbjeCtivToIVITY Source: http://developer.android.com/sdk/installing/studio-tips.html
  • 21.
    Federal University ofCeará Objetivo PRODUCTIVITY Mac OSX Windows/Linux Eclipse (Windows) equivalent Description ● Cmd+ ← Ctrl+Y Ctrl+D Delete line ● Cmd+Shift+ ← Ctrl+shift+ ← - Last edit location ● Cmd+Option+V Ctrl+Alt+V Alt+Shift+L Extract variable ● Cmd+Option+F Ctrl+Alt+F - Extract Field ● Cmd+Option+C Ctrl+Alt+C - Extract constant ● Cmd+Option+P Ctrl+Alt+P - Extract param ● Cmd+Option+M Ctrl+Alt+M Alt+Shift+M Extract Method ● Cmd+Option+T Ctrl+Alt+T Alt+Shift+Z Surround with ● Cmd+Option+/ Ctrl+Shift+/ Ctrl+Shift+/ Block Comment ● Cmd+/ Ctrl+/ Ctrl+Shift+C Inline Comment ● Cmd+P Ctrl+P Ctrl+Shift+Space Show method params ● Cmd+1 Alt+1 Alt+Shift+Q, P Show/hide Project view ● Cmd+ + Ctrl+ + - Expand block ● Cmd+ - Ctrl+ - - Contract block ● Cmd+J Ctrl+J - Live template
  • 22.
    Federal University ofCeará Objetivo PRODUCTIVITY Mac OSX Windows/Linux Eclipse (Windows) equivalent Description ● Cmd+K Ctrl+K Ctrl+# Commit vcs changes ● Cmd+T Ctrl+T - Update vcs changes ● Ctrl+V Ctrl+ ` - Version Control popup ● Ctrl+Enter Alt+Insert Ctrl+Shift+S Generate popup ● Ctrl+Tab Ctrl+Tab - Next tab ● Ctrl+Shift+Tab Ctrl+Shift+Tab - Previous tab ● Ctrl+R Shift+F10 Ctrl+F11 Run app ● Ctrl+D Shift+F9 F11 Debug app ● Ctrl+O Ctrl+O - Override method ● Ctrl+Up Alt+Up Ctrl+Shift+Up Navigate next method ● Ctrl+Down Alt+Down Ctrl+Shift+Down Navigate previous method ● Crtl+Option+O Ctrl+Alt+O Ctrl+Shift+O Organize imports ● Option+Space Ctrl+Shift+I - Quick definition ● Option+Enter Alt+Enter Ctrl+1 Quick Fix ● Shift+F6 Shift+F6 Alt+Shift+R Rename refactoring
  • 23.
    Federal University ofCeará Objetivo PRODUCTIVITY Android Studio have many many keyboard shortcuts, to learn some of the most useful, check the Philippe Breault work on Google+ and his blog. • https://plus.google.com/u/0/+PhilippeBreault/posts • https://github.com/pavlospt/Android-Studio-Tips-by-Philippe-Breault/wiki • http://www.developerphil.com/android-studio-tips-of-the-day-roundup-1/ • http://www.developerphil.com/android-studio-tips-of-the-day-roundup-2/
  • 24.
    Federal University ofCeará Thank you!!! Contact: [email protected] More info: http://ediposouza.com/iniciando-com-o-android-studio?lang=en