Leanpub Header

Skip to main content

用Jetpack Compose开发Android应用

3. 通过这本书的学习,读者可以轻松开发属于自己的Android应用,具有很强的实用价值和吸引力。

Minimum price

$19.00

$29.00

You pay

$29.00

Author earns

$23.20
$

...Or Buy With Credits!

You can get credits monthly with a Reader Membership
PDF
EPUB
123
Pages
About

About

About the Book

通过本书的学习,您可以全面掌握Jetpack Compose的知识和开发技能。本书从Jetpack Compose的概述和环境配置开始,介绍其中的组件、布局、样式、交互处理、状态管理等内容。并以两个应用案例的实践,帮助您轻松上手Jetpack Compose开发。

本书内容贴近实战,通俗易懂,每章节都有详细的代码示例。不论您是Android开发新手还是资深开发者,本书都能帮您快速掌握Jetpack Compose,开发出高质量的Android应用。

本书主要内容包括:

  • AndroidJetpackCompose简介
  • 环境搭建
  • 第一个例子
  • 布局
  • 常用组件
  • 事件处理
  • 状态管理
  • 材料组件库
  • 懒加载组件
  • 导航组件
  • MyNotesAPP开发

通过阅读本书,您将收获:

  • 掌握Jetpack Compose的全部知识,成为Jetpack Compose高手
  • 轻松开发高质量Android应用
  • 一款应用案例带来真实项目开发体验
  • 通俗易懂的语言和详尽的示例代码

本书适用于:

  • Android开发新手及初学者
  • 想要学习Jetpack Compose的Android工程师
  • 想要升级Android开发技能的工程师

让我们一起开始这个奇妙的Jetpack Compose学习之旅吧!相信阅读完本书,您会爱上Jetpack Compose开发。

Share this book

Categories

Author

About the Author

关东升

关东升,国内著名技术专家,架构师,项目经理、技术顾问,技术图书作家,51CTO学院金牌讲师。

擅长技术:

移动开发、前后端技术、游戏开发、数据库开发与设计、软件架构设计等多种IT技术。

20年教学经验:

教授近万名学员,近期为中国移动、中国联通、南方航空、中石油、工商银行、平安银行和天津港务局等企事业单位授课。

主讲课程:

iOS、Android、Java、Python、Kotlin等。

28年项目经验:

主要项目如下。

(1)参与设计和开发北京市公交一卡通百亿级大型项目。

(2)开发国家农产品追溯系统。

(3)开发大型网络游戏《神农诀》的iOS和Android客户端开发。

(4)酒店预订系统的iOS客户端开发。

(5)金融系统微博客户端开发。

著有50本多部畅销书:

近期出版图书如下。

《漫画Java》

《趣玩Python自动化办公真简单》

《看漫画学Python》

《Java从小白到大牛》

《Kotlin从小白到大牛》

《Python从小白到大牛》

《Android从小白到大牛Kotlin版》

《iOS开发指南 从零基础到App Store上架》

《iOS开发指南》

《iOS网络编程与云端应用最佳实践》

《iOS传感器应用开发最佳实践》

《iOS图形图像、动画和多媒体编程技术最佳实践》

《iPhone与 iPad开发实战——iOS 经典应用剖析》

《品味移动设计》

《交互设计的艺术》

《Android开发案例驱动教程》

《Android网络游戏开发实战》

《Cocos2d-x实战:C++卷》

《Cocos2d-x实战:JS卷——Cocos2d-JS开发》

《Cocos2d-x实战:Lua卷》

《Cocos2d-x实战:工具卷》

《Cocos2d-x实战:CocoStudio卷》

Contents

Table of Contents

  • 1. Android Jetpack Compose简介
    • 1.1 Jetpack Compose 的优点
    • 1.2 Jetpack Compose与传统Android UI开发的对比
    • 1.3 声明式与命令式开发模式比较
      • 1.3.1 命令式编程
      • 1.3.2 声明式编程
    • 1.4 本章总结
  • 2. Android Jetpack Compose环境搭建
    • 2.1 下载Android Studio
    • 2.2 安装Android SDK
    • 2.3 创建Android模拟器
    • 2.4 本章总结
  • 3. 第一个Jetpack Compose例子
    • 3.1 永远的Hello World
    • 3.2 庖丁解牛:分解的HelloWorld代码
    • 3.3 预览函数
    • 3.4 本章总结
  • 4. Jetpack Compose提供了一系列的布局组件
    • 4.1 Box布局
    • 4.2 使用Compose 修饰符
    • 4.4 Row布局
    • 4.5 把Column和Row布局组合起来
    • 4.6 使用ConstraintLayout构建复杂布局
    • 4.7 内容槽与布局
      • 4.7.1 声明槽API
      • 4.7.2 调用槽API
    • 4.8 本章总结
  • 5. Jetpack Compose 常用组件
    • 5.1 Text 组件
    • 5.2 Image 组件
      • 5.2.1 设置图像透明度
    • 5.3 TextField 组件
    • 5.4 复选框组件
    • 5.5 单选按钮组件
  • 6. Jetpack Compose 事件处理
    • 6.1 Jetpack Compose中事件处理
      • 6.1.1 处理组件事件处理过程
      • 6.1.2 常见组件的事件处理
    • 6.2 示例1:TextField组件的onValueChange事件
    • 6.3 示例2:Switch组件的onCheckedChange事件
    • 6.4 示例3:Slider组件的onValueChange事件
  • 7. Jetpack Compose 状态管理
    • 7.1 重构第6章示例
      • 7.1.1 重构【6.2.3 示例1】
      • 7.1.2 重构【6.2.4 示例2】
      • 7.1.3 重构【6.2.5 示例3】
  • 8. Jetpack Compose Materia组件库
    • 8.1 Material 组件
    • 8.2 脚手架
      • 8.2.1 基本的脚手架
      • 8.2.2 带有底部应用栏脚手架
      • 8.2.3 带有浮动操作按钮脚手架
    • 8.3 Snackbar组件
    • 8.4 Card 组件
  • 9. Jetpack Compose 懒加载组件
    • 9.1 使用惰加载组件LazyColumn
    • 9.2 使用惰加载组件LazyRow
    • 9.3 本章总结
  • 10. Jetpack Compose导航组件
    • 10.1 导航组件介绍
    • 10.2 示例1简单的导航
    • 10.3 示例2在屏幕间传递参数
    • 10.4 本章总结
  • The Leanpub 60 Day 100% Happiness Guarantee

    Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

    Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

    You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

    So, there's no reason not to click the Add to Cart button, is there?

    See full terms...

    Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

    We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

    (Yes, some authors have already earned much more than that on Leanpub.)

    In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

    Learn more about writing on Leanpub

    Free Updates. DRM Free.

    If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

    Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

    Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

    Learn more about Leanpub's ebook formats and where to read them

    Write and Publish on Leanpub

    You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

    Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

    Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

    Learn more about writing on Leanpub