Upload
vukhanh
View
227
Download
1
Embed Size (px)
Citation preview
405
INDEX
A
AAR package, Android Library module, 165generating, 167
actionPerformed method, 353–354actions, IntelliJ, 332–333
implementing, 336–340plugin creation, 333–336
activities, 50associations, 133–134blank, 59–62customization, 51Empty Activity, 169fragments, 63Glass module, 180–181Java and, 310lifecycle, 56–57
methods, 57NextActivityClass, 58Tabbed Activity, 64–69template
adding to projects, 58Android TV, 174
user-defi ned, 58Wear Activities, 53
Activity super class, 58ADB (Android Debug Bridge), 40–41,
196–197ADB Idea plugins, 366ADB WIFI, 366ADB WIFI plugin, 366
ADK (Android Developer Tools), 45Adreno GPU, 388–389Adreno Profi le for GPU, 399–400AllPlay Click SDK, 397–399AnAction class, 338Analyze menu, 82, 88–89Android Auto, 182–184Android Device Monitor, 216
devices, 217Emulator Control, 218–219File Explorer, 219Heap, 217–218Hierarchy View, 220–221logcat, 217Network Statistics, 218System Information, 220threads, 217UI XML Dump, 219
Android Drawable Importer, 366–367Android Emulator Plugin, 299, 300–302Android Holo Colors, 368Android Library module, 164–165
AAR package, 165generating, 167
Gradle, module dependencies, 165Java classes, 166XML resources, 166–167
Android Lint Plugin, 299Android Model view, 97–98Android Monitor tool, 96–97
Capture System Information, 208
COPYRIG
HTED M
ATERIAL
406
Android NDK – Android Studio
CPU monitor, 213–214GPU monitor, 214–215Java Garbage Collector, 213Java Heap, 211logcat, 209–210Memory monitor, 210–213Network monitor, 215Screen Recording, 208Screenshot, 207–208tabs, 206
Android NDK, 309–310applications, samples, 321–322C/C++ and, 310
directory declaration, 327jniLibs folder, 328–329license agreement, 311Linux installation, 311–312Mac OS X installation, 313–315modules, declaration, 325packages, 310product fl avors, 326–327projects, 315–316
building, 326–328development, 328–330Hello JNI, 319importing sample, 316–322list, 317migrating, 322–325release, 328–330
SDK Manager, 311–312Windows 10 installation, 312–313
Android Parcelable Code Generator, 368Android Platform/API Version Distribution
window, 49Android Plugin for Gradle, 145–146
build confi guration, 151build tasks, 151confi guration, 150extending, 156–157fl avors, 152–153
ProGuard, 153–155Android SDK, 47
Default Preferences window, 25installation, standalone, 18–19Manager installation window, 25SDK Manager button, 24
Android StudioAnalyze menu, 82, 88–89Android NDK integration, 310–315Android Studio menu, 82Build menu, 82, 89Code menu, 82, 88Commit Changes wizard, 264–266Complete Installation dialog box, 18Edit menu, 82
Copy as Plain Text, 85Copy Path, 84Copy Reference, 85Macros, 86Paste from History, 85Paste Simple, 85
File menu, 82, 83–84Project Structure window, 84, 85
Git, 259–260project creation, 260–266repository items, 262–263version control, 261–262
HAXM confi guration, 12Help menu, 82, 90installation, 9–10
Linux, 16–18Mac OS X, 12–15Windows 10, 10–12
launching, 18Navigate menu, 82, 86–88Refactor menu, 82, 89Run menu, 82, 90SDK Manager, Android NDK, 311–312SDK Manager button, 24Setup window, 11
407
Android Studio menu – Asset Studio window
Setup Wizard (Linux), 16Setup Wizard (Mac OS X), 14shortcuts, Keymap page (Preferences
window), 91–92themes
Linux, 17Windows, 13
tool views, available tools, 93Tool Windows option, 92–93
Android Model, 92, 97–98Android Monitor, 92, 96–97Build Variants, 92Capture Analysis, 92Capture Tool, 92Captures, 92Debug, 92Debug window, 99–100Designer, 92Event Log, 92Event Logs, 100Favorites, 92, 96Gradle, 92, 98Gradle Console, 92, 98Maven Projects, 92Messages, 92, 93–94Palette, 92Project, 92, 94–95Run, 92Run window, 98–99Structure, 92Structure window, 97Terminal, 92, 100TODO, 92Version Control, 92
Tools menu, 82, 90VCS menu, 82, 90View menu, 82, 86
Tool Windows option, 92–100Welcome window, 47Window menu, 82, 90
Android Studio menu, 82Preferences, 83
Android TV module, 173–174APKs, 179debugging, 176–179manifest fi le, 174, 176running, 176–179
Android Wear moduleAPKs, 173AVD (Android Virtual Device), 172debugging, 170–173Empty Activity, 169running, 170–173
AndroidManifest.xml file, 32–33android-studio-ide-141.2178183-linux
.zip, 16APIs (application programming interfaces),
Java and, 310APKs
Android TV module, 179Android Wear module, 173building, 114Generate APK option, 163modules, 161–162
AppCompatActivity class, 58applications
Android NDK, samples, 321–322launching, 54–56tutorial, 162
ARR packages, importing, 191–192asset management, 134–141
Vector Asset Studio, 140–141Asset Studio window, 135
Additional Padding, 137Asset Type, 136Background Color, 138Foreground, 136Foreground Scaling, 138Image File, 137Resource Name, 139
408
assets – code
Shape, 138assets, 72
images, 73–74sound, 74–75video, 75–76
associations, activities, 133–134Audio-Echo NDK sample application, 321–
322AVD (Android Virtual Device) Manager,
36–37Battery, 223Cellular, 223device confi guration, 38, 39devices, list, 40Directional Pad, 223emulator call, 224Fingerprint, 223hardware, 38Help, 223keyboard, 224Location, 222–223Phone, 223System Image, 39TV emulator, 177Wear module, 172
BBamboo CI server, 282BinaryFragment class, 229Bitmap Plasma NDK sample application, 322blank activities, 59–62breakpoints, 200BroadcastReceiver superclass, 87Browse Samples window, 23build folder, 30build jobs, in Jenkins, 291–298Build menu, 82, 89
Generate APK option, 163
Make Project option, 163build system
Gradle, build.gradle fi les,144–145
NDK and, 143Build Variant window, 163build.gradle app module, 166build.gradle fi le, 30, 144–145
CCalculator class, 229–230CalculatorFragment class, 228C/C++, Android NDK and, 310CI (continuous integration), 281
overview, 281–282servers
Bamboo, 282Hudson, 282Jenkins, 282, 283–290project integration, 282–283
classpath, 145ClearCase, 245code
blockscommenting, 101moving, 101
completion, 101debugging
adb (Android Debug Bridge),196–197
wireless, 197–198Lint and, 225refactoring, 107–111samples
Browse Samples window, 23importing, 22–23, 24
testing, 226–230integration tests, 232–235
409
code base – Desktop Client
performance testing, 241–242, 241–244
UI tests, 235–240unit tests, 230–232
code base, Android Library module and, 164Code menu, 82, 88color resources, 130commenting code, 101Commit Changes wizard, 264–266Commit window (Git)
Collapse All, 272Details, 272Expand All, 272Group by Directory, 272Jump to Source, 272Merge Changes, 272Move to Another Changelist, 270Refresh Changes, 272Revert, 272Show Diff, 269, 271
constants, extracting, 111CPU monitor, 213–214Create New Module wizard, 167–168Create New Project window, 48CVS, 245
DDebian, Jenkins and, 283–284Debug option, 199Debug window, 99–100
Close, 201Drop Frame, 202Evaluate Expression, 202–204Force Step Into, 202Frames, 204Help, 201Mute Breakpoints, 200Pause, 200
Pin Tab, 201Restore Layout, 201Resume, 200Run to Cursor, 202Settings, 201Show Execution Point,
201Step Into, 202Step Out, 202Step Over, 201Stop, 200Variables, 204View Breakpoints, 200Watches, 204–205
debugging, 195–196adb (Android Debug Bridge), 196–197breakpoints, 200modules
Android TV, 176–179Android Wear, 170–173Glass, 181–182Google Cloud, 187–188
thread dump data, 201Universal Music Player sample, 198–206Watches window, 205wireless, 197–198
DecimalFragment class, 228Default Preferences window, 25dependencies
adding, 166confi guration, Project Structure window,
165Gradle
external, 147–148local, 149
Java libraries, 168Maven references, 149–150
Desktop Client (GitHub), 252–253
410
devices. See also virtual devices – Frame layouts
fi le changes, 256importing projects, 256project path, 257repositories, 255
devices. See also virtual devicesAndroid Device Monitor, 217target devices, 48
multiple, 52–54dimen resources, 129distributed version control,
246Documents (IntelliJ), 342drawables, 130
EEclipse-based ADT, 21
project migration, 41–43projects, importing, 190–191
Edit menu, 82, 84–86Macros, 86
editorscode completion, 101IntelliJ, plugin creation, 351, 352–354navigating, 101–102refactoring, 102Smart Type Completion, 101Translation Editor, 131–133
Empty Activity option, 50, 169Empty Activity template, 58emulators
ADB and, 40–41HAXM, installation, 35–36
Endless Tunnel NDK sample application, 322
environment paths, Windows 10, 6–7Evaluation Expression, 202–204event handlers, Intent, 58Event Logs, 100
executeOnPooledThread method, 341expertlibrary module, 166
FFastCV Computer Vision SDK, 389–393Favorites tool, 96File menu, 82, 83–84
Project Structure window, 84, 85fi lesAndroidManifest.xml, 32–33IntelliJ, 342
Documents, 342PSI (Program Structure Interface) fi les,
342VFS (Virtual File System), 342
fi ngerprint sensor (AVD), 222folders, projects, 31
build, 30build.gradle fi le, 30hidden folders, 29java, 30, 31local.properties fi le, 30res, 32settings.gradle fi le, 30src/main, 30src/test and src/androidTest, 30
fori Live Template, 103–104Fragment class, 66fragments
activities, 63lifecycle, 63–64onActivityCreated method,
64onAttach method, 63onCreateView method, 63onDestroyView method, 64onDetach method, 64
Frame layouts, 116–117
411
Generate APK – Google Cloud module
GGenerate APK, 163Genymotion, 371–373Genymotion plugin, 371–373Git, 245
Android projects, 259–260branches, 246–247, 267
from master, 269–273master branch, 246Merge Branches window, 272–273names, 267–268
Commit windowCollapse All, 272Details, 272Expand All, 272Group by Directory, 272Jump to Source, 272Merge Changes, 272Move to Another Changelist, 270Refresh Changes, 272Revert, 272Show Diff, 269, 271
commits, 246, 268–269confl icts, 274distributed version control, 246fl ow, 266–279installation
Linux, 247MacOsX, 247Windows, 247–248
Jenkins plugin, 289manual merge, 276Merge Revisions window, 275projects, creating, 248–249, 260–266repository, adding items, 262–263
Git Branches window, 267–268GitHub, 248, 249
connecting, 252
Desktop Application Install, Security Warning, 250
Desktop Client, 252–253fi le changes, 256importing projects,
256project path, 257repositories, 255
Desktop installation process, 250Desktop start screen, 251fi les, changes, 255Jenkins build jobs, 292–293Mac OS X, 250read.me fi le, 255repositories
creating, 253Desktop Client and, 255list, 253path selection, 254remote, 257–258
sample projects, 22setup, skipping, 252sign-in screen, 258sign-in warning, 257Welcome window, 250–251Windows, 250
GitUp, 276–278Glass Explorers, 179Glass module, 179–180
activities, 180debugging, 181–182naming, 180running, 181–182
Google Cloud Messaging Notifi cation Plugin, 299
Google Cloud module, 184–185debugging, 187–188messaging, 186–187running, 187–188
412
Google Developer Console – integration tests
types, 185App Engine Backend with Google
Cloud Messaging, 186App Engine Java Endpoints Module,
186App Engine Java Servlet Module, 186
Google Developer Console, 302JSON key, 303
.google folder, 29Google Play account, 302
JSON key, 302, 303Google Play Android Publisher Plugin, 299Google Service Account, 303Google TV, 173GPS data, AVD and, 222GPU monitor, 214–215GPU support, 2Gradle build system
Android Library module and, 164Android NDK project migration, 322–325Android Plugin for Gradle, 145–146
extending, 156–157build confi gurations, 163build.gradle fi le, 144–145dependencies
external, 147–148local, 149Maven references, 149–150
Gradle plugins, writing, 155–156Jenkins plugin, 289model fi le, 145–146modules, dependencies, 162, 165projects, importing modules, 189
Gradle Console tool, 98.gradle folder, 29Gradle tool, 98Graphics Frame Analyzer of OpenGL (Intel
GPA), 381–382Grid layout, 117
HHAXM
confi guration, 12Mac OS X, 15
installation, 35–36Hello GL2 NDK sample application,
322Hello JNI project, 319Hello Third Party NDK sample application,
322Help menu, 82, 90Hudson CI server, 282
I.idea folder, 29images, assets, 73–74Import Gradle Project option, 189importing
ARR packages, 191–192code samples, 22–23
Browse Samples window, 23Sample Setup window, 24
JAR packages, 191–192modules
Eclipse ADT projects, 190–191Gradle projects, 189
installationAndroid Studio
Mac OS X, 12–15Windows 10, 10–12
GitLinux, 247MacOsX, 247Windows, 247–248
HAXM, 35–36plugins, 364
integration tests, 232–235
413
Intel System Studio – IntelliJ
Calculator class, 233–234History class, 233History mock implementation, 234–235
Intel System Studio, 375Eclipse integration, 376Intel IPP (Integrated Performance
Primitives), 378–379VTune Amplifi er, 379–381
Intel third-party toolsC++ Compiler (ICC), 377–378Context Sensing SDK, 384–387GPA, 381–382INDE (Integrated Native Developer
Experience), 382Integrated Performance Primitives (Intel
IPP), 378–379Multi-OS Engine, 382–384System Studio, 374–377Tamper Protection Toolkit, 382Thread Building Blocks (Intel TBB),
379VTune Amplifi er, 379–381
IntelliJ, 331actions, 332–333
implementing, 336–340plugin creation, 333–336read, 348–351write, 348–351
AnAction class, 338Documents, 342editors, 351–354executeOnPooledThread method, 341fi le system, 342plugin declaration, 348plugins
distribution, 360–362packaging, 360–362
ProjectComponent interfaceProjectComponent( ) method, 343
String get ComponentName( )
method, 343void disposeComponent( ) method,
343void initComponent( ) method, 343void projectClosed( ) method, 343void projectOpened( ) method,
343projects, 342–343PSI (Program Structure Interface) fi les,
342runReadAction method, 341runWriteAction method, 341SDK, 334–335Start screen, 333threading, 341Unicode replacement, 344–345VFS (Virtual File System), 342VirtualFileListener interface
implemention, 345–346registering/unregistering, 347void beforeContentsChange event,
343void beforeFileDeletion event, 344void beforeFileMovement event, 344void beforePropertyChange event,
343void contentsChanged event, 343void fileCopied event, 344void fileCreated event, 343void fileDeleted event, 344void fileMoved event, 344void propertyChanged event, 343
welcome wizard, 336wizards
CustomWizard, 357–360extension declaration, 354–356module type, 356ModuleWizardSteps, 356–357
414
Intent event handler – layouts
Intent event handler, 58IntentService class, 71–72interfaces, extracting, 111
JJAR packages, importing, 191–192Java
activities and, 310APIs and, 310Linux installation, 8–9Mac OS X installation, 7–8modules, 166
Android Library module, 166UI widgets and, 310Windows installation, 3–4
environment paths, 6–7installation setup window, 5setup wizard, 5
java folder, 30, 31Java Garbage Collector, 213Java Heap, 211Java Library module, 167–168
Create New Module wizard, 167–168Java SE Development Kit, 3JDK 7, 2–4jdk-7u79-windows-x64.exe, 4Jenkins CI server, 282
access from browser, 287Android Emulator, 300–302, 305–306Android SDK installation, 305builds
frequency, 294job confi guration, 300job creation, 291–298process output, 297progress, 305properties by number, 296schedule, 296
dashboard, 297Google Play account, 302installation, 283
MIT license, 284WAR fi le, 283
plugins, 286–287, 287–288, 290download progress, 290downloading, 299–300Git, 289Gradle, 289search, 298
repositories, 292–293JetBrains
IntelliJ download, 333plugins, 364, 365
jimu Mirror, 370–371JNI, 310
Hello JNI project, 319JRE (Java Runtime Environment), 2, 3
KKey Prompter, 370Keymap page, 91–92
Llayout
themes, 122–123translations, 131–133
Layout XML File option, 116–118layouts
Design mode, 118–120Frame, 116–117Grid, 117Linear, 116new fi le, 116–118Palette tool, 123
Containers group, 124Custom group, 124Date Time group, 124Expert group, 124Text Fields group, 124Widgets group, 124
Palette view, 120
415
l f l f d llifecycle of activities – modules
Preview window, 120previewing, SDK versions, 121–122Relative, 116rendering options, 120–121Table, 117Text mode, 118–119views and, 115widgets, 115, 116
Plain TextView, 124–126XML and, 116
lifecycle of activities, 56–57methods
onCreate, 57onDestroy, 57onPause, 57onResume, 57onStart, 57onStop, 57
lifecycle of fragments, 63–64Linear layouts, 116Lint, 225Linux
Android NDK installation, 311–312Android SDK confi guration, 17–18Android Studio installation, 16–18Git, installation, 247Java installation, 8–9system requirements, 2
ListActivity class, 58Live Templates, 102–103
creating, 104–106surrounding templates, 106–107
fori, 103–104inserting, 103–104surrounding templates, 106–107
local.properties fi le, 30logcat, 209–210
Android Device Monitor, 217
MMac OS X
Android NDK installation, 313–315
Android Studio installation, 12–15Android Studio Setup Wizard, 14HAXM, confi guration, 15Java installation, 7–8menus, 82system requirements, 2
Macros submenu, 86manifest fi le, 76–78
Android TV, 174, 176Maven references, dependencies and, 149–150mavenCentral repository, 145Memory monitor, 210–213menus
Analyze, 82, 88–89Android Studio, 82Build, 82, 89Code, 82, 88Edit, 82, 84–86File, 82, 83–84Help, 82, 90Navigate, 82, 86–88Refactor, 82, 89Run, 82, 90Tools, 82, 90VCS, 82, 90View, 82, 86Window, 82, 90
Mercurial, 245Messages tool, 93–94messaging, Google Cloud module, 186–187migration
Android NDK projects, 322–325projects, from Eclipse, 41–43
modules, 78–79adding, 160–161Android Auto, 182–184Android Library, 164–165Android TV, 173–174
debugging, 176–179manifest fi le, 174, 176running, 176–179templates, 174
416
More Teapots NDK sample application – plugins
Android Weardebugging, 170–173Empty Activity, 169running, 170–173
APKs, 161–162Build Variants window, 163build.gradle app, 166Create New Module wizard, 167–168dependencies
adding, 166Gradle, 162, 165Java libraries, 168
expertlibrary, 166Glass, 179–180
activities, 180–181debugging, 181–182naming, 180running, 181–182
Google Cloud, 184–185debugging, 187–188messaging, 186–187running, 187–188types, 185–186
importingEclipse ADT projects, 190–191Gradle projects, 189
Java classes, 166Java Library, 167–168multiple, 162NDK, declaration, 325Phone & Tablet, 161–164removing, 192–193shared resources, 166
More Teapots NDK sample application, 321
Nnaming, packages, 47Native Activity NDK sample application, 322Native Plasma NDK sample application, 322
Navigate menu, 82, 86–88NDK (Native Development Kit), 143Network monitor, 215NextActivityClass activity, 58Nexus 5X, 37–38Nexus Q, 173NVIDIA CodeWorks, 401–404
OonActivityCreated method, 64onAttach method, 63onCreate function, breakpoint for debugging,
198onCreate method, 57, 66onCreateView( ) function, 66onCreateView method, 63onDestroy method, 57onDestroyView method, 64onDetach method, 64onPause method, 57onResume method, 57onStart method, 57onStop method, 57Open Module settings, 165
Ppackages, names, 47performance testing, 241–242
task, 242–244Phone & Tablet module, 161–164
Project view, 163Platform Analyzer (Intel GPA), 381Plugin Manager, search, 298–299plugins, 363–364
ADB Idea, 366ADB WIFI, 366Android Drawable Importer, 366–367Android Emulator Plugin, 299, 300–302
417
f dPreferences window – projects
Android Holo Colors, 368Android Lint Plugin, 299Android Parcelable Code Generator, 368creating, editors and, 352–354Genymotion, 371–373Google Cloud Messaging Notifi cation
Plugin, 299Google Play Android Publisher Plugin, 299installation, 364installed list, 364, 366IntelliJ, 331
creating, 333–336distribution, 360–362packaging, 360–362
JetBrains, 364, 365jimu Mirror, 370–371Key Prompter, 370strings.xml tools, 368third-party
ADB WIFI, 366Android Drawable Importer, 366–367Android Holo Colors, 368Android Parcelable Code Generator,
368Genymotion, 371–373jimu Mirror, 370–371Key Prompter, 370strings.xml tools, 368
Unicode conversion, 332Preferences window, Keymap page, 91–92Preview window, layouts, 120profi lers (Qualcomm), 399–401ProGuard, 153–155Project Structure window, 84, 85
Android NDK installation, 312–313build confi gurations, 163removing modules, 192–193
Project tool, 94–95Android Instrumentation Tests option, 95Android option, 95
Packages option, 95Problems option, 95Production option, 95Project Files option, 95Project option, 94Scratches option, 95Tests option, 95
Project view, 28–29Phone & Tablet module, 163
ProjectComponent interface, 343ProjectComponent interface (IntelliJ)ProjectComponent( ) method, 343String get ComponentName( ) method,
343void disposeComponent( ) method, 343void projectClosed( ) method, 343void projectOpened( ) method, 343
projectsactivities, 50
blank, 59–62customization, 51templates, 58Wear Activities, 53
Android NDK, 315–316building, 326–328development, 328–330Hello JNI, 319importing sample, 316–322migrating, 322–325release, 328–330
assets, 72building, 33–35CI and, 282–283Create New Project window, 48creating, 46–51folders, 31
build, 30build.gradle fi le, 30hidden, 29java, 30
418
PSI – Run menu
local.properties fi le, 30res, 32settings.gradle fi le, 30src/main, 30src/test and src/androidTest, 30
Git, creating, 248–249, 260–266GitHub
importing, 256path, 257
Gradle, modules, importing, 189IntelliJ, 342–343launching application, 54–56migrating, from Eclipse, 41–43modules, 78–79
adding, 160–161Android Auto, 182–184Android Library, 164–165Android TV, 173–179Android Wear, 169–173APKs, 161–162Build Variants window, 163build.gradle app, 166dependencies, 162, 165, 166expertlibrary, 166Glass, 179–182Google Cloud, 184–188Java classes, 166Java Library, 167–168multiple, 162Phone & Tablet, 161–164removing, 192–193shared resources, 166
package names, 47Project View, 51running, 33–35sample project, 22structure, 27–33target device, 48
multiple, 52–54PSI (Program Structure Interface) fi les,
IntelliJ, 342
QQualcomm third-party tools, 387
Adreno GPU, 388–389Adreno Profi le for GPU, 399–400AllPlay Click SDK, 397–399FastCV Computer Vision SDK, 389–393profi lers, 399–401Snapdragon LLVM Compiler for Android,
388Snapdragon Profi le for CPU, 399–401,
400–401Snapdragon SDK for Android, 393–396
RRAM, system requirements, 2Refactor menu, 82, 89refactoring, 102refactoring code
change signature, 109–110encapsulation, 109–110Pull Members Up, 108–109Push Members Down, 108–109renaming, 107–108resource extraction, 111
Relative layouts, 116repositories
Git, adding items, 262–263GitHub
creating, 253Desktop Client, 255list, 253path selection, 254remote, 257–258
res folder, 32resources
Android Library module, 166–167extracting, 111shared, modules, 166
Run menu, 82, 90Debug option, 199
419
Run window – SVN source control
Run window, 98–99running, modules, Android Wear, 170–173runReadAction method, 341runWriteAction method, 341
Ssample project
GitHub, 22Welcome screen, 22
Sample Setup window, 24San Angeles NDK sample application, 322SDK Manager, Android NDK, 311–312SDKs, 27
layout previewing, 121–122Sensor Graph NDK sample application, 322services, templates, 69–72settings.gradle fi le, 30shared resources, modules, 166shortcuts
adding, 92deleting, 92editing, 92Preferences window, Keymap page, 91–92
signing key, creating, 112–113Smart Type Completion, 101SMS (short messaging service), AVD and, 222Snapdragon LLVM Compiler for Android,
388Snapdragon Profi le for CPU, 399–401,
400–401Snapdragon SDK for Android, 393–396software tools
IntelC++ Compiler (ICC), 377–378Context Sensing SDK, 384–387GPA, 381–382INDE (Integrated Native Developer
Experience), 382Integrated Performance Primitives
(Intel IPP), 378–379
Multi-OS Engine, 382–384System Studio, 374–377Tamper Protection Toolkit, 382Thread Building Blocks (Intel TBB),
379VTune Amplifi er, 379–381
Qualcomm, 387Adreno GPU, 388–389Adreno Profi le for GPU, 399–400AllPlay Click SDK, 397–399FastCV Computer Vision SDK, 389–
393profi lers, 399–401Snapdragon LLVM Compiler for
Android, 388Snapdragon Profi le for CPU, 399–401,
400–401Snapdragon SDK for Android, 393–
396sound assets, 74–75source control systems
ClearCase, 245CVS, 245Git, 245
branches, 246–247commits, 246installation, 247–248
Mercurial, 245SourceSafe, 245SVN source control, 245
SourceSafe, 245src/main folder, 30src/test and scr/androidTest folder, 30strings.xml tools, 368strings.xml tools plugin, 368Structure window, 97superclassesBroadcastReceiver, 87extracting, 111
surrounding templates, 106–107SVN source control, 245
420
System Analyzer – threading
System Analyzer (Intel GPA), 381system requirements
GPU support, 2Linux, 2Mac OS X, 2RAM, 2Windows, 1–2
TTabbed Activity, 64–69Table layout, 117Teapot NDK sample application, 321templates. See also Live Templates
activitiesadding to projects, 58blank activities, 59–62
Android TV, 174Code menu, 88Empty Activity, 50, 58services, 69–72surrounding, 106–107
Terminal tool, 100testing
binary calculator example, 226–227BinaryFragment class, 229Calculator class, 229–230CalculatorFragment class, 228DecimalFragment class, 228integration tests, 232–233
Calculator class, 233–234History class, 233History mock implementation, 234–
235performance testing, 241–242
task, 242–244UI tests, 235–240unit tests
Calculator class, 230CalculatorTest class, 230–232
themes, layouts, 122–123third-party tools
IntelC++ Compiler (ICC), 377–378Context Sensing SDK, 384–387GPA, 381–382INDE (Integrated Native Developer
Experience), 382Integrated Performance Primitives
(Intel IPP), 378–379Multi-OS Engine, 382–384System Studio, 374–377Tamper Protection Toolkit, 382Thread Building Blocks (Intel TBB),
379VTune Amplifi er, 379–381
NVIDIA CodeWorks, 401–404plugins
ADB WIFI, 366Android Drawable Importer, 366–367Android Holo Colors, 368Android Parcelable Code Generator,
368Genymotion, 371–373jimu Mirror, 370–371Key Prompter, 370strings.xml tools, 368
Qualcomm, 387Adreno GPU, 388–389Adreno Profi le for GPU, 399–400AllPlay Click SDK, 397–399FastCV Computer Vision SDK, 389–
393profi lers, 399–401Snapdragon LLVM Compiler for
Android, 388Snapdragon Profi le for CPU, 399–401Snapdragon SDK for Android,
393–396threading, IntelliJ, 341
421
Tool Windows option – Unicode conversion plugin
Tool Windows optionAndroid Model, 92Android Monitor, 92Build Variants, 92Capture Analysis, 92Capture Tool, 92Captures, 92Debug, 92Designer, 92Event Log, 92Favorites, 92Gradle, 92Gradle Console, 92Maven Projects, 92Messages, 92Palette, 92Project, 92Run, 92Structure, 92Terminal, 92TODO, 92Version Control, 92
tools, 92–93Android Model view, 97–98Android Monitor, 96–97available, 93Debug window, 99–100Event Logs, 100Favorites, 96Gradle, 98Gradle Console, 98Messages, 93–94Project, 94–95Run window, 98–99Structure window, 97Terminal, 100
Tools menu, 82Translation Editor, 131–133tutorial applications, 162
UUbuntu, Jenkins and, 283–284UI (user interface), 115
activities, associations, 133–134asset management, 134–141color resources, 130dimen resources, 129drawables, 130layouts, 115
Design mode, 118–120Frame, 116–117Grid, 117Linear, 116new fi le, 116–118Palette tool, 123Palette view, 120previewing, 120, 121–122Relative, 116rendering options, 120–121Table, 117Text mode, 118–119themes, 122–123views and, 115widgets, 124–126widgets and, 115, 116XML and, 116
strings, 127styles, 127–129tests, 235–240
ApplicationTest, 237Translation Editor, 131–133View class, 115views, 115widgets, 115
Java and, 310XML fi les, 115
Unicode conversion plugin, 332, 352–353IntelliJ, 344–345
422
unit tests – windows
unit tests, 230–232Universal Music Player, debugging, 198–206user-defi ned activities, 58
Vvariables, extracting, 111VCS (Version Control System), 90VCS menu, 82, 90Vector Asset Studio, 140–141version control, 245, 261
distributed version control, 246listing systems, 261–262
VFS (Virtual File System), IntelliJ, 342video, assets, 75–76View class, 115View menu, 82, 86views
Hierarchy View (Device Monitor), 220–221virtual devices, previewing, 121, 122
virtual devicesconfi guration, 38, 39creating, 36–40list, 40TV, 174views, previewing, 121, 122Wear, 170–173
VirtualFileListener interface (IntelliJ)implementation, 345–346void beforeContentsChange event, 343void beforeFileDeletion event, 344void beforeFileMovement event, 344void beforePropertyChange event, 343void contentsChanged event, 343void fileCopied event, 344void fileCreated event, 343void fileDeleted event, 344void fileMoved event, 344void propertyChanged event, 343
WWAR fi les, Jenkins, 283Watches window, 205Wear Activities, 53Welcome screen, sample project, 22widgets, 116
Java and, 310View class and, 115
Window menu, 82, 90Windows
Git, installation, 247Java installation, 3–4
environment paths, 6–7installation setup window, 5setup wizard, 5
system requirements, 1–2windows
Asset Studio, 135Additional Padding, 137Asset Type, 136Background Color, 138Foreground, 136Foreground Scaling, 138Image File, 137Resource Name, 139Shape, 138
Debug, 99–100Close, 201Drop Frame, 202Evaluate Expression, 202–204Force Step Into, 202Frames, 204Help, 201Mute Breakpoints, 200Pause, 200Pin Tab, 201Restore Layout, 201Resume, 200
423
Windows 10 – XML
Run to Cursor, 202Settings, 201Show Execution Point, 201Step Into, 202Step Out, 202Step Over, 201Stop, 200Variables, 204View Breakpoints, 200Watches, 204–205
Project Structure, 84, 85Android NDK installation, 312–313build confi gurations, 163removing modules, 192–193
Windows 10Android NDK installation, 312–313Android Studio installation, 10–12environment paths, 6–7
wireless debugging, 197–198
X-Y -ZXML (eXtensible Markup Language)
Android Library module and, 164,166–167
fi les, 76user interfaces and, 115
layouts, 116