26
new(Android UI Patterns) @johanni http://markupartist.com

new Android UI Patterns

Embed Size (px)

DESCRIPTION

Short presentation of the current status of the action bar and pull to refresh projects for Android. Android Library Projects http://developer.android.com/guide/developing/eclipse-adt.html#libraryProject Action Bar for Android https://github.com/johannilsson/android-actionbar Pull to Refresh for Android https://github.com/johannilsson/android-pulltorefresh Presented at GTUG Stockholm 2011-01-20.

Citation preview

Page 1: new Android UI Patterns

new(Android UI Patterns)

@johannihttp://markupartist.com

Page 2: new Android UI Patterns

Twitter for Android

Page 3: new Android UI Patterns

"As many of you know, we’ll soon be open sourcing this application

code under the Android Open Source Project. "

http://android-developers.blogspot.com/2010/05/twitter-for-android-closer-look-at.html

Page 4: new Android UI Patterns

Did they?

Page 5: new Android UI Patterns

NO

Page 6: new Android UI Patterns

So I built my own, last summer I wrote implementations of the action bar and the quick action

pattern. And have recently open sourced the action bar

Page 7: new Android UI Patterns

Building Custom Components

Page 8: new Android UI Patterns

JAR files can't hold Android resources and we really don't want to copy-paste resources.

Page 9: new Android UI Patterns

Android Library Projects

Holds shared code and resources

Page 10: new Android UI Patterns

At build time the library projects are merged with the

application

Page 11: new Android UI Patterns
Page 12: new Android UI Patterns
Page 13: new Android UI Patterns

Reusable widgetsWhite-label appsPaid and free versions of the same app

Page 14: new Android UI Patterns

developer.android.com/guide/developing/eclipse-adt.html#libraryProject

Page 15: new Android UI Patterns

Action Bar

Page 16: new Android UI Patterns
Page 17: new Android UI Patterns

<com.markupartist.android.widget.ActionBar    android:id="@+id/actionbar"    app:title="@string/some_title"    style="@style/ActionBar"    />

Page 18: new Android UI Patterns

ActionBar ab = (ActionBar)    findViewById(R.id.actionbar);// Assign the home actionab.setHomeAction(new IntentAction(    this,homeIntent, R.drawable.home));// Add some actionsab.addAction(new IntentAction(    this, shareIntent, R.drawable.share));ab.addAction(new IntentAction(    this, otherIntent, R.drawable.other));

Page 19: new Android UI Patterns

Customization

<?xml version="1.0" encoding="utf-8"?><resources>    <color name="actionbar_separator">        #3A5FCD    </color>    <color name="actionbar_background_start">        #3A5FCD    </color>    <color name="actionbar_background_end">        #27408B    </color></resources> 

Page 20: new Android UI Patterns

Current Status

Used in Voddler for Android and in the upcoming version of iglaset.

Page 21: new Android UI Patterns

github.com/johannilsson/android-actionbar

Page 22: new Android UI Patterns

Pull to Refresh

Page 23: new Android UI Patterns

http://screenr.com/RRk

Page 24: new Android UI Patterns

Replaces a standard ListView widget.

<com.markupartist.android.        widget.PullToRefreshListView    android:id="@+id/android:list"    android:layout_height="fill_parent"    android:layout_width="fill_parent"    />

Page 25: new Android UI Patterns

Current Status

API Level 8 (2.2) and far from complete

Page 26: new Android UI Patterns

github.com/johannilsson/android-pulltorefresh