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深入精要
212
|
第十三章:最佳化使用者介面
13-15
層級檢視:遜色結構的詳細資訊
值得一提的是紅色或黃色的效能指標並不一定代表問題,尤其是當
ViewGroup
節點具有較多的子檢視元件且過於複雜的時候(因此花較多時間在繪製)。
當我檢視較遜色的
UI
時,我看到許多不同節點上的效能指標是紅色與黃色(此圖中,
紅色與黃色的原點沒有規則地散布在各個地方);整體來說,這整個
UI
是存在問題的,
且這些問題並非特定
ViewGroup
所有;此時我知道此版面可能是過於複雜,需要考慮完
整地重新設計;下一步我將會檢查那些紅色效能指標的特定元件(在此例為上方數來第
二個
TextView
與右下角的
EditText
)。在這個例子中,這些元件都是使用
Android
底類別(
TextView
)的一般類型,如果這些元件是自訂的
Views
(即
MyCustomTextView
的話,紅色與黃色的效能指標會是指示那些該花時間去優化的地方;在此例因為這些
都是
Android
基底類別,我知道我應當花時間在其他地方。
層級檢視器(
Hierarchy Viewer
|
213
你也可以利用這個工具找出未使用的版面結構(若你使用在第
214
頁所介紹的
Lint
尚未找到),層級架構裡未使用到的結構常常是對效能有很大影響的潛在問題,這是 ...
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