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深入精要
使用圖形化版面編輯器來產生版面(
layouts
|
185
第十二章:使用圖形化編輯器
第十二章
使用圖形化編輯器
[Page-189]
迄今為止設計
Android app
使用者介面(
UI
)最簡單的方法是使用圖形化版面工具;以
往這些工具很難使用,它產生的程式碼較難被閱讀且具有其他限制。不過這些工具在
後續的版本中已經改進,它們愈來愈接近在
Windows
iOS
所用的
GUI
產生器裡的一
套標準,現在操作起來已更勝於
Android
的另個方法(手動編輯
XML
檔案)。這些工
具可以很容易地建立
UI
、重構已存在的版面、在多個環境中預覽你的
UI
及其他等等。
工具讓開發更有效率,且能確保你產生的版面程式碼具有好的架構。
使用圖形化版面編輯器來產生版面(
layouts
如果你不喜歡編輯
XML
檔案,則可以使用一個圖形化工具,它可以利用拖放
UI
元件
的方式來建構版面;你可以利用此工具產生基本的版面,再修改
XML
微調。
圖形化版面編輯器(圖
12-1
)可以透過選取在任何
Android
layout.xml
檔案對應的分頁
(位於左下方)來開啟,選取此分頁會顯示一個視圖,裡面含有你會用來建構版面所
需的工具;可以透過選取顯示著版面檔名的分頁來切換至
XML
檢視畫面;當你儲存檔
案時,這兩個檢視畫面會被同步。
186
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