行動app開發管理實務unit4

19
行行 APP 行行行行行行 Unit4 – ToolBar and ListView 行行行 Xavier Yin

Upload: xavier-yin-

Post on 12-Aug-2015

88 views

Category:

Education


0 download

TRANSCRIPT

Page 1: 行動App開發管理實務unit4

行動 APP 開發管理實務Unit4 – ToolBar and ListView

尹君耀 Xavier Yin

Page 2: 行動App開發管理實務unit4

Outline

ToolBar– Definition– Practice

ListView– Definition– Practice

SampleCode

References

Page 3: 行動App開發管理實務unit4

ToolBar

A Toolbar is a generalization of action bars for use within application layouts.

– Toolbar supports a more focused feature set than ActionBar. A navigation button.  A branded logo image.  A title and subtitle.  One or more custom views. An action menu.

Page 4: 行動App開發管理實務unit4

Practice

Tips1– Add dependencies from File->Project Structure

Page 5: 行動App開發管理實務unit4

Practice

Tips2– Add dependencies from File->Project Structure

Page 6: 行動App開發管理實務unit4

Practice

Tips3– Modify stules.xml(values and values-v21)

Page 7: 行動App開發管理實務unit4

Practice

Tips4– Create a menu folder and file named menu_toolbar.xml

Page 8: 行動App開發管理實務unit4

Practice

Tips5– Create a layout named activity_main.xml

Page 9: 行動App開發管理實務unit4

Practice

Tips7– Create a java file named

MainActivity.java

Page 10: 行動App開發管理實務unit4

Practice

Tips7– Create a java file named

MainActivity.java

Page 11: 行動App開發管理實務unit4

Practice

Tips8– Modify Manifest.xml and Launch your app

Page 12: 行動App開發管理實務unit4

ListView

ListView is a view group that displays a list of scrollable items.

The list items are automatically inserted to the list using an Adapter that pulls content from a source such as an array or database query and converts each item result into a view that's placed into the list.

Page 13: 行動App開發管理實務unit4

ListView

Page 14: 行動App開發管理實務unit4

Practice

Tips 1 – Create an array of string resource

Page 15: 行動App開發管理實務unit4

Practice

Tips 2 – Create a layout file named activity_main.xml

Page 16: 行動App開發管理實務unit4

Practice

Tips 3 – Create a java file named MainActivity.java

Page 17: 行動App開發管理實務unit4

Practice

Tips4– Modify Manifest.xml and Launch your app

Page 18: 行動App開發管理實務unit4

Sample Code and Slides

Slides– http://www.slideshare.net/XavierYin/appunit4

Sample Code– https://github.com/xavier0507/TKUSampleCodeUnit4.git

Page 19: 行動App開發管理實務unit4

References

Android developers:– http://developer.android.com/design/index.html