First Line of Code: Android (3rd Edition) cover

First Line of Code: Android (3rd Edition)

Rating 4.3
Word count
690K words
Chapters
17
Series
Turing Original
ISBN
9787115524836

Tags

Summary

First Line of Code: Android is an introductory book for Android beginners by Guo Lin and one of the most widely circulated Android learning books in China. The third edition fully updates the previous edition for Android 10.0: the programming language changes from Java to Kotlin, which Google promotes, all code is rewritten in Kotlin, and a new introduction to Kotlin is added so that readers without prior Kotlin knowledge can start directly. It also covers new system features—notification channels and adaptive app icons in Android 8.0, the cleartext network traffic restriction in Android 9.0, and dark theme in Android 10.0—and systematically introduces Jetpack architecture components and the MVVM pattern. The book follows the path of "get it running first, then explain the principles, and finally build a project": Chapter 1 sets up the development environment and runs the first Hello World program; Chapter 2 gives a quick introduction to Kotlin; Chapters 3 to 14 cover Activity, UI layouts and widgets, Fragment, the broadcast mechanism, data persistence, ContentProvider, multimedia, Service, networking and Material Design, Jetpack components, and Git; Chapter 15 demonstrates the full implementation of the MVVM architecture through a weather forecast app; Chapter 16 guides readers through writing and publishing an open-source library, PermissionX. The sample code in the book runs directly, and the language is plain, making it the first choice for many developers starting with Android.

Editor's review

如果你只想买一本Android入门书,这一本几乎是最稳妥的选择。作者郭霖是CSDN上最受欢迎的Android技术博主之一,也是开源框架LitePal的作者,写作时坚持“站在初学者角度”,把每个概念拆到能跟着敲代码的程度。 第3版的变化相当彻底:全面改用Kotlin重写,并专门辟出一章讲Kotlin语法,因此读者不必先补Java或Kotlin课程;同时把Android 8.0到10.0的新特性、Jetpack组件、协程与Retrofit、MVVM架构都编排进了正文,读完不至于只学到“过时两年的写法”。最后两章一个是完整的天气预报App,一个是从零编写并发布开源库PermissionX,把“学知识”和“做出东西”连成一条线。 它不讲深奥的Framework源码,也不追求大而全,胜在路线清晰、例子能跑、语言不端着,很适合当作踏入Android开发的第一块踏板。

Who it's for

A good fit for

  • 有基本编程概念、想系统入门Android开发的学生与转行者
  • 会Java但想转用Kotlin写Android的开发者
  • 需要一本可随手查阅的Android基础参考书的初中级工程师
  • 高校移动开发课程的学生与任课教师,可作为教材配套使用

Not a good fit for

  • 想深入研读Android Framework源码与系统底层机制的高级开发者
  • 希望专攻Compose、Flutter等新式声明式UI框架的读者
  • 完全没有编程经验、需要从变量与循环学起的零基础读者

Reading tips

  1. 务必边读边敲:每章示例都亲手运行一遍,比只看代码收获大得多。
  2. 先花一周过第1、2章,把环境与Kotlin语法打通,再进入组件章节。
  3. 第15、16章的实战项目建议独立重写一遍,遇到卡壳再回查对应章节。
  4. 可配合官方文档使用,遇到API变动时期刊以developer.android.com为准。

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. Preface
  2. Chapter 1 Getting Started—Your First Line of Android Code
  3. Chapter 2 Exploring a New Language: A Quick Introduction to Kotlin
  4. Chapter 3 Starting with What You Can See: Exploring Activity
  5. Chapter 4 Apps Need Good Looks Too: All About UI Development
  6. Chapter 5 Phones and Tablets Together: Exploring Fragment
  7. Chapter 6 The Global Loudspeaker: The Broadcast Mechanism Explained
  8. Chapter 7 Complete Data Storage: Persistence Techniques Explained
  9. Chapter 8 Sharing Data Across Apps: Exploring ContentProvider
  10. Chapter 9 Enriching Your App: Using Phone Multimedia
  11. Chapter 10 The Silent Worker in the Background: Exploring Service
  12. Chapter 11 See the Wonderful World: Using Networking
  13. Chapter 12 The Best UI Experience: Material Design in Practice
  14. Chapter 13 Advanced Development Components: Exploring Jetpack
  15. Chapter 14 Going Further: Advanced Techniques You Should Also Master
  16. Chapter 15 Into Practice: Building a Weather Forecast App
  17. Chapter 16 Writing and Publishing an Open-Source Library: PermissionX

FAQ

这本书需要先学Java吗?
不需要。第3版已改为使用Kotlin,并在第2章专门讲解Kotlin基础语法,读者只要具备基本的编程思维(如变量、函数、面向对象的概念)即可跟上。
第2版和第3版差别大吗?
差别很大。第3版把开发语言从Java换成Kotlin,全书代码重写,基于Android 10.0重新适配知识点,并新增Kotlin入门、Jetpack、协程、Retrofit、MVVM及一个新的实战章节。已有第2版的读者仍值得升级。
这本书适合当教材或自学教材吗?
适合。书中章节顺序循序渐进,每章末有小结,配套提供源码、思维导图和PPT课件,多所高校将其列为移动开发课程参考书;自学读者按章节顺序推进即可。
书中的代码现在还能跑吗?
书中示例基于Android 10.0与当时的Android Studio版本。Android工具链更新较快,建议使用较新的Android Studio打开配套源码,遇到API变更时对照官方文档做少量调整,核心知识点仍然适用。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

About the author

郭霖 Author

Guo Lin: public information about this author is limited, and currently only one work is known, Interpersonal Communication and Public Expression, classified under inspirational growth. Judging from the title, the book concerns the transmission of information between people, the building of relationships, and the ability to speak in public settings, placing it in the practical writing category aimed at general readers. Works of this kind usually start from everyday interaction and workplace situations and discuss listening, wording, emotional awareness, and methods of speaking before an audience, in a style that tends to be plain, direct, and easy to apply rather than academically dense. On the available evidence, Guo Lin's writing centers on this theme of communication and expression, while details of the author's background, professional experience, and full body of work await further information. Readers interested in interpersonal skills and expression techniques may find this book a useful introductory reference on the topic.

More by the same author

Top rated in the same category