Session #205-02-2012   http://www.iwillstudy.com/group/android
Producing an Android App            javacJava code             Byte code                                         dx     Da...
Various Layouts
Various Widgets
Resources
Resource Types(/res/)   Animation Resources (/anim or /drawable)   Color State List Resource (/color)   Drawable Resour...
Screen CharacteristicScreen                 Qualifier   Descriptioncharacteristic                 small       Resources fo...
Screen Characteristic          ldpi    Resources for low-density (ldpi) screens (~120dpi).                  Resources for ...
Fragmentation   res/layout/my_layout.xml              // layout for normal screen    size ("default")    res/layout-small...
Standard Asset Sizes (in Pixels), for Generalized ScreenIcon Type                   Densities                   Low densit...
Asset Type         Prefix           ExampleIcons              ic_              ic_star.png                                ...
Options Menu
Context Menu
Create a new .xml file in your drawable folder(or drawable-mdpi folder) called gradient.xml, with the following code:<?xml...
PossibilitiesAugmented Campus Reality       Web scraping • camera + maps + compass     • news filters   = heads up info   ...
Android Controls   Rss Reader   Contacts Manager   Weather Application   Multimedia Player   Near Me   Picturesque ...
Rss Reader Screen1                     Item List (ListView)                     Button
Rss Reader Screen2                     Options Menu
Contact Manager Screen1                          Buttons (ImageView)Groups List(Expandable Lists -Custom Adapter)         ...
Contact Manager Screen2PopUp (AlertDialog)                          Input Area (EditText)
Contact Manager Screen3                            Input (Search EditText)                                Search ActionSea...
Weather app 1                    Loading pageImage (ImageView)   (Splash Screen)  Text (TextView)
Weather app 2                    Background Video                    Playing  Text (TextView)
Multimedia App 1Drop Down (Spinner)                      Popup (Dialog                      Theme)  Selection  Item(RadioB...
Near Me 1                                                 Tabs (TabHost)                                             Actio...
Near Me 2                             Map(MMap                          apActivCompass                      ity)          ...
Picturesque 1                                         Item List (ListView)                                  Action Item (B...
Picturesque 2                                         WebView                                  Action Item (Button)      A...
Stock Market Application 1                             Loading Page (Splash                             Screen)Loading (Pr...
Stock Market Application 2Loading(ProgressDialog)
Stock Market Application 3  Horizontal ScrollView                                              Image (ImageView)          ...
Plan My Month (To Do List) 1 Tabs (TabHost)TasksList(Expandable Lists- Custom Adapter)
Plan My Month (To Do List) 2 Tabs (TabHost)Image (ImageView) Text (TextView)               Tasks List (Expandable         ...
Learn English Quick App 1                            Image (Dialog Icon)                               Text(Dialog Title) ...
Learn English Quick App 2 Download Status (ProgressBar)                                Action Item (Button)               ...
Online Android Resources➲   Android developer website      http://developer.android.com➲   Open Handset Alliance      ht...
Summary➲ Solid, proven, popular, open platform➲ Used on wide range of devices➲ Support from Google, OEMs, telcoms➲ Low bar...
Thanks for comingAndroid Study Group: http://www.iwillstudy.com/group/androidWrite to us:info@iwillstudy.comLike us on Fac...
Upcoming SlideShare
Loading in …5
×

Android Workshop - Session 2

2,974 views
2,670 views

Published on

Published in: Education, Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,974
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
132
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Android Workshop - Session 2

  1. 1. Session #205-02-2012 http://www.iwillstudy.com/group/android
  2. 2. Producing an Android App javacJava code Byte code dx Dalvik .java .class exe classes.dex aapt Byte code <xml> Other .class files AndroidManifest.xml .apk <str > Resources
  3. 3. Various Layouts
  4. 4. Various Widgets
  5. 5. Resources
  6. 6. Resource Types(/res/) Animation Resources (/anim or /drawable) Color State List Resource (/color) Drawable Resources(/drawable) Layout Resource(/layout) Menu Resource(/menu) String Resources(/values) Style Resource(/values) More Resource Types(/values)
  7. 7. Screen CharacteristicScreen Qualifier Descriptioncharacteristic small Resources for small size screens. normal Resources for normal size screens. (This is the baseline size.)Size large Resources for large size screens. xlarge Resources for extra large size screens. land Resources for screens in the landscape orientation (wide aspect ratio).Orientation port Resources for screens in the portrait orientation (tall aspect ratio). Resources for screens that have a significantly taller or wider aspect ratio long (when in portrait or landscape orientation, respectively) than the baselineAspect screen configuration.ratio notlong Resources for use screens that have an aspect ratio that is similar to the baseline screen configuration.
  8. 8. Screen Characteristic ldpi Resources for low-density (ldpi) screens (~120dpi). Resources for medium-density (mdpi) screens mdpi (~160dpi). (This is the baseline density.) hdpi Resources for high-density (hdpi) screens (~240dpi). Resources for extra high-density (xhdpi) screens xhdpi (~320dpi).Density Resources for all densities. These are density- independent resources. The system does not scale nodpi resources tagged with this qualifier, regardless of the current screens density. Resources for screens somewhere between mdpi and tvdpi hdpi; approximately 213dpi. This is not considered a "primary" density group.
  9. 9. Fragmentation res/layout/my_layout.xml // layout for normal screen size ("default") res/layout-small/my_layout.xml // layout for small screen size res/layout-large/my_layout.xml // layout for large screen size res/layout-xlarge/my_layout.xml // layout for extra large screen size res/layout-xlarge-land/my_layout.xml // layout for extra large in land. orientation res/drawable-mdpi/my_icon.png // bitmap for medium density res/drawable-hdpi/my_icon.png // bitmap for high density res/drawable-xhdpi/my_icon.png // bitmap for extra high density
  10. 10. Standard Asset Sizes (in Pixels), for Generalized ScreenIcon Type Densities Low density screen Medium density High density screen (ldpi) screen (mdpi) (hdpi)Launcher 36 x 36 px 48 x 48 px 72 x 72 pxMenu 36 x 36 px 48 x 48 px 72 x 72 pxStatus Bar 12w x 19h px 16w x 25h px 24w x 38h px(Android 2.3 and (preferred, width (preferred, width (preferred, widthlater) may vary) may vary) may vary)Status Bar(Android 2.2 and 19 x 19 px 25 x 25 px 38 x 38 pxbelow)Tab 24 x 24 px 32 x 32 px 48 x 48 pxDialog 24 x 24 px 32 x 32 px 48 x 48 pxList View 24 x 24 px 32 x 32 px 48 x 48 px
  11. 11. Asset Type Prefix ExampleIcons ic_ ic_star.png ic_launcher_calendarLauncher icons ic_launcher .pngMenu icons ic_menu ic_menu_archive.png ic_stat_notify_msg.pStatus bar icons ic_stat_notify ngTab icons ic_tab ic_tab_recent.pngDialog icons ic_dialog ic_dialog_info.png
  12. 12. Options Menu
  13. 13. Context Menu
  14. 14. Create a new .xml file in your drawable folder(or drawable-mdpi folder) called gradient.xml, with the following code:<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient android:angle="0" android:startColor="#000000" android:endColor="#000000" android:centerColor="#97CF4D" /></shape>
  15. 15. PossibilitiesAugmented Campus Reality Web scraping • camera + maps + compass • news filters = heads up info • sport scores • news eliminatorsGames• multi-player (bluetooth, Distributed wifi, cell) computing?• location-based (scavenger • 10,000 phones all hunt) donating their idle timeCustom overlays for maps • weather, traffic, friends Shared whiteboard
  16. 16. Android Controls Rss Reader Contacts Manager Weather Application Multimedia Player Near Me Picturesque Stock Market Application Plan My Month Learn English Quick App Rate Music App
  17. 17. Rss Reader Screen1 Item List (ListView) Button
  18. 18. Rss Reader Screen2 Options Menu
  19. 19. Contact Manager Screen1 Buttons (ImageView)Groups List(Expandable Lists -Custom Adapter) Options Menu
  20. 20. Contact Manager Screen2PopUp (AlertDialog) Input Area (EditText)
  21. 21. Contact Manager Screen3 Input (Search EditText) Search ActionSearch Box(Search Dialog) Button
  22. 22. Weather app 1 Loading pageImage (ImageView) (Splash Screen) Text (TextView)
  23. 23. Weather app 2 Background Video Playing Text (TextView)
  24. 24. Multimedia App 1Drop Down (Spinner) Popup (Dialog Theme) Selection Item(RadioButto n) Button (Button)
  25. 25. Near Me 1 Tabs (TabHost) Action Item (Button) SeparatorStatus List (ListView) Text (TextView) Image (ImageView)
  26. 26. Near Me 2 Map(MMap apActivCompass ity) Pop Up (Toast) Icon (MapOverlayIcon)
  27. 27. Picturesque 1 Item List (ListView) Action Item (Button) Action Item (ImageButton)
  28. 28. Picturesque 2 WebView Action Item (Button) Action Item (ImageButton)
  29. 29. Stock Market Application 1 Loading Page (Splash Screen)Loading (ProgessBar)
  30. 30. Stock Market Application 2Loading(ProgressDialog)
  31. 31. Stock Market Application 3 Horizontal ScrollView Image (ImageView) Action Item (Button)Scripts List (ListViewwith Separators) Separator Text (TextView)
  32. 32. Plan My Month (To Do List) 1 Tabs (TabHost)TasksList(Expandable Lists- Custom Adapter)
  33. 33. Plan My Month (To Do List) 2 Tabs (TabHost)Image (ImageView) Text (TextView) Tasks List (Expandable List - Custom Adapter)
  34. 34. Learn English Quick App 1 Image (Dialog Icon) Text(Dialog Title) Text (TextView)Pop Up(AlertDialog)
  35. 35. Learn English Quick App 2 Download Status (ProgressBar) Action Item (Button) Text (TextView) Text (Linkify Text)
  36. 36. Online Android Resources➲ Android developer website http://developer.android.com➲ Open Handset Alliance http://www.openhandsetalliance.com➲ Android Market http://market.android.com/publish➲ Android libraries and extensions http://openintents.org➲ Android developer forum http://www.anddev.org
  37. 37. Summary➲ Solid, proven, popular, open platform➲ Used on wide range of devices➲ Support from Google, OEMs, telcoms➲ Low barriers to entry➲ Major opportunity for new developers➲ Creativity, hard work, persistence
  38. 38. Thanks for comingAndroid Study Group: http://www.iwillstudy.com/group/androidWrite to us:info@iwillstudy.comLike us on Facebook:http://www.facebook.com/iwillstudy

×