SlideShare a Scribd company logo
Session #2

05-02-2012   http://www.iwillstudy.com/group/android
Producing an Android App
            javac
Java code             Byte code

                                         dx     Dalvik
  .java                  .class
                                                 exe

                                              classes.dex       aapt


                         Byte code              <xml>

                    Other .class files    AndroidManifest.xml          .apk

                                                    <str
                                                    >


                                               Resources
Various Layouts
Various Widgets
Resources
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)
Screen Characteristic
Screen
                 Qualifier   Description
characteristic
                 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 baseline
Aspect                       screen configuration.

ratio            notlong
                             Resources for use screens that have an aspect ratio that is similar to the
                             baseline screen configuration.
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 screen's density.
                  Resources for screens somewhere between mdpi and
          tvdpi   hdpi; approximately 213dpi. This is not considered a
                  "primary" density group.
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
Standard Asset Sizes (in Pixels), for Generalized Screen
Icon 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 px

Menu               36 x 36 px           48 x 48 px          72 x 72 px

Status Bar         12w x 19h px         16w x 25h px        24w x 38h px
(Android 2.3 and   (preferred, width    (preferred, width   (preferred, width
later)             may vary)            may vary)           may vary)

Status Bar
(Android 2.2 and   19 x 19 px           25 x 25 px          38 x 38 px
below)
Tab                24 x 24 px           32 x 32 px          48 x 48 px

Dialog             24 x 24 px           32 x 32 px          48 x 48 px

List View          24 x 24 px           32 x 32 px          48 x 48 px
Asset Type         Prefix           Example

Icons              ic_              ic_star.png
                                    ic_launcher_calendar
Launcher icons     ic_launcher
                                    .png
Menu icons         ic_menu          ic_menu_archive.png
                                    ic_stat_notify_msg.p
Status bar icons   ic_stat_notify
                                    ng
Tab icons          ic_tab           ic_tab_recent.png

Dialog icons       ic_dialog        ic_dialog_info.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 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>
Possibilities
Augmented Campus Reality       Web scraping
 • camera + maps + compass     • news filters
   = heads up info             • sport scores
                               • news eliminators
Games
• multi-player (bluetooth,     Distributed
  wifi, cell)                  computing?
• location-based (scavenger     • 10,000 phones all
  hunt)                           donating their idle
                                  time
Custom overlays for maps
 • weather, traffic, friends   Shared whiteboard
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
Rss Reader Screen1



                     Item List (ListView)




                     Button
Rss Reader Screen2




                     Options Menu
Contact Manager Screen1


                          Buttons (ImageView)




Groups List
(Expandable Lists -
Custom Adapter)



                          Options Menu
Contact Manager Screen2




PopUp (AlertDialog)
                          Input Area (EditText)
Contact Manager Screen3
                            Input (Search EditText)



                                Search Action
Search Box(Search Dialog)       Button
Weather app 1




                    Loading page
Image (ImageView)   (Splash Screen)



  Text (TextView)
Weather app 2


                    Background Video
                    Playing




  Text (TextView)
Multimedia App 1



Drop Down (Spinner)
                      Popup (Dialog
                      Theme)


  Selection
  Item(RadioButto
  n)                  Button (Button)
Near Me 1


                                                 Tabs (TabHost)

                                             Action Item (Button)



                                             Separator
Status List (ListView)


                                             Text (TextView)




                         Image (ImageView)
Near Me 2


                             Map(M
Map                          apActiv
Compass                      ity)




                             Pop Up
                             (Toast)

          Icon
          (MapOverlayIcon)
Picturesque 1




                                         Item List (ListView)




                                  Action Item (Button)

      Action Item (ImageButton)
Picturesque 2




                                         WebView




                                  Action Item (Button)

      Action Item (ImageButton)
Stock Market Application 1


                             Loading Page (Splash
                             Screen)




Loading (ProgessBar)
Stock Market Application 2




Loading
(ProgressDialog)
Stock Market Application 3

  Horizontal ScrollView

                                              Image (ImageView)



                                                Action Item (Button)
Scripts List (ListView
with Separators)




                Separator



                            Text (TextView)
Plan My Month (To Do List) 1


 Tabs (TabHost)




Tasks
List(Expandable Lists
- Custom Adapter)
Plan My Month (To Do List) 2


 Tabs (TabHost)

Image (ImageView)


 Text (TextView)               Tasks List (Expandable
                               List - Custom Adapter)
Learn English Quick App 1


                            Image (Dialog Icon)

                               Text(Dialog Title)

                               Text (TextView)
Pop Up(AlertDialog)
Learn English Quick App 2


 Download Status
 (ProgressBar)

                                Action Item (Button)


                            Text (TextView)

     Text (Linkify Text)
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
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
Thanks for coming
Android Study Group:
 http://www.iwillstudy.com/group/android

Write to us:
info@iwillstudy.com

Like us on Facebook:
http://www.facebook.com/iwillstudy

More Related Content

PDF
Slide day5-1
PDF
Android basic 2 UI Design
PDF
Android training day 3
PPTX
Designing for Android - Anjan Shrestha
PPT
Easy edd
PPT
Designing Apps for the Motorola XOOM
PDF
Chapter 9 - Resources System
PDF
Marakana Android User Interface
Slide day5-1
Android basic 2 UI Design
Android training day 3
Designing for Android - Anjan Shrestha
Easy edd
Designing Apps for the Motorola XOOM
Chapter 9 - Resources System
Marakana Android User Interface

Similar to Android Workshop - Session 2 (20)

PDF
[Droidcon]Developing Apps for Android on 2.x/3.x/4.x
PPT
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
PPT
Techwave 2006 Advanced Datawindow Techniques
PPT
Techwave 2006 Advanced Datawindow Functionality
PDF
Big Data Essentials meetup @ IBM Ljubljana 23.06.2015
PDF
Introduction to mobile programming with Androids.
PPT
Easydd program3
PDF
Multi Screen Hell
PDF
Meta layout: a closer look at media queries
PPT
Easydd program
PDF
Poster & Comic Design with FOSS Software
PPT
Easy edd phd talks 28 oct 2008
DOCX
Android Tutorial For Beginners Part-1
PPTX
Tku-行動app開發管理實務-Android應用程式開發基礎
PDF
Foliumcheatsheet
PPTX
Android 3
PDF
Android Deep Dive
DOCX
Android developer training - Layman Learning Offers A Free Crash Course In An...
PPTX
Android Workshop: Day 1 Part 3
PDF
Android 2D Drawing and Animation Framework
[Droidcon]Developing Apps for Android on 2.x/3.x/4.x
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
Techwave 2006 Advanced Datawindow Techniques
Techwave 2006 Advanced Datawindow Functionality
Big Data Essentials meetup @ IBM Ljubljana 23.06.2015
Introduction to mobile programming with Androids.
Easydd program3
Multi Screen Hell
Meta layout: a closer look at media queries
Easydd program
Poster & Comic Design with FOSS Software
Easy edd phd talks 28 oct 2008
Android Tutorial For Beginners Part-1
Tku-行動app開發管理實務-Android應用程式開發基礎
Foliumcheatsheet
Android 3
Android Deep Dive
Android developer training - Layman Learning Offers A Free Crash Course In An...
Android Workshop: Day 1 Part 3
Android 2D Drawing and Animation Framework
Ad

More from NAILBITER (20)

PPTX
Social Media Strategies
PPTX
jQuery for Beginners
PPTX
GBGahmedabad - Create your Business Website
PPTX
Mapathon 2013 - Google Maps Javascript API
PDF
Cloud Workshop - Presentation
PDF
Cloud Computing
PPTX
iWillStudy.com - Light Pitch
PPTX
Cloud Summit Ahmedabad
PPTX
Android Fundamentals & Figures of 2012
PPTX
The iPhone development on windows
PDF
Ambastha EduTech Pvt Ltd
PPTX
Branding
PPTX
Advertising
PPTX
Develop open source search engine
PDF
Location based solutions maps & your location
PDF
Html5 workshop part 1
PDF
Android Workshop Session 1
PDF
Linux Seminar for Beginners
PDF
Linux advanced concepts - Part 2
PDF
Linux advanced concepts - Part 1
Social Media Strategies
jQuery for Beginners
GBGahmedabad - Create your Business Website
Mapathon 2013 - Google Maps Javascript API
Cloud Workshop - Presentation
Cloud Computing
iWillStudy.com - Light Pitch
Cloud Summit Ahmedabad
Android Fundamentals & Figures of 2012
The iPhone development on windows
Ambastha EduTech Pvt Ltd
Branding
Advertising
Develop open source search engine
Location based solutions maps & your location
Html5 workshop part 1
Android Workshop Session 1
Linux Seminar for Beginners
Linux advanced concepts - Part 2
Linux advanced concepts - Part 1
Ad

Recently uploaded (20)

PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Cell Types and Its function , kingdom of life
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Basic Mud Logging Guide for educational purpose
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
Cell Structure & Organelles in detailed.
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Cell Types and Its function , kingdom of life
GDM (1) (1).pptx small presentation for students
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
STATICS OF THE RIGID BODIES Hibbelers.pdf
Supply Chain Operations Speaking Notes -ICLT Program
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
human mycosis Human fungal infections are called human mycosis..pptx
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Microbial disease of the cardiovascular and lymphatic systems
O5-L3 Freight Transport Ops (International) V1.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Basic Mud Logging Guide for educational purpose
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
102 student loan defaulters named and shamed – Is someone you know on the list?
TR - Agricultural Crops Production NC III.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
Microbial diseases, their pathogenesis and prophylaxis
Cell Structure & Organelles in detailed.
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx

Android Workshop - Session 2

  • 1. Session #2 05-02-2012 http://www.iwillstudy.com/group/android
  • 2. Producing an Android App javac Java code Byte code dx Dalvik .java .class exe classes.dex aapt Byte code <xml> Other .class files AndroidManifest.xml .apk <str > Resources
  • 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. Screen Characteristic Screen Qualifier Description characteristic 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 baseline Aspect screen configuration. ratio notlong Resources for use screens that have an aspect ratio that is similar to the baseline screen configuration.
  • 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 screen's density. Resources for screens somewhere between mdpi and tvdpi hdpi; approximately 213dpi. This is not considered a "primary" density group.
  • 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. Standard Asset Sizes (in Pixels), for Generalized Screen Icon 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 px Menu 36 x 36 px 48 x 48 px 72 x 72 px Status Bar 12w x 19h px 16w x 25h px 24w x 38h px (Android 2.3 and (preferred, width (preferred, width (preferred, width later) may vary) may vary) may vary) Status Bar (Android 2.2 and 19 x 19 px 25 x 25 px 38 x 38 px below) Tab 24 x 24 px 32 x 32 px 48 x 48 px Dialog 24 x 24 px 32 x 32 px 48 x 48 px List View 24 x 24 px 32 x 32 px 48 x 48 px
  • 11. Asset Type Prefix Example Icons ic_ ic_star.png ic_launcher_calendar Launcher icons ic_launcher .png Menu icons ic_menu ic_menu_archive.png ic_stat_notify_msg.p Status bar icons ic_stat_notify ng Tab icons ic_tab ic_tab_recent.png Dialog icons ic_dialog ic_dialog_info.png
  • 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. Possibilities Augmented Campus Reality Web scraping • camera + maps + compass • news filters = heads up info • sport scores • news eliminators Games • multi-player (bluetooth, Distributed wifi, cell) computing? • location-based (scavenger • 10,000 phones all hunt) donating their idle time Custom overlays for maps • weather, traffic, friends Shared whiteboard
  • 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. Rss Reader Screen1 Item List (ListView) Button
  • 18. Rss Reader Screen2 Options Menu
  • 19. Contact Manager Screen1 Buttons (ImageView) Groups List (Expandable Lists - Custom Adapter) Options Menu
  • 20. Contact Manager Screen2 PopUp (AlertDialog) Input Area (EditText)
  • 21. Contact Manager Screen3 Input (Search EditText) Search Action Search Box(Search Dialog) Button
  • 22. Weather app 1 Loading page Image (ImageView) (Splash Screen) Text (TextView)
  • 23. Weather app 2 Background Video Playing Text (TextView)
  • 24. Multimedia App 1 Drop Down (Spinner) Popup (Dialog Theme) Selection Item(RadioButto n) Button (Button)
  • 25. Near Me 1 Tabs (TabHost) Action Item (Button) Separator Status List (ListView) Text (TextView) Image (ImageView)
  • 26. Near Me 2 Map(M Map apActiv Compass ity) Pop Up (Toast) Icon (MapOverlayIcon)
  • 27. Picturesque 1 Item List (ListView) Action Item (Button) Action Item (ImageButton)
  • 28. Picturesque 2 WebView Action Item (Button) Action Item (ImageButton)
  • 29. Stock Market Application 1 Loading Page (Splash Screen) Loading (ProgessBar)
  • 30. Stock Market Application 2 Loading (ProgressDialog)
  • 31. Stock Market Application 3 Horizontal ScrollView Image (ImageView) Action Item (Button) Scripts List (ListView with Separators) Separator Text (TextView)
  • 32. Plan My Month (To Do List) 1 Tabs (TabHost) Tasks List(Expandable Lists - Custom Adapter)
  • 33. Plan My Month (To Do List) 2 Tabs (TabHost) Image (ImageView) Text (TextView) Tasks List (Expandable List - Custom Adapter)
  • 34. Learn English Quick App 1 Image (Dialog Icon) Text(Dialog Title) Text (TextView) Pop Up(AlertDialog)
  • 35. Learn English Quick App 2 Download Status (ProgressBar) Action Item (Button) Text (TextView) Text (Linkify Text)
  • 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. 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. Thanks for coming Android Study Group: http://www.iwillstudy.com/group/android Write to us: info@iwillstudy.com Like us on Facebook: http://www.facebook.com/iwillstudy