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
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