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深入精要
使用製圖工具
|
181
[Page-185]
11-15
產生一個圖示集
我已找到一個與設計團隊工作的絕佳方式。當我開發程式時,我會先利用
Asset
Studio
產生簡單的圖示,之後當我需要真正的圖示時,我只需複製專案裡的
res
資料夾給他們即可。我請他們將測試圖示取代掉,因為他們知道要提供的每個
資源檔的名稱與維度大小,這能減少溝通產生的差錯。最方便的地方在於當需
要將真正的圖片整合至專案中時,我只需要複製
res
資料夾回自己的專案程式碼
裡即可。
使用
9-patch
圖片
Android
上你可以提供
9-patch
格式的圖片。這格式讓你可以沿著圖片的邊界定義數
條直線來控制它是如何被系統縮放,黑線的位置告知系統
framework
該圖片區域在縮
放時是否會被延展或縮減,或是保持不變;使用此格式的一個很好的使用時機是在產
生一個遍及
app
所用的樣式化按鈕。若你使用
NinePatchDrawable
作為按鈕的背景,則
它會延展至看起來均勻。
182
|
第十一章:操作使用者介面工具
[Page-186]
要使用
NinePatchDrawable
,你必須將你的圖片切分為
9
個區域,圖片內容會放置在中
間的容器,四個角與四個邊會被系統延展;起初這概念會較難被理解,而若你想要溫
習這個主題,從
drawable ...
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