android applica on development hands on
play

Android Applica,on Development: Hands-On Dr. Eddie Chan - PowerPoint PPT Presentation

Android Applica,on Development: Hands-On Dr. Eddie Chan csclchan@cse.ust.hk Venue and Materials The workshop will be conducted in room 4213 and room


  1. Android ¡Applica,on ¡ Development: ¡Hands-­‑On ¡ Dr. ¡Eddie ¡Chan ¡ csclchan@cse.ust.hk ¡

  2. Venue ¡and ¡Materials ¡ • The ¡workshop ¡will ¡be ¡conducted ¡in ¡room ¡4213 ¡and ¡room ¡4210 ¡ near ¡to ¡the ¡LiI ¡21, ¡HKUST ¡ • All ¡materials ¡will ¡be ¡posted ¡one ¡week ¡before ¡the ¡workshop: ¡ hOp://www.cse.ust.hk/AADC/2013/notes.html ¡ • Encourage ¡your ¡students ¡to ¡visit ¡and ¡raise ¡many ¡ques,ons ¡in ¡ our ¡Facebook ¡page: ¡ hOps://www.facebook.com/pages/Hong-­‑Kong-­‑Android-­‑ Applica,on-­‑Design-­‑Contest-­‑2013/209579215883406 ¡ Android Workshop (Eddie) Introduction 2

  3. Chinese ¡Reference ¡Books ¡ 前進 Android ¡Market! ¡Google ¡Android ¡SDK 實戰演練 / ¡ 何孟翰著 . ¡ • h7ps://webcat.hkpl.gov.hk/lib/item?id=chamo:3168769&theme=WEB ¡ Android 實戰活用學 : ¡ 無痛學 Android ¡/ ¡Fenix 編著 . ¡ • h7ps://webcat.hkpl.gov.hk/lib/item?id=chamo:3216815&theme=WEB ¡ Android 錦囊妙計 = ¡Android ¡cookbook ¡/ ¡Ian ¡F. ¡Darwin 編著 ; ¡ 李宜修譯 . ¡ • h7ps://webcat.hkpl.gov.hk/lib/item?id=chamo:3261386&theme=WEB ¡ Android ¡4.X ¡App 開發教戰手冊 : ¡ 適用 Android ¡4.x-­‑2.x ¡/ ¡[ 黃彬華著 ]. ¡ • h7ps://webcat.hkpl.gov.hk/lib/item?id=chamo:3230706&theme=WEB ¡ Useful ¡Online ¡References: ¡ • hOp://developer.android.com/develop/index.html ¡ hOp://android-­‑developers.blogspot.hk/ ¡ Android Workshop (Eddie) Introduction 3

  4. Useful ¡YouTube ¡Videos ¡for ¡Learning ¡ Android ¡ • HKUST ¡Android ¡Lecture ¡by ¡Prof. ¡Muppala: ¡ hOp://www.youtube.com/user/jmuppala ¡ • Hands-­‑on ¡Android ¡Prac,ce: hOp://www.youtube.com/watch?v=CxPh1tgiK2g ¡ • Android ¡ 教學 ¡( 普通話 ) ¡/ ¡Putonghua ¡ hOp://www.youtube.com/watch?v=x795UuKIuAA ¡ hOp://www.youtube.com/watch?v=QMqfRrDa9NA ¡ Android Workshop (Eddie) Introduction 4

  5. Bonus ¡Points ¡ • To ¡encourage ¡the ¡par,cipa,ons, ¡in ¡each ¡workshop, ¡we ¡have ¡a ¡ set ¡of ¡task ¡required ¡for ¡students ¡to ¡finish ¡ ¡ • If ¡they ¡can ¡complete ¡the ¡tasks, ¡2 ¡bonus ¡points ¡will ¡be ¡counted ¡ into ¡the ¡evalua,on ¡of ¡the ¡compe,,on. ¡We ¡have ¡4 ¡workshops, ¡ total: ¡4 ¡x ¡2 ¡points ¡ Android Workshop (Eddie) Introduction 5

  6. Configure ¡the ¡Android ¡SDK ¡ • SDK ¡= ¡SoIware ¡Development ¡Kit ¡ • First ¡move ¡to ¡the ¡Eclipse ¡directory ¡D:\eclipse ¡ • Start ¡Eclipse ¡by ¡double ¡clicking ¡it ¡ • Set ¡your ¡workspace ¡to ¡be ¡D:\workspace ¡ • Click ¡ Window -­‑> ¡ Preferences -­‑> ¡ Android , ¡and ¡choose ¡the ¡SDK ¡ loca,on ¡to ¡where ¡you ¡put ¡the ¡Android ¡SDK ¡(must ¡be ¡D: \android-­‑sdk-­‑windows) ¡ Android Workshop (Eddie) Introduction 6

  7. Get ¡Familiar ¡with ¡Eclipse ¡ Android Workshop (Eddie) Introduction 7

  8. Get ¡Ready ¡with ¡Your ¡Eclipse ¡ • As ¡Eclipse ¡is ¡not ¡only ¡designed ¡for ¡Android ¡ development, ¡there ¡might ¡have ¡some ¡slight ¡ difference ¡ – You ¡should ¡choose ¡the ¡Java ¡code ¡edi,ng ¡environment ¡by ¡selec,ng ¡ Window ¡> ¡ Open ¡Perspec[ve ¡ > ¡ Java ¡ ¡ – If ¡you ¡cannot ¡see ¡the ¡Java ¡icon, ¡you ¡click ¡ Other... ¡ to ¡look ¡for ¡the ¡Java ¡ code ¡edi,ng ¡environment ¡ • We ¡can ¡divide ¡it ¡into ¡5 ¡components: ¡menu ¡bar, ¡tool ¡ bar, ¡naviga,on ¡area, ¡editor ¡area ¡and ¡debug ¡area ¡ ¡ Android Workshop (Eddie) Introduction 8

  9. 5 ¡Components ¡in ¡Eclipse ¡ Android Workshop (Eddie) Introduction 9

  10. Menu ¡Bar ¡ • Eclipse ¡menu ¡bar ¡contains ¡familiar ¡func,ons ¡like ¡file ¡and ¡ edi,ng ¡opera,ons ¡ • The ¡File ¡menu ¡contains ¡menu ¡items ¡for ¡Import ¡and ¡Export, ¡ which ¡are ¡used ¡to ¡import ¡project ¡files ¡into ¡the ¡Workspace, ¡ and ¡export ¡them ¡out ¡again ¡ • In ¡the ¡Run ¡menu, ¡you ¡will ¡find ¡commands ¡related ¡to ¡running ¡ and ¡debugging ¡applica,on ¡code, ¡and ¡launching ¡external ¡tools ¡ such ¡as ¡Android ¡emulator ¡ • In ¡the ¡Help ¡menu, ¡you ¡can ¡search ¡helps ¡and ¡check ¡for ¡updates ¡ of ¡Eclipse ¡soIware ¡and ¡plugin ¡by ¡selec,ng ¡ Help ¡> ¡ Check ¡for ¡ Updates ¡... ¡ ¡ Android Workshop (Eddie) Introduction 10

  11. Toolbar ¡ One ¡important ¡feature ¡of ¡toolbar ¡is ¡to ¡provide ¡you ¡with ¡a ¡quick ¡access ¡of ¡ • Android ¡SDK ¡Manager ¡in ¡the ¡Android ¡SDK ¡and ¡AVD ¡Manager ¡group ¡ ¡ If ¡you ¡have ¡installed ¡Android ¡development ¡tools ¡for ¡Eclipse, ¡on ¡the ¡leI ¡side ¡of ¡ • the ¡toolbar ¡you ¡should ¡see ¡an ¡Android ¡SDK ¡and ¡AVD ¡manager ¡grouping ¡ You ¡can ¡click ¡these ¡buOons ¡to ¡update ¡and ¡install ¡SDK ¡and ¡virtual ¡devices. ¡ ¡ • Android Workshop (Eddie) Introduction 11

  12. Naviga,on ¡Area ¡ • Naviga,on ¡area ¡usually ¡ consists ¡of ¡three ¡views, ¡ Package ¡Explorer , ¡ Outline ¡ and ¡ Task ¡List ¡ if ¡you ¡choose ¡to ¡ use ¡Java ¡perspec,ve ¡ • Let’s ¡talk ¡about ¡the ¡first ¡two ¡ • Package ¡Explorer ¡ helps ¡to ¡ find ¡all ¡informa,on ¡for ¡the ¡ project, ¡for ¡example, ¡source ¡ code, ¡compile ¡sources, ¡ libraries, ¡manifest, ¡intent-­‑ filters, ¡uses-­‑permissions ¡ ¡ Android Workshop (Eddie) Introduction 12

  13. Naviga,on ¡Area ¡-­‑ ¡Package ¡Explorer ¡(1/2) ¡ • The ¡first ¡folder ¡is ¡named ¡by ¡the ¡project ¡name. ¡It ¡includes ¡the ¡6 ¡ subfolders. ¡They ¡are ¡src, ¡gen, ¡Android ¡Library, ¡assets, ¡bin ¡and ¡ res. ¡ ¡ – “src” ¡stores ¡the ¡code ¡which ¡developers ¡write; ¡ ¡ – “gen” ¡stores ¡the ¡generated ¡Java ¡files ¡by ¡the ¡system; ¡ ¡ – “Android ¡Library” ¡contains ¡a ¡file ¡named ¡android.jar ¡which ¡is ¡the ¡ Android ¡library ¡class ¡file; ¡ – “assets” ¡stores ¡the ¡source ¡code ¡or ¡files ¡which ¡are ¡not ¡Java ¡classes ¡and ¡ later ¡retrieved ¡as ¡raw ¡byte ¡stream; ¡ ¡ – “bin” ¡stores ¡the ¡binary ¡and ¡executable ¡files ¡which ¡is ¡generated ¡by ¡ compiler ¡ ¡ Android Workshop (Eddie) Introduction 13

  14. Naviga,on ¡Area ¡-­‑ ¡Package ¡Explorer ¡(2/2) ¡ – “res” ¡stores ¡all ¡the ¡resources ¡used ¡by ¡your ¡Android ¡applica,on. ¡ ¡ For ¡example, ¡the ¡drawable ¡folder ¡contains ¡a ¡png ¡image ¡file ¡that ¡is ¡used ¡ as ¡the ¡icon ¡for ¡your ¡applica,on. ¡The ¡layout ¡folder ¡contains ¡an ¡XML ¡file ¡ used ¡to ¡represent ¡the ¡user ¡interface ¡of ¡your ¡Android ¡applica,on. ¡The ¡ values ¡folder ¡contains ¡an ¡XML ¡file ¡used ¡to ¡store ¡a ¡list ¡of ¡string ¡ constants. ¡ ¡ – AndroidManifest.xml ¡file ¡is ¡an ¡applica,on ¡configura,on ¡file ¡that ¡ contains ¡detailed ¡informa,on ¡about ¡your ¡applica,on, ¡such ¡as ¡the ¡ number ¡of ¡ac,vi-­‑ ¡,es ¡you ¡have ¡in ¡your ¡applica,on, ¡the ¡types ¡of ¡ permissions ¡your ¡applica,on ¡needs, ¡the ¡version ¡informa,on ¡of ¡your ¡ applica,on, ¡and ¡so ¡on. ¡ Android Workshop (Eddie) Introduction 14

  15. Naviga,on ¡Area ¡-­‑ ¡Outline ¡View ¡ • The ¡Outline ¡view ¡displays ¡an ¡outline ¡of ¡a ¡structured ¡file ¡that ¡is ¡ currently ¡open ¡in ¡the ¡editor ¡area, ¡and ¡lists ¡structural ¡elements ¡ • It ¡also ¡provides ¡the ¡descrip,ons ¡of ¡all ¡the ¡small ¡buOons ¡in ¡the ¡ Outline ¡view ¡ Android Workshop (Eddie) Introduction 15

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend