A Taste of Ice Cream Sandwich in a Gingerbread World

  • View
    1.190

  • Download
    4

  • Category

    Business

Preview:

Citation preview

A Taste of Ice Cream Sandwich in a

Gingerbread Worldby Andy Dyer

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: abdyer@gmail.comTwitter: @dammitandyG+: gplus.to/abdyer

or...

A Taste of Ice Cream Sandwich in a

Gingerbread World

Keepin' Android Trill*

*trill /tril/noun: true and real

Ice Cream Sandwich vs Gingerbread usage in Music Library Free

Key UI Differences

● Action bar/overflow menu vs options/context menu

● OK/Cancel button order

● Themes/styles● New controls

Approaches for Supporting Multiple Versions of Android

● Multiple apps... bad● Different layouts for

each version... better

● Ice Cream Sandwich in my Gingerbread...yum

Case Study: Beer Explorer

ActionBarSherlock

● Wraps Android Support Library● Delivers Holo theming to Gingerbread

devices● Supports list navigation, tabbed navigation,

action bar buttons, and overflow menu

actionbarsherlock.com

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

Using ActionBarSherlock

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

getSupportFragmentManager()● FragmentActivity =>

SherlockFragmentActivity, etc. for various activity types

● Method overrides use ActionBarSherlock types

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

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

Launchpad Library

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

github.com/abdyer/launchpad

What It Do?

Keep Android Trill

Recommended