Silicon Valley Code Camp 2009 “Embellish Your Pictures” Build an Application for an Android Phone Jack Ha, Balwinder Kaur Oct 3, 2009 – 5:15PM Room CCL
Who We Are Senior Software Engineer at T-Mobile USA Mobile Software Development Team in Mountain View Contact:
Agenda Demo Source code walk-through Q&A
Demo MBellish
Thank You – Q & A Mbellish Wiki es-BuildanApplicationforanAndroidPhone es-BuildanApplicationforanAndroidPhone-2009 Android SDK and Documentation Android Platform Source Code Ask questions on Android Mailing Lists
In detail….
What is Android? Android is a software stack for mobile devices that includes an operating system, middleware and key applications Activity Presents a visual user interface for one focused action that the user can undertake Intent An abstract description of an operation to be performed Provides a facility for performing late runtime binding between the code in different applications. Glue between Activities
Units of Measurement DP Density-independent Pixels - an abstract unit that is based on the physical density of the screen. These units are relative to a 160 dpi screen, so one dp is one pixel on a 160 dpi screen. SP Scale-independent Pixels - this is like the dp unit, but it is also scaled by the user's font size preference.
Android Project Using Eclipse Download Eclipse from Download and install the Android SDK and ADT Plugin for Eclipse Follow instructions on
Main Screen Create User Interface (UI) screen using XML Inflate an XML UI in the Activity An Activity presents a visual user interface for one focused action that the user can undertake Add functionality to the Button click callback Create an Intent to pick a picture from a built- in Gallery An intent is an abstract description of an operation to be performed
Compose Screen – Part I Retrieve selected picture Uri from an Intent Create a menu using an XML file Inflate menu in the Activity Respond to menu selection Create a custom view Use a custom view in a layout Retrieve the selected Bitmap from an Uri Scale the image Draw the image on the screen
Text Selection Screen New UI Widget - EditText Create selection dialog boxes with AlertDialog.Builder Common phrases selection dialog box Custom font selection dialog box Color selection dialog box Custom user font data adapter. Using free fonts from: fonts.htmlhttp:// fonts.html Return text with selected font and color as an intent back to the caller activity
Clip Art Selection Screen New UI Widget – GridView Custom clipart data adapter. Using free clip art from: Return selected clip art as an intent back to the caller activity
Compose Screen – Part II Overlay text and clip art over the selected image Respond to touch events
Actions Export Embellished Picture to the Gallery Send Embellished Picture via MMS and