Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

Google I/O 2011, Android Honeycomb Highlights

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Nächste SlideShare
Mashups & APIs
Mashups & APIs
Wird geladen in …3
×

Hier ansehen

1 von 52 Anzeige
Anzeige

Weitere Verwandte Inhalte

Andere mochten auch (15)

Ähnlich wie Google I/O 2011, Android Honeycomb Highlights (20)

Anzeige

Aktuellste (20)

Google I/O 2011, Android Honeycomb Highlights

  1. 1. Honeycomb Highlights Romain Guy @romainguy Chet Haase @chethaase May 10, 2011 Questions http://goo.gl/mod/8NZp Feedback http://goo.gl/hD5M9 Hashtags #io2011, #Android
  2. 2. Honeycomb Highlights Honeycomb and Get It Romain Guy @romainguy Chet Haase @chethaase May 10, 2011 Questions http://goo.gl/mod/8NZp Feedback http://goo.gl/hD5M9 Hashtags #io2011, #Android
  3. 3. Honeycomb • The tablet release • User improvements • Developer improvements
  4. 4. The Tablet Release • Tablet != Phone • Screen size • Input • More memory, faster CPU, multi-core – But more pixels... • GPU!
  5. 5. Honeycomb • The tablet release • User improvements • Developer improvements
  6. 6. UI Improvements • Home screen, new ‘Holo’ theme • Keyboard • Text selection • USB device connectivity • Action Bar, System Bar • Recent Apps
  7. 7. New and Improved Applications • New – Books – Movie Studio • Improved – Market – Browser – Contacts – Music – Gmail – ...
  8. 8. New Widgets • Richer • More interactive • Books, Bookmarks, Gmail, Calendar, ...
  9. 9. Demo
  10. 10. Honeycomb • The tablet release • User improvements • Developer improvements
  11. 11. Fragments • Like mini-activities • For flexible screen format situations – landscape vs. portrait – large vs. small
  12. 12. Fragments
  13. 13. Fragments • Single activity, multiple fragments
  14. 14. Fragments • Separate activities
  15. 15. Fragments: For More Info • Read Dianne Hackborn’s The Android 3.0 Fragments API – android-developers.blogspot.com • Get “Android Compatibility package” in the SDK Updater – Fragments now available in 1.6+ !!!!
  16. 16. System Bar
  17. 17. System Bar
  18. 18. System Bar
  19. 19. System Bar
  20. 20. System Bar: Always On
  21. 21. System Bar: Always On
  22. 22. Action Bar Home/Up Navigation Actions Text Actions
  23. 23. Action Bar Home/Up Navigation Actions Overflow Text Actions
  24. 24. Action Bar Home/Up Navigation Actions Text Actions
  25. 25. Action Bar Contextual ActionBar Text Actions
  26. 26. Action Bar @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.actions, menu); return true; }
  27. 27. Action Bar <menu> <item android:id="@+id/action_edit" android:icon="@android:drawable/ic_menu_edit" android:showAsAction="always" android:title="@string/action_bar_edit" /> <item android:id="@+id/action_share" android:icon="@android:drawable/ic_menu_share" android:showAsAction="ifRoom" android:title="@string/action_bar_share" /> </menu>
  28. 28. Action Bar <menu> <item android:id="@+id/action_edit" android:icon="@android:drawable/ic_menu_edit" android:showAsAction="always" android:title="@string/action_bar_edit" /> <item android:id="@+id/action_share" android:icon="@android:drawable/ic_menu_share" android:showAsAction="ifRoom" android:title="@string/action_bar_share" /> </menu>
  29. 29. Renderscript • Native code for fast graphics, computation • Platform-independent • Syntax based on C99 • Uses GPU, CPU, multi-core • Used in Books, YouTube, Live Wallpapers
  30. 30. Renderscript: HelloWorldRS.java public class HelloWorldRS { private ScriptC_helloworld mScript; public void init(RenderScriptGL rs, Resources res) { mScript = new ScriptC_helloworld(rs, res, R.raw.helloworld); rs.bindRootScript(mScript); } public void onActionDown(int x, int y) { mScript.set_gTouchX(x); mScript.set_gTouchY(y); } }
  31. 31. Renderscript: helloworld.rs int gTouchX; int gTouchY; void init() { gTouchX = 50.0f; gTouchY = 50.0f; } int root(int launchID) { rsgClearColor(0.0f, 0.0f, 0.0f, 0.0f); rsgFontColor(1.0f, 1.0f, 1.0f, 1.0f); rsgDrawText("Hello World!", gTouchX, gTouchY); return 20; }
  32. 32. Renderscript • Read Jason Sams’s Renderscript articles – android-developers.blogspot.com • Play with the SDK Renderscript samples
  33. 33. Graphics Acceleration • OpenGL acceleration for most graphics operations – Canvas.drawLine(), Canvas.drawBitmap(), ... • Used in Launcher, Gmail, Contacts, Calendar, YouTube, Browser, Maps, Settings, ...
  34. 34. Acceleration: The Complex API Details
  35. 35. Acceleration: The Complex API Details <application android:hardwareAccelerated=”true”>
  36. 36. Acceleration: The Complex API Details <application android:hardwareAccelerated=”true”> • Opt-in via AndroidManifest.xml • Selectively disable at Activity, Window, or View level
  37. 37. More Details • Come to Accelerated Android Rendering – Tomorrow 10:45 • Read Android 3.0 Hardware Acceleration – android-developers.blogspot.com
  38. 38. Animation Framework • New system built on “property animation” – Any object, any property, any type • New properties on View – alpha, translationX/Y, scaleX/Y, rotation, ...
  39. 39. Animation Framework • New system built on “property animation” – Any object, any property, any type • New properties on View – alpha, translationX/Y, scaleX/Y, rotation, ... ObjectAnimator.ofFloat(target, “alpha”, 0f).start();
  40. 40. Demo
  41. 41. PhotoAlbum Animations if (mPanelVisible) { mPanelAnimator = ObjectAnimator.ofFloat(mPanel, "x", 0.0f); } else { mPanelAnimator = ObjectAnimator.ofFloat(mPanel, "x", -mPanel.getWidth()); } mPanelAnimator.start();
  42. 42. PhotoAlbum Animations mPanel.setLayerType(View.LAYER_TYPE_HARDWARE, null); if (mPanelVisible) { mPanelAnimator = ObjectAnimator.ofFloat(mPanel, "x", 0.0f); } else { mPanelAnimator = ObjectAnimator.ofFloat(mPanel, "x", -mPanel.getWidth()); } mPanelAnimator.start(); mPanelAnimator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { mPanel.setLayerType(View.LAYER_TYPE_NONE, null); } });
  43. 43. PhotoAlbum Animations if (mPanelAnimator != null && mPanelAnimator.isRunning()) { mPanelAnimator.reverse(); return; } mPanel.setLayerType(View.LAYER_TYPE_HARDWARE, null); if (mPanelVisible) { mPanelAnimator = ObjectAnimator.ofFloat(mPanel, "x", 0.0f); } else { mPanelAnimator = ObjectAnimator.ofFloat(mPanel, "x", -mPanel.getWidth()); } mPanelAnimator.start(); mPanelAnimator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { mPanel.setLayerType(View.LAYER_TYPE_NONE, null); } });
  44. 44. For More Information • Read Animation in Honeycomb – android-developers.blogspot.com • Check out the animation demos in the SDK
  45. 45. And Much, Much More... • Clipboard • Drag and Drop • HTTP Live Streaming • Pluggable DRM framework • Encrypted storage • New/improved components – DatePicker, NumberPicker, StackView, CalendarView, ... • Tools – UI Builder, code completion, ... – Android Development Tools, Wednesday@3
  46. 46. More in Android 3
  47. 47. More in Android 3.1 Ne USB: Beyond keyboards w ! External camera support Resizable widgets RTP API Performance optimizations ViewPropertyAnimator
  48. 48. The Future • Honeycomb was optimized for tablets – But we’re working on bringing the Honeycomb UI and functionality to smaller screen devices • More, better, fancier, faster, lovelier
  49. 49. For More Information • At Google IO – Android USB Accessory Mode: Tuesday 1:15 – Fireside Chat: Tuesday 2:30 – Android UIs for Phones and Tablets: Wednesday 12:30 – Android Development Tools: Wednesday 3:00 – Memory Management for Android Apps: Wednesday 4:15 • After Google IO – Android Developers Blog: android-developers.blogspot.com – Romain’s blog: curious-creature.org – Chet’s blog: graphics-geek.blogspot.com
  50. 50. Questions http://goo.gl/mod/8NZp Q&A Feedback http://goo.gl/hD5M9 Hashtags #io2011, #Android

Hinweis der Redaktion

  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Romain + Chet\nShow home screen, launcher, basic UI\nDemos of honeycomb apps: gmail, contacts, books, music, etc.\nWidgets: show widget list, show bookmarks, books, youtube, calendar, gmail, ...\n(choreograph)\n
  • \n
  • \n
  • Larger devices may be able to fit what might otherwise be multiple activities\n
  • One activity, single layout with both fragments\n
  • two activities, each with fragment\n
  • \n
  • Buttons: Home, back, Recent apps\nNotifications\nCustomized notifications with Notification.Builder\n
  • Buttons: Home, back, Recent apps\nNotifications\nCustomized notifications with Notification.Builder\n
  • Buttons: Home, back, Recent apps\nNotifications\nCustomized notifications with Notification.Builder\n
  • Buttons: Home, back, Recent apps\nNotifications\nCustomized notifications with Notification.Builder\n
  • Lights-out\n
  • Lights-out\n
  • Lights-out\n
  • Lights-out\n
  • Lights-out\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • view properties: cheap to change transform/alpha properties with layers or display lists\n
  • Romain (photo app) + Chet (API demos)\nPhoto app: animation and hardware support for layers\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • USB: New USB stack for arbitrary device handling, new input events for keyboards and pointers\nCamera: MTP Media Transfer Protocol API for device detection and storage\nWigets: resizable by users, attribute flag in widget declaration\nRTP: Real Time Protocol, for audio streaming, VOIP, conferencing\nOptimizations: more Framework stuff to make rendering faster\n
  • USB: New USB stack for arbitrary device handling, new input events for keyboards and pointers\nCamera: MTP Media Transfer Protocol API for device detection and storage\nWigets: resizable by users, attribute flag in widget declaration\nRTP: Real Time Protocol, for audio streaming, VOIP, conferencing\nOptimizations: more Framework stuff to make rendering faster\n
  • USB: New USB stack for arbitrary device handling, new input events for keyboards and pointers\nCamera: MTP Media Transfer Protocol API for device detection and storage\nWigets: resizable by users, attribute flag in widget declaration\nRTP: Real Time Protocol, for audio streaming, VOIP, conferencing\nOptimizations: more Framework stuff to make rendering faster\n
  • \n
  • \n
  • \n
  • \n

×