17
A Taste of Ice Cream Sandwich in a Gingerbread World by Andy Dyer

A Taste of Ice Cream Sandwich in a Gingerbread World

Embed Size (px)

Citation preview

Page 1: A Taste of Ice Cream Sandwich in a Gingerbread World

A Taste of Ice Cream Sandwich in a

Gingerbread Worldby Andy Dyer

Page 2: A Taste of Ice Cream Sandwich in a Gingerbread World

About Me

● Senior Android Developer at ChaiONE in Houston, TX

● Android apps on Google Play - DeliRadio, Music Library, Beer Explorer

● Hobbies/Interests - Vinyl collector, coffee & beer snob, burger aficionado

Email: [email protected]: @dammitandyG+: gplus.to/abdyer

Page 3: A Taste of Ice Cream Sandwich in a Gingerbread World

or...

A Taste of Ice Cream Sandwich in a

Gingerbread World

Page 4: A Taste of Ice Cream Sandwich in a Gingerbread World

Keepin' Android Trill*

*trill /tril/noun: true and real

Page 5: A Taste of Ice Cream Sandwich in a Gingerbread World

Ice Cream Sandwich vs Gingerbread usage in Music Library Free

Page 6: A Taste of Ice Cream Sandwich in a Gingerbread World

Key UI Differences

● Action bar/overflow menu vs options/context menu

● OK/Cancel button order

● Themes/styles● New controls

Page 7: A Taste of Ice Cream Sandwich in a Gingerbread World

Approaches for Supporting Multiple Versions of Android

● Multiple apps... bad● Different layouts for

each version... better

● Ice Cream Sandwich in my Gingerbread...yum

Page 8: A Taste of Ice Cream Sandwich in a Gingerbread World
Page 9: A Taste of Ice Cream Sandwich in a Gingerbread World

Case Study: Beer Explorer

Page 10: A Taste of Ice Cream Sandwich in a Gingerbread World

ActionBarSherlock

● Wraps Android Support Library● Delivers Holo theming to Gingerbread

devices● Supports list navigation, tabbed navigation,

action bar buttons, and overflow menu

actionbarsherlock.com

Page 11: A Taste of Ice Cream Sandwich in a Gingerbread World

Integrating ActionBarSherlock

1. Include source as library project in Eclipse2. Include Android Support Library in build path3. Set theme in manifest:<application android:theme="@style/Theme.Sherlock">

4. Set drop-down view resource if using list navigation:

ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.action_list, R.layout.sherlock_spinner_item);

adapter.setDropDownViewResource(R.layout.sherlock_spinner_dropdown_item);

Page 12: A Taste of Ice Cream Sandwich in a Gingerbread World

Using ActionBarSherlock

● getActionBar() => getSupportActionBar()● getActivity() => getSupportActivity()● getFragmentManager() =>

getSupportFragmentManager()● FragmentActivity =>

SherlockFragmentActivity, etc. for various activity types

● Method overrides use ActionBarSherlock types

Page 13: A Taste of Ice Cream Sandwich in a Gingerbread World

Ignition Library

● UI components● HTTP wrapper library● HTTP caching framework● Remote image loader● Helper classes for easier API backwards

compatibility, intents, diagnostics, and more● Friendlier and more robust implementation of

AsyncTask

github.com/kaeppler/ignition

Page 14: A Taste of Ice Cream Sandwich in a Gingerbread World

Using the Ignition Library for Beer Explorer

● IgnitedHttp for API requests and caching

● IgnitedAsyncTask for making API requests asynchronously

● RemoteImageView for loading images from URL

Page 15: A Taste of Ice Cream Sandwich in a Gingerbread World

Launchpad Library

HttpTask & ApiRequest classes● Combines IgnitedHttp and IgnitedAsyncTask● Wraps caching and GSON

github.com/abdyer/launchpad

Page 16: A Taste of Ice Cream Sandwich in a Gingerbread World

What It Do?

Page 17: A Taste of Ice Cream Sandwich in a Gingerbread World

Keep Android Trill