{{sellerTotalView > 1 ? __("sellers", {number: sellerTotalView}) : __("seller", {number: sellerTotalView}) }}, {{numTotalView > 1 ? __("items", {number: numTotalView}) : __("item", {number: numTotalView}) }}
free FREE

Change Your Zip Code

Inventory information and delivery speeds may vary for different locations.

Location History

{{email ? __('Got it!') : __('Restock Alert')}}

We will notify you by email when the item back in stock.

Cancel
Yami

Jingdong book

Android开发进阶 从小工到专家

{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}

Android开发进阶 从小工到专家

{{__(":people-members", {'people': item.limit_people_count})}} {{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ item.invalid_price }} {{ itemDiscount }}
Ends in
{{ itemCurrency }}{{ item.valid_price }}
{{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }}
{{ itemDiscount }}
{{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }} {{ itemCurrency }}{{ item.invalid_price }} {{itemDiscount}}
{{ itemCurrency }}{{ item.valid_price }}
Sale ends in
Sale will starts after Sale ends in
{{ getSeckillDesc(item.seckill_data) }}
{{ __( "Pay with Gift Card to get sale price: :itemCurrency:price", { 'itemCurrency' : itemCurrency, 'price' : (item.giftcard_price ? priceFormat(item.giftcard_price) : '0.00') } ) }} ({{ itemCurrency }}{{ priceFormat(item.giftcard_price / item.bundle_specification) }}/{{ item.unit }}) Details
Best before

Currently unavailable.

We don't know when or if this item will be back in stock.

Unavailable in your area.
Sold Out

Details

Full product details
Editer Recommend

阿里巴巴高级工程师、CSDN博客专家、畅销书作者撰写,百度、腾讯等专家推荐的精品图书
一本只有干货,绝无赘述的好书
结合作者多年开发经验的总结,把作者以前开发走过的坑和陷阱讲解出来,看了以后可以少走很多弯路,提升自己的开发能力很快,抓住开发的痛点和需求讲解内容,使读者阅读后很有成就感。
除了全面讲解了Android开发知识外,还对单元测试、代码规范、版本控制、重构、架构等重要知识点进行了讲解,使得读者在深入技术的同时开阔眼界,能够以更专业的方式设计应用软件,完成从只会实现功能的“码农”到软件工程师、设计师的过渡。
Content Description

本书是一本专门介绍Android开发的图书。书中首先对Android开发的核心知识点进行深入讲解,然后介绍单元测试、代码规范、版本控制、重构、架构等重要的知识,使得读者在深入掌握技术的同时也帮助他们开阔眼界,且能够以更专业的方式设计应用软件,完成从只会实现功能的初级程序员到软件工程师、设计师的转变。
本书的主要内容为:构成Android系统基石的四大组件、创造出丰富多彩的UI设计的控件、保证App流畅的多线程开发、必知必会的HTTP网络请求应用、数据存储的核心SQLite数据库、让程序的性能优化、让程序更整洁的代码规范、管理程序的好帮手Git版本控制,以及需要掌握的高级技术,如单元测试、六大原则与设计模式、重构和综合实战等。
本书适合Android开发初学者、程序员学习,也适合作为大中专院校相关专业的师生用书和培训学校的教材。
Author Description

何红辉 : 前友盟(阿里巴巴集团)Android工程师,CSDN博客专家,活跃于国内各大技术社区,热爱开源,热爱技术,热爱分享。Android事件总线开源库(AndroidEventBus)、Colorful作者,开发技术前线站长。
Catalogue

第1章Android的构成基石—四大组件1
1.1Activity1
1.1.1Activity的构成3
1.1.2Activity的4种启动模式5
1.1.3FragmentActivity与Fragment7
1.2Service与AIDL8
1.2.1普通Service8
1.2.2IntentService9
1.2.3运行在前台的Service10
1.2.4AIDL(Android接口描述语言)11
1.3Broadcast(广播)17
1.3.1普通广播17
1.3.2有序广播18
1.3.3本地广播19
1.3.4sticky广播19
1.4ContentProvider(外共享数据)19
1.5小结26
第2章创造出丰富多彩的UI—
View与动画27
2.1重要的View控件27
2.1.1ListView与GridView27
2.1.2数据展示更好的实现——
RecyclerView32
2.1.3让页面显示更流畅——ViewPager33
2.2必须掌握的最重要的技能—
自定义控件35
2.2.1最为自由的一种实现——自定义View36
2.2.2View的尺寸测量38
2.2.3Canvas与Paint(画布与画笔)42
2.2.4自定义ViewGroup45
2.3Scroller的使用46
2.4让应用更精彩—动画56
2.4.1帧动画57
2.4.2补间动画58
2.4.3属性动画60
2.4.3.1属性动画的核心类——
ValueAnimator60
2.4.3.2对任意属性进行动画操作——
ObjectAnimator61
2.4.3.3实现丰富多彩的动画效果——
AnimatorSet62
2.4.3.4动画执行时间——TypeEvaluator与TimeInterpolator63
2.5小结66
第3章保证App流畅的关键因素—
多线程67
3.1Android中的消息机制67
3.1.1处理消息的手段——Handler、Looper与MessageQueue67
3.1.2在子线程中创建Handler为何
会抛出异常72
3.2Android中的多线程73
3.2.1多线程的实现——Thread和Runnable73
3.2.2线程的wait、sleep、join和
yield74
3.2.3与多线程相关的方法——Callable、Future和FutureTask78
3.2.4构建服务器应用程序的有效
方法——线程池81
3.2.4.1启动指定数量的线程——
ThreadPoolExecutor82
3.2.4.2定时执行一些任务——Scheduled ThreadPoolExecutor85
3.2.4.3线程池的使用准则86
3.2.5同步集合87
3.2.5.1程序中的优化策略——
CopyOnWriteArrayList87
3.2.5.2提高并发效率——
ConcurrentHashMap88
3.2.5.3有效的方法——
BlockingQueue88
3.2.6同步锁89
3.2.6.1同步机制关键字——
synchronized89
3.2.6.2显示锁—— ReentrantLock与
Condition90
3.2.6.3信号量Semaphore93
3.2.6.4循环栅栏CyclicBarrier94
3.2.6.5闭锁CountDownLatch95
3.2.7创建异步任务更简单——
AysncTask的原理97
3.2.7.1AsyncTask的实现基本原理97
3.2.7.2实现一个简单的AsyncTask105
3.3小结108
第4章HTTP网络请求109
4.1HTTP网络请求原理109
4.1.1HTTP的请求方式110
4.1.1.1GET请求110
4.1.1.2POST请求110
4.1.1.3PUT请求111
4.1.1.4DELETE请求111
4.1.1.5HEAD请求112
4.1.1.6TRACE请求112
4.1.1.7OPTIONS请求113
4.1.2HTTP报文格式解析113
4.1.2.1响应报文116
4.1.2.2常见的请求头部117
4.1.3简单模拟HTTP服务器117
4.2Android中执行网络请求126
4.2.1全面支持HTTP协议——
HttpClient126
4.2.2最佳选择——HttpURLConnection128
4.3网络框架的设计与实现130
4.3.1SimpleNet的基本架构130
4.3.2Request类131
4.3.3Response类135
4.3.4请求队列136
4.3.5NetworkExecutor网络执行器137
4.3.6执行网络请求的接口——
HttpStack139
4.3.7将请求的回调执行到UI线程——
ResponseDelivery142
4.3.8手动实现文件上传144
4.3.8.1自定义实现MultipartEntity144
4.3.8.2SimpleNet中实现文件上传149
4.4小结151
第5章独特高效的数据存储—SQLite
数据库152
5.1SQLite3的基本介绍152
5.1.1SQLite前端解析系统153
5.1.2SQLite后端引擎154
5.2SQLite中的SQL语句154
5.2.1创建数据库154
5.2.2创建表154
5.2.3插入数据159
5.2.4select语句161
5.2.5update语句168
5.2.6delete语句169
5.2.7修改表169
5.2.8创建索引170
5.2.9创建视图171
5.2.10创建触发器171
5.2.11drop命令172
5.3Android中的数据库开发173
5.3.1数据库基本类型与接口173
5.3.2Android数据库使用示例177
5.3.3数据库升级181
5.3.4Android中数据库的异步操作181
5.4数据库框架ActiveAndroid的使用与
基本原理184
5.4.1使用ActiveAndroid184
5.4.2数据库升级188
5.4.3基本原理189
5.5小结196
第6章让程序更优秀的技术—性能
优化197
6.1布局优化197
6.1.1include布局197
6.1.2merge标签201
6.1.3ViewStub视图204
6.1.4减少视图树层级209
6.2内存优化211
6.3内存泄漏216
6.3.1使用 Memory Monitor216
6.3.2内存泄漏检测利器——
LeakCanary218
6.4性能优化222
6.4.1过度绘制222
6.4.2Android 图形渲染223
6.4.3数据采集和分析工具——
TraceView227
6.5小结231
第7章装点程序“门面”—代码规范232
7.1代码规范的第一个重点—排版232
7.1.1代码缩进232
7.1.2长句分割233
7.1.3一句一行233
7.1.4大括号233
7.1.5空行分隔234
7.1.6空行分隔234
7.1.7数据与函数的排布235
7.1.8修饰词顺序235
7.2注释235
7.2.1类注释236
7.2.2注释的位置236
7.2.3函数的注释237
7.2.4异常的注释237
7.3命名238
7.3.1包的命名238
7.3.2类与接口的命名238
7.3.3函数命名238
7.3.4setter和getter238
7.3.5字段名239
7.3.6字段名239
7.4编码建议239
7.4.1beak语句239
7.4.2覆写时添加@Override239
7.4.3指定集合中的元素类型240
7.4.4显示指明操作符优先级240
7.5小结240
第8章让不断升级的系统更好管理—
Git版本控制241
8.1Git起源243
8.2Git基本原理243
8.2.1直接记录快照,而非差异
比较243
8.2.2近乎所有操作都是本地执行244
8.2.3时刻保持数据完整性245
8.2.4多数操作仅添加数据245
8.2.5文件的3种状态245
8.3Git基本配置246
8.4Git基本命令247
8.4.1进行版本控制的第一步——
Gitinit248
8.4.2常用的版本控制命令——
Gitstatus248
8.4.3添加到追踪列表中——Git add248
8.4.4提交——Git commit249
8.4.5查看项目历史记录——Git log250
8.4.6下载程序——Git clone250
8.4.7不同分支——Git branch251
8.4.8签出一个分支——Git checkout251
8.4.9合并分支——Git merge253
8.4.10解决冲突254
8.4.11为版本打一个标签——Git tag255
8.4.12帮助文档——Git help256
8.5项目协作—GitHub256
8.5.1SSH key配置257
8.5.2项目托管——it remote258
8.5.3将项目推送到远程仓库——
Gitpush259
8.5.4更新最代码——Git pull260
8.5.5Giti gnore忽略文件261
8.5.6Fork 加Pull request多人协作
模式262
第9章开发人员必备的技能—
单元测试267
9.1什么是单元测试267
9.2为什么要做单元测试267
9.3不写单元测试的借口268
9.4如何写单元测试269
9.4.1第一个单元测试269
9.4.2Junit简介272
9.4.2.1Junit执行流程273
9.4.2.2Junit的断言和失败提示273
9.4.2.3运行多个测试类——
TestSuite274
9.5测试哪些内容275
9.5.1边界条件275
9.5.2覆盖执行路径275
9.6模拟所需的功能模块—Mock
对象278
9.6.1手动Mock对象278
9.6.2使用Mockito库279
9.6.2.1验证某些行为280
9.6.2.2如何做一些测试桩(Stub)280
9.6.2.3参数匹配器281
9.6.2.4验证函数的确切调用次数、
最少调用、从未调用281
9.6.2.5确保交互操作没有执行
在Mock对象上282
9.6.2.6简化Mock对象的创建282
9.6.2.7为连续的调用做测试
桩(stub)283
9.6.2.8为回调做测试桩283
9.6.2.9doReturn()、doThrow()、
doAnswer()、doNothing()
和doCallRealMethod()系列
方法的运用283
9.6.2.10监控真实对象284
9.6.2.11为下一步的断言捕获参数285
9.6.2.12综合示例演练285
9.7Android中的单元测试288
9.7.1第一个单元测试288
9.7.2使用Instrumentation测试290
9.7.2.1需要Context的测试用例290
9.7.2.2测试Activity290
9.7.2.3测试Service293
9.7.2.4测试ContentProvider295
9.8测试驱动开发(TDD)简介298
9.9小结300
第10章六大原则与设计模式301
10.1面向对象六大原则301
10.1.1单一职责原则301
10.1.2里氏替换原则302
10.1.3依赖倒置原则304
10.1.4开闭原则304
10.1.5接口隔离原则306
10.1.6迪米特原则308
10.2设计模式309
10.3避免掉进过度设计的怪圈310
10.4反模式311
10.5小结311
第11章使系统适应变化—重构312
11.1为什么要重构312
11.2什么时候重构313
11.3常用的重构手法313
11.3.1提取子函数313
11.3.2上移函数到父类316
11.3.3下移函数到子类318
11.3.4封装固定的调用逻辑320

11.3.5使用泛型去除重复逻辑320
11.3.6使用对象避免过多的参数322
11.3.7重构的支柱——转移函数324
11.3.8将类型码的转为状态模式326
11.3.9什么也不做的对象——NullObject
模式329
11.3.10使类保持“苗条身材”——分解“胖”类型331
11.4小结334
第12章从码农历练成工程师—
综合实战335
12.1项目需求335
12.2第一版实现336
12.3第一版存在的问题与重构352
12.3.1类型重命名352
12.3.2去除重复代码353
12.3.3简化复杂的函数356
12.3.4明确职责与降低耦合358
12.4降低复杂性—MVP架构362
12.5开启单元测试之路—
添加单元测试367
12.5.1创建测试工程367
12.5.2测试网络请求解析类369
12.5.3测试数据库操作类371
12.5.4测试业务逻辑Presenter374
12.5.5模拟对象375
12.5.6更多测试377
12.6小结378

Specifications

Brand Jingdong book
Brand Origin China

Disclaimer

Product packaging, specifications and price are subject to change without notice. All information about the products on our website is provided for information purposes only. Please always read labels, warnings and directions provided with the product before use.

View Full Terms of Use
Add to favorites
{{ $isZh ? coupon.coupon_name_sub : coupon.coupon_ename_sub | formatCurrency }}
{{__("Buy Directly")}} {{ itemCurrency }}{{ item.directly_price }}
Quantity
{{ quantity }}
{{ instockMsg }}
{{ limitText }}
{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}
Sold by JD@CHINA
Ship to
{{ __("Ship to United States only") }}
Free shipping over 69
Genuine guarantee

Added to Cart

Keep Shopping

More to Consider

{{ item.brand_name }}

{{ item.item_name }}

{{ item.currency }}{{ item.market_price }}

{{ item.currency }}{{ item.unit_price }}

{{ item.currency }}{{ item.unit_price }}

Coupons

{{ coupon.coupon_name_new | formatCurrency }}
Clip Clipped Over
{{ getCouponDescStr(coupon) }}
{{ coupon.use_time_desc }}
Expires soon {{ formatTime(coupon.use_end_time) }}

Share this item with friends

Cancel

Yami Gift Card

Get this exclusive deal when paying with gift card

Terms and Conditions

Gift card deals are special offers for selected products;

The gift card deals will automatically be activated if a customer uses gift card balance at check out and the balance is sufficient to pay for the total price of the shopping cart products with gift card deals;

You will not be able to activate the gift card deals if you choose other payment methods besides gift card. The products will be purchased at their normal prices;

If your account balance is not enough to pay for the products with gift card deals, you can choose to reload your gift card balance by clicking on the Reload button at either shopping cart page or check out page;

Products that have gift card deals can be recognized by a special symbol showing 'GC Deal';

For any additional questions or concerns, please contact our customer service;

Yamibuy reserves the right of final interpretation.

Sold by Yami

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

Yami is committed to provide our customers with a peace of mind when purchasing from us. Most items shipped from Yamibuy.com can be returned within 30 days of receipt of shipment (For Food, Beverages, Snacks, Dry Goods, Health supplements, Fresh Grocery and Perishables Goods, within 7 days of receipt of shipment due to damages or quality issues; To ensure that every customer receives safe and high-quality products, we do not provide refunds or returns for beauty products once they have been opened or used, except in the case of quality issues; Some products may have different policies or requirements associated with them, please see below for products under special categories, or contact Yami Customer Service for further assistance).
Thank you for your understanding and support.

Learn More

Sold by Yami

Terms and Conditions of Yami E-Gift Card

If you choose “Redeem automatically” as your delivery method, your gift card balance will be reload automatically after your order has been processed successfully;

If you choose “Send to Email”as your delivery method, the card number and CVV will be sent to the email address automatically;

Any user can use the card number and CVV to redeem the gift card, please keep your gift card information safely. If you have any trouble receiving email, please contact Yami customer service;

Yami gift card can be used to purchase both Yami owned or Marketplace products;

Yami gift card will never expire;

Yami gift card balance does not have to be used up at once;

All rights reserved by Yami.

Return Policy

Gift card that has already been consumed is non-refundable.

Sold by JD@CHINA

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Sold by JD@CHINA

Service Guarantee

Yami Cross-store Free Shipping over $69
Yami 30-days Return

Yami-China FC

Yami has a consolidation warehouse in China which collects multiple sellers’ packages and combines to one order. Our Yami consolidation warehouse will directly ship the packages to your door. Cross-store free shipping over $69.

Return Policy

You may return products within 30 days upon receiving the products. Sellers take responsibilities for any wrong shipment or missing items. Packing needs to be unopened for any other than quality issues return. We promise to pack carefully, but because goods are taking long journey to destinations, simple damages to packaging may occur. Any damages not causing internal goods quality problems are not allowed to return. If you open the package and any quality problem is found, please contact customer service within three days after receipt of goods.

Shipping Information

Yami Consolidation Service Shipping Fee $9.99(Free shipping over $69)

Sellers in China will ship their orders within 1-2 business days once the order is placed. Packages are sent to our consolidation warehouse in China and combined there. Our Yami consolidation warehouse will directly ship the packages to you via UPS. The average time for UPS to ship from China to the United States is about 10 working days and it can be traced using the tracking number. Due to the pandemic, the delivery time may be delayed by about 5 days. The package needs to be signed by the guest. If the receipt is not signed, the customer shall bear the risk of loss of the package.

Sold by JD@CHINA

Service Guarantee

Free shipping over 69
Genuine guarantee

Shipping

Yami Consolidated Shipping $9.99(Free shipping over $69)


Seller will ship the orders within 1-2 business days. The logistics time limit is expected to be 7-15 working days. In case of customs clearance, the delivery time will be extended by 3-7 days. The final receipt date is subject to the information of the postal company.

Yami Points information

All items are excluding from any promotion or points events on Yamibuy.com

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Yami

Download the Yami App

Back Top

Recommended for You

About the brand

Jingdong book

为您推荐

Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折

Reviews{{'('+ commentList.posts_count + ')'}}

Have your say. Be the first to help other guests.

Write a review
{{ totalRating }} Write a review
  • {{i}} star

    {{i}} stars

    {{ parseInt(commentRatingList[i]) }}%

Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}
Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}

No related comment~

Review

Yami Yami

{{ showTranslate(commentDetails) }}Show Less

{{ strLimit(commentDetails,800) }}Show more

Show Original

{{ commentDetails.content }}

Yami
Show All

{{ formatTime(commentDetails.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ commentDetails.likes_count }} {{ commentDetails.likes_count }} {{ commentDetails.reply_count }} {{commentDetails.in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Comments{{'(' + replyList.length + ')'}}

Yami Yami

{{ showTranslate(reply) }}Show Less

{{ strLimit(reply,800) }}Show more

Show Original

{{ reply.reply_content }}

{{ formatTime(reply.reply_in_dtm) }}

{{ reply.reply_likes_count }} {{ reply.reply_likes_count }} {{ reply.reply_reply_count }} {{reply.reply_in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Cancel

That’s all the comments so far!

Write a review
How would you rate this item?

Please add your comment.

  • A nice nickname will make your comments more popular!
  • The nickname in your account will be changed to the same as here.
Thanks for your review
Our community rely on great reviews like yours to find the best of Asia.

Report

If you find this content inappropriate and think it should be removed from the Yami.com site, let us know please.

Cancel

Are you sure to delete your review?

Cancel

You’ve Recently Viewed

About the brand

Jingdong book