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深入精要
166
|
第十一章:操作使用者介面工具
最外層的佈局,填滿整個畫面;其餘的排版佈局、
TextView
以及最後的按鈕則
嵌套在它裡面。
垂直的方向能確保其餘的排版佈局、
TextView
及按鈕能以由上而下的順序堆疊
而成。
我們引入第二個排版佈局且嵌套在第一個裡面,則我們可以水平地放置一些元件
在裡面。
水平方向明確指定按鈕為並排放置。
第一個按鈕,位於畫面的左上方;此處位於第二個也是最內層的排版佈局。
[Page-170]
第二個按鈕,位於第一個的右側;此處也位於第二個也是最內層的排版佈局。
此行作為最內層排版佈局的結尾,此排版佈局包含兩個按鈕。
TextView
位於最外層的排版佈局,但在最裡面的排版佈局之外;而因此此處
位於首兩個按鈕的垂直下方。
第三個按鈕,與
TextView
相同位於最外層的排版佈局,而依垂直的方向排版。
此行作為最外層排版佈局的結尾。
資源檔案
一個
Android
應用程式不僅由
Java
檔案所組成,各種其他的文件(如圖片、影片,和
顏色)也被用於建立介面。這些統稱為
資源檔
資源文件
Android framework
提供
一個簡單的方法來配合不同版本的資源文件(不同解析度的圖片、不同大小的圖示,
或不同語系的文字),在不同裝置上的配置(無鍵盤、法國語系、高解析度螢幕)。
例如,為了支援不同的螢幕解析度,必須要引入多份相同圖片的副本在不同的解析度
下。
使用資源檔具有多個好處,包括:
程式原始碼與資源檔案分開,這使得自訂化更容易。 ...
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