没有合适的资源?快使用搜索试试~ 我知道了~
Android Studio 3.2 Development Essentials - Kotlin Edition Book-...
需积分: 9 17 下载量 152 浏览量
2019-01-04
11:49:41
上传
评论
收藏 16.37MB PDF 举报
温馨提示
试读
128页
Android Studio 3.2 Development Essentials - Kotlin Edition Book-Preview共128页
资源推荐
资源详情
资源评论
Android Studio 3.2
Development Essentials
Kotlin Edition
Android Studio 3.2 Development Essentials – Kotlin Edition
ISBN-13: 978-0960010929
© 2018 Neil Smyth / Payload Media, Inc. All Rights Reserved.
is book is provided for personal use only. Unauthorized use, reproduction and/or distribution strictly
prohibited. All rights reserved.
e content of this book is provided for informational purposes only. Neither the publisher nor the author oers
any warranties or representation, express or implied, with regard to the accuracy of information contained in
this book, nor do they accept any liability for any loss or damage arising from any errors or omissions.
is book contains trademarked terms that are used solely for editorial purposes and to the benet of the
respective trademark owner. e terms used within this book are not intended as infringement of any trademarks.
Rev: 1.0
i
Contents
Table of Contents
1. Introduction ............................................................................................................................................... 1
1.1 Downloading the Code Samples ....................................................................................................... 1
1.2 Feedback ............................................................................................................................................... 2
1.3 Errata..................................................................................................................................................... 2
2. Setting up an Android Studio Development Environment ....................................................................... 3
2.1 System Requirements .......................................................................................................................... 3
2.2 Downloading the Android Studio Package ..................................................................................... 3
2.3 Installing Android Studio ................................................................................................................... 3
2.3.1 Installation on Windows ............................................................................................................. 4
2.3.2 Installation on macOS ................................................................................................................. 4
2.3.3 Installation on Linux .................................................................................................................... 5
2.4 e Android Studio Setup Wizard .................................................................................................... 5
2.5 Installing Additional Android SDK Packages ................................................................................. 6
2.6 Making the Android SDK Tools Command-line Accessible ......................................................... 8
2.6.1 Windows 7..................................................................................................................................... 8
2.6.2 Windows 8.1 ................................................................................................................................. 9
2.6.3 Windows 10 ................................................................................................................................ 10
2.6.4 Linux ............................................................................................................................................ 10
2.6.5 macOS .......................................................................................................................................... 10
2.7 Updating Android Studio and the SDK ......................................................................................... 10
2.8 Summary ............................................................................................................................................ 10
3. Creating an Example Android App in Android Studio ........................................................................... 11
3.1 About the Project .............................................................................................................................. 11
3.2 Creating a New Android Project ..................................................................................................... 11
3.3 Dening the Project and SDK Settings .......................................................................................... 12
3.4 Creating an Activity .......................................................................................................................... 13
3.5 Modifying the Example Application ............................................................................................... 14
3.6 Reviewing the Layout and Resource Files ...................................................................................... 21
3.7 Adding Interaction ............................................................................................................................ 23
3.8 Summary ............................................................................................................................................ 24
4. Creating an Android Virtual Device (AVD) in Android Studio ............................................................. 25
4.1 About Android Virtual Devices ...................................................................................................... 25
4.2 Creating a New AVD ........................................................................................................................ 26
4.3 Starting the Emulator ........................................................................................................................ 27
4.4 Running the Application in the AVD ............................................................................................. 27
4.5 Run/Debug Congurations.............................................................................................................. 29
4.6 Stopping a Running Application ..................................................................................................... 30
4.7 AVD Command-line Creation ........................................................................................................30
4.8 Android Virtual Device Conguration Files ................................................................................. 32
4.9 Moving and Renaming an Android Virtual Device ..................................................................... 32
4.10 Summary .......................................................................................................................................... 32
ii
Table of Contents
5. Using and Conguring the Android Studio AVD Emulator .................................................................. 33
5.1 e Emulator Environment .............................................................................................................33
5.2 e Emulator Toolbar Options ........................................................................................................ 33
5.3 Working in Zoom Mode .................................................................................................................. 35
5.4 Resizing the Emulator Window....................................................................................................... 35
5.5 Extended Control Options ............................................................................................................... 35
5.5.1 Location ....................................................................................................................................... 35
5.5.2 Cellular ........................................................................................................................................ 36
5.5.3 Camera ......................................................................................................................................... 36
5.5.4 Battery .......................................................................................................................................... 36
5.5.5 Phone ........................................................................................................................................... 36
5.5.6 Directional Pad ........................................................................................................................... 36
5.5.7 Microphone ................................................................................................................................. 36
5.5.8 Fingerprint .................................................................................................................................. 36
5.5.9 Virtual Sensors ............................................................................................................................36
5.5.10 Snapshots ...................................................................................................................................36
5.5.11 Screen Record ........................................................................................................................... 36
5.5.12 Google Play ............................................................................................................................... 37
5.5.13 Settings ...................................................................................................................................... 37
5.5.14 Help ............................................................................................................................................ 37
5.6 Working with Snapshots ................................................................................................................... 37
5.7 Drag and Drop Support .................................................................................................................... 38
5.8 Conguring Fingerprint Emulation ............................................................................................... 39
5.9 Summary ............................................................................................................................................ 40
6. A Tour of the Android Studio User Interface .......................................................................................... 41
6.1 e Welcome Screen ......................................................................................................................... 41
6.2 e Main Window ............................................................................................................................ 42
6.3 e Tool Windows ............................................................................................................................ 43
6.4 Android Studio Keyboard Shortcuts .............................................................................................. 46
6.5 Switcher and Recent Files Navigation ............................................................................................ 46
6.6 Changing the Android Studio eme ............................................................................................ 47
6.7 Summary ............................................................................................................................................ 47
7. Testing Android Studio Apps on a Physical Android Device .................................................................. 49
7.1 An Overview of the Android Debug Bridge (ADB) ..................................................................... 49
7.2 Enabling ADB on Android based Devices .................................................................................... 49
7.2.1 macOS ADB Conguration ...................................................................................................... 50
7.2.2 Windows ADB Conguration .................................................................................................. 51
7.2.3 Linux adb Conguration ........................................................................................................... 52
7.3 Testing the adb Connection ............................................................................................................. 52
7.4 Summary ............................................................................................................................................ 53
8. e Basics of the Android Studio Code Editor ........................................................................................ 55
8.1 e Android Studio Editor............................................................................................................... 55
8.2 Splitting the Editor Window ............................................................................................................ 57
8.3 Code Completion .............................................................................................................................. 58
8.4 Statement Completion ...................................................................................................................... 59
8.5 Parameter Information ..................................................................................................................... 59
8.6 Parameter Name Hints ..................................................................................................................... 60
iii
Table of Contents
8.7 Code Generation ............................................................................................................................... 60
8.8 Code Folding ...................................................................................................................................... 61
8.9 Quick Documentation Lookup ....................................................................................................... 62
8.10 Code Reformatting..........................................................................................................................63
8.11 Finding Sample Code ..................................................................................................................... 63
8.12 Summary .......................................................................................................................................... 64
9. An Overview of the Android Architecture .............................................................................................. 65
9.1 e Android Soware Stack ............................................................................................................ 65
9.2 e Linux Kernel ...............................................................................................................................66
9.3 Android Runtime – ART .................................................................................................................. 66
9.4 Android Libraries .............................................................................................................................. 66
9.4.1 C/C++ Libraries ......................................................................................................................... 67
9.5 Application Framework .................................................................................................................... 67
9.6 Applications ....................................................................................................................................... 68
9.7 Summary ............................................................................................................................................ 68
10. e Anatomy of an Android Application .............................................................................................. 69
10.1 Android Activities ........................................................................................................................... 69
10.2 Android Fragments .........................................................................................................................69
10.3 Android Intents ............................................................................................................................... 70
10.4 Broadcast Intents .............................................................................................................................70
10.5 Broadcast Receivers ........................................................................................................................ 70
10.6 Android Services ............................................................................................................................. 70
10.7 Content Providers ...........................................................................................................................71
10.8 e Application Manifest ............................................................................................................... 71
10.9 Application Resources .................................................................................................................... 71
10.10 Application Context ...................................................................................................................... 71
10.11 Summary ........................................................................................................................................ 71
11. An Introduction to Kotlin ...................................................................................................................... 73
11.1 What is Kotlin? ................................................................................................................................ 73
11.2 Kotlin and Java ................................................................................................................................. 73
11.3 Converting from Java to Kotlin ..................................................................................................... 73
11.4 Kotlin and Android Studio ............................................................................................................ 74
11.5 Experimenting with Kotlin ............................................................................................................ 74
11.6 Semi-colons in Kotlin ..................................................................................................................... 75
11.7 Summary .......................................................................................................................................... 75
12. Kotlin Data Types,Variables and Nullability ......................................................................................... 77
12.1 Kotlin Data Types ............................................................................................................................ 77
12.1.1 Integer Data Types ................................................................................................................... 78
12.1.2 Floating Point Data Types ...................................................................................................... 78
12.1.3 Boolean Data Type ................................................................................................................... 78
12.1.4 Character Data Type ................................................................................................................ 78
12.1.5 String Data Type ....................................................................................................................... 78
12.1.6 Escape Sequences ..................................................................................................................... 79
12.2 Mutable Variables ............................................................................................................................ 80
12.3 Immutable Variables ....................................................................................................................... 80
12.4 Declaring Mutable and Immutable Variables .............................................................................. 80
12.5 Data Types are Objects ................................................................................................................... 80
剩余127页未读,继续阅读
资源评论
niujiesoft
- 粉丝: 1
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- NetOps-py通过sftp替换网络设备启动文件
- STM32单片机FPGA毕设电路原理论文报告任务驱动教学法在单片机课程教学中的应用
- STM32单片机FPGA毕设电路原理论文报告任务驱动法在单片机教学中的应用
- STM32单片机FPGA毕设电路原理论文报告人造金刚石压机智能化压力测控系统设计
- 以某列为依据匹配多项(Excel版)
- STM32单片机FPGA毕设电路原理论文报告人体短臂离心机实验台的显示控制系统
- STM32单片机FPGA毕设电路原理论文报告人工气候室监控系统的环境控制器研究
- STM32单片机FPGA毕设电路原理论文报告染整自动线张力控制系统的设计
- 数据挖掘与机器学习-实验
- 基于Linux系统Nginx的动态网站的LNMP环境源码包
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功