How do you_honeycomb_android_for_tablets

17
How do you Honeycomb? Android for Tablets Sparky Rhode Android Developer Relations

description

This presentation contains a quick overview of how your Android application can access the new tablet-oriented capabilities in Android 3.0 "Honeycomb".

Transcript of How do you_honeycomb_android_for_tablets

Page 1: How do you_honeycomb_android_for_tablets

How do you Honeycomb?Android for Tablets

Sparky RhodeAndroid Developer Relations

Page 2: How do you_honeycomb_android_for_tablets

What is a Tablet?

Page 3: How do you_honeycomb_android_for_tablets

Phone PC

a tablet is more...

PowerfulDiscoverableFun

ConvenientPersonalImmersive

Compared to...

Page 4: How do you_honeycomb_android_for_tablets

UX Guidance

More context

More discoverable

Fewer touches

Rich content

Fun transitions

Page 5: How do you_honeycomb_android_for_tablets

New for Honeycomb

FragmentsAction BarDrag and DropExtended WidgetsRich Notifications

Holo ThemeSystem BarRenderScript

Page 6: How do you_honeycomb_android_for_tablets

Rethinking UX

Options menu Action bar

Forced orientation Rotation agnostic

Long press Drag and drop

Static keys System bar

Page 7: How do you_honeycomb_android_for_tablets

Now how do I do it?

Well, that's just ducky.

Page 8: How do you_honeycomb_android_for_tablets

Android 3.0 SDK

http://developer.android.com/sdk/android-3.0.html

API Level: 11SDK Tools: r10

Page 9: How do you_honeycomb_android_for_tablets

Holographic Theme

<manifest ... > <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="11" /> <application ... > ... <application></manifest>

Page 10: How do you_honeycomb_android_for_tablets

Custom Themes

res/values/styles.xml<style name="LightThemeSelector" parent="android:Theme.Light"></style>res/values-v11/styles.xml<style name="LightThemeSelector" parent="android:Theme.Holo.Light"></style>AndroidManifest.xml<activity android:theme="@style/LightThemeSelector">

Page 11: How do you_honeycomb_android_for_tablets

Tablet Layout

Extra-largeLandscape

res/layout-land/res/layout-xlarge-land/res/layout-xlarge-port/

Page 12: How do you_honeycomb_android_for_tablets

Action Bar Menu Resource

<?xml version="1.0" encoding="utf-8"?><menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/menu_add" android:icon="@drawable/ic_menu_save" android:title="@string/menu_save" android:showAsAction="ifRoom|withText" /></menu>

Page 13: How do you_honeycomb_android_for_tablets

Fragments

http://developer.android.com/guide/topics/fundamentals/fragments.html

Layout<fragment class="com.example.android.MyFragment"android:id="@+id/titles" android:layout_weight="1" android:layout_width="0px" android:layout_height="match_parent" />

Classpublic class MyFragment extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.my_fragment, container, false); }}

Page 14: How do you_honeycomb_android_for_tablets

Compatibility Library

Android OS 1.6 (SDK 4) and higher

Page 15: How do you_honeycomb_android_for_tablets

Extra Credit

Enhanced Widgets

Rich Notifications

Property animation

Hardware acceleration

RenderScript

Page 16: How do you_honeycomb_android_for_tablets

Useful URLs

http://developer.android.com/guide/practices/screens_support.html

http://developer.android.com/guide/practices/optimizing-for-3.0.html

http://android-developers.blogspot.com/Fragments For AllAnimation in HoneycombIntroducing RenderscriptThe Android 3.0 Fragments API

Page 17: How do you_honeycomb_android_for_tablets

Q & A