Skip to Content
Android Developer Tools深入精要
book

Android Developer Tools深入精要

by Mike Wolfson
July 2014
Intermediate to advanced
248 pages
5h 19m
Chinese
GoTop Information, Inc.
Content preview from Android Developer Tools深入精要
UI
效能的介紹
|
197
第十三章:最佳化使用者介面
第十三章
最佳化使用者介面
[Page-201]
先前的章節在介紹建立動態且高效能的版面,一些工具可以打造出不錯的
UI
,但你可
能需要做些額外的工作以打造更傑出的
UI
;本章討論的各種工具能幫助你提升介面程
式碼的效能,我將會說明如何使用這些工具來消除:
緩慢或抖動的重繪速率
無回應、效能低落的
UI
UI
效能的介紹
除了第
11
章所介紹到的內容之外,還有一些關於
Android
如何建立使用者介面的重要
觀念必須知道。
Android
繪製畫面的方式、影響
UI
效能的原因
activity
開啟時,它要求
framework
UI
依照版面的定義繪製出來,
UI
的呈現會藉
由遍歷
View
的樹狀結構繪製每個
ViewGroup
,每個
ViewGroup
會要求繪製其子元件
直到階層架構裡的
View
皆已完成繪製;樹狀結構會依序被遍歷,這代表父元件會比其
子元件更早被繪製,最終順序則依它在樹狀結構的位置來決定。
兩階段佈局
Android
執行時期會在
View
樹狀結構利用兩階段的處理繪製版面,視覺化呈現如圖
13-1
;對於每個
View
的繪製,系統必須執行兩項操作:
測量過程
佈局過程
;測量
過程收集維度規格,佈局過程將
Views
定位在畫面上。
198
|
第十三章:最佳化使用者介面 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Android 高效能多執行緒

Android 高效能多執行緒

Anders Goransson
深入淺出 jQuery

深入淺出 jQuery

Ryan Benedetti, Ronan Cranley
HTML5 錦囊妙計

HTML5 錦囊妙計

Christopher Schmitt, Kyle Simpson

Publisher Resources

ISBN: 9789863470861