How do you_honeycomb_android_for_tablets

Post on 28-Jan-2015

102 views 0 download

Tags:

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

How do you Honeycomb?Android for Tablets

Sparky RhodeAndroid Developer Relations

What is a Tablet?

Phone PC

a tablet is more...

PowerfulDiscoverableFun

ConvenientPersonalImmersive

Compared to...

UX Guidance

More context

More discoverable

Fewer touches

Rich content

Fun transitions

New for Honeycomb

FragmentsAction BarDrag and DropExtended WidgetsRich Notifications

Holo ThemeSystem BarRenderScript

Rethinking UX

Options menu Action bar

Forced orientation Rotation agnostic

Long press Drag and drop

Static keys System bar

Now how do I do it?

Well, that's just ducky.

Android 3.0 SDK

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

API Level: 11SDK Tools: r10

Holographic Theme

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

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">

Tablet Layout

Extra-largeLandscape

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

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>

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

Compatibility Library

Android OS 1.6 (SDK 4) and higher

Extra Credit

Enhanced Widgets

Rich Notifications

Property animation

Hardware acceleration

RenderScript

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

Q & A