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深入精要
58
|
第五章:使用
Eclipse
開發
有許多種樣板可以使用,範圍從新增一個新專案的樣板,到產生特有的資源元件的
樣板。
點選
File
New
Other
Android
來進入程式碼樣板選單(圖
5-5
)。
這顯示許多用來新增多種資源和程式碼的選項;你可以建立新的程式專案、
Icon
集合
(查看第
178
頁「使用製圖工具」有更多使用的細節)、或程式碼片段。這可以讓你
開啟精靈(
wizards
)來帶你產生這些多種元件。在精靈引導你完成整個過程後,系統
會在你專案中產生所有所需的程式碼、資源和其依賴關係。
舉個例子,我將會說明如何使用程式碼樣板來產生一個主從式流程畫面(
master/detail
flow
)。這是個常見的
UI
模式,一邊是項目列表,另一邊顯示的是被選擇的該項目的
詳細資料。
1.
首先,從樣板選項畫面中選擇一個所需的項目。
[Page-61]
5-5
查看程式碼樣板選單
2.
在精靈中輸入程式碼的一些細節(圖
5-6
)。
程式碼樣板(
templates
|
59
[Page-62]
5-6
使用一個程式碼樣板來建立主從式流程畫面
3.
檢視及確認你輸入的資料,接受你的項目來完成該精靈(如圖
5-7
所示)
[Page-63]
5-7
確認該產生的程式碼
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