SlideShare ist ein Scribd-Unternehmen logo
1 von 36
Downloaden Sie, um offline zu lesen
Q3 2011
Q3 2011




Introduction to
Honeycomb APIs
Q3 2011
Q3 2011


Honeycomb

§  Focused on tablets
§  Huge release, many updates and new
    features
§  New holographic system theme
§  Version 3.0 (base), 3.1 and 3.2 (point
    releases), API levels 11/12/13


                                                  3
Q3 2011


System Bar

§  System-wide navigation and status
§  Orientation agnostic
§  Always there with varying height
  –  ~48dp-56dp
  –  design flexible layouts!
  –  can use display.getHeight()/getWidth() !




                                             4
Q3 2011


System Bar

§  Lights out mode

mView.setSystemUiVisibility(View.STATUS_BAR_HIDDEN);!
mView.setSystemUiVisibility(View.STATUS_BAR_VISIBLE);!




                                                     5
Q3 2011


Notifications

§  Android’s great notifications, improved
§  Dismiss individually
§  Customizable
  –  Larger icon
  –  Actionable buttons




                                                   6
Q3 2011


Action Bar




     Navigation   Custom   Action
App Icon           View    Items




                                         7
Q3 2011


Action Bar (Action Items)




§  Menu items from Options Menu
§  Easily configured via menu resource file

<item android:id="@+id/menu_add"

   android:icon="@drawable/ic_menu_save"

   android:title="@string/menu_save"

   android:showAsAction="ifRoom|withText" />!

                                                     8
Q3 2011


Action Bar (Action Items)
public boolean onCreateOptionsMenu(Menu menu) {!
    MenuInflater inflater = getActivity().getMenuInflater();!
    inflater.inflate(R.menu.my_menu, menu);!
    return true;!
}!



public boolean onOptionsItemSelected(MenuItem item) {!
   switch (item.getItemId()) {!
      case android.R.id.home:!
        // app icon in Action Bar clicked; go home!
        return true;!
      case R.id.my_menu_item:!
        // app menu item selected!
        return true;!
      default:!
        return super.onOptionsItemSelected(item);!
   }!
}!
                                                                9
Q3 2011


Redesigned Home Screen Widgets

§  Users can interact with home screen widgets
    in new ways like flipping and scrolling
§  New widgets: ListView, GridView, StackView…
§  Resizable (from 3.1)




                                                  10
Q3 2011


Fragments
       Phone                     Tablet




  Activity
    1      Activity   Fragment       Fragment
             2            1              2

 Activity
 Fragment


Re-think your UI, don’t just let it stretch!
                                                     11
Q3 2011


Fragments




                12
Q3 2011


Fragments – Lifecycle




                            13
Q3 2011


Fragments – Other Uses

§  Award for best named method:
  –    onRetainNonConfigurationInstance()!

§  Instead use:
  –  setRetainInstance(true)!

§  Fragments without UI
  –  Retain state through configuration changes
  –  Use in conjunction with AsyncTask

                                                      14
Q3 2011


Fragments – Summary

§  Reusable UI components within an Activity
§  Has its own lifecycle and back stack. Its lifecycle is
    affected by the host Activity’s lifecycle
§  Attach to a ViewGroup in the Activity view hierarchy
    through <fragment> in XML or programmatically
§  Act as a background worker (findFragmentByTag)
§  Can be added, removed and replaced via
    FragmentTransaction!
§  Can communicate with each other via
    FragmentManager!
                                                             15
Q3 2011


Fragments Example

// Get FragmentManager!
FragmentManager fragmentManager = getFragmentManager();!
!
// Create new fragment and transaction!
Fragment newFragment = new ExampleFragment();!
!
FragmentTransaction transaction =!
    fragmentManager.beginTransaction();!
!
// Replace view and add to back stack!
transaction.replace(R.id.fragment_container, newFragment);!
transaction.addToBackStack(null);!
!
// Commit!
transaction.commit();!


                                                         16
Q3 2011


Loaders

§  Easy way to asynchronously load data in
    an Activity or Fragment
§  Monitors data source and deliver results
    when content changes
§  Automatically reconnect after
    configuration change


                                               17
Q3 2011


CursorLoader Example

§  Implement LoaderManager.LoaderCallbacks!
public Loader<Cursor> onCreateLoader(int id, Bundle args) {!
   ...!
   return new CursorLoader(!
        getActivity(), mUri, mProjection,!
        mSelection, mSelectionArgs, mSortOrder)!
}!
!
public void onLoadFinished(Loader<Cursor> loader,!
     Cursor data) {!
   mAdapter.swapCursor(data);!
}!
!
public void onLoaderReset(Loader<Cursor> loader) {!
   mAdapter.swapCursor(null);!
}!                                                       18
Q3 2011


CursorLoader Example

§  Init loader in onCreate()!

SimpleCursorAdapter mAdapter;!
!
public void onActivityCreated(Bundle savedInstanceState) {!
   ...!
   mAdapter = new SimpleCursorAdapter(...);!
   setListAdapter(mAdapter);!
   getLoaderManager().initLoader(0, null, this);!
}!




                                                         19
Q3 2011


Clipboard Framework – Copy & Paste

§  Supports 3 types of content
  –  Text
  –  URI
  –  Intent

§  At any time, only one clip on the clipboard
§  For each clip (ClipData), it can store
    multiple items of the same type
§  You decide what MIME types can be
    handled by your app                          20
Q3 2011


Drag and Drop

§  A drag begins by calling
view.startDrag(dragData, shadow, null, 0);!


§  To accept a drop implement
View.OnDragListener!

§  Use ClipData to store “drag” data


                                                  21
Q3 2011


Hardware Acceleration

§  Speed up standard widgets, drawables –
    all drawing operations on View’s Canvas
§  Can be set at the Activity, Window and
    View levels
§  Default is disabled

<application android:hardwareAccelerated=“true”>!
   …        !
</application>!

                                                    22
Q3 2011


Renderscript

§  High performance 3D rendering and
    compute API
§  Written in C99 (a dialect of C)
§  Pros: portability, performance, usability
§  Cons: new APIs, debugging, fewer
    features (compared to OpenGL)


                                                23
Q3 2011


Renderscript – Sample Apps

                     Google Books




        YouTube
                                        24
Q3 2011


Property Animation Framework

§  New animation system that can animate
    any object’s properties
§  Changes objects and their behavior as
    well
§  Can animate changes to a ViewGroup!
§  ViewPropertyAnimator (3.1+) makes
 animations even simpler and more
 efficient
                                            25
Q3 2011


Property Animation Framework

§  Simple property animation:
ObjectAnimator.ofFloat(myView, "alpha", 0f)!
  .setDuration(500)

  .start();!



§  Even better using ViewPropertyAnimator:
myView.animate().setDuration(500).alpha(0);!




                                                   26
Q3 2011


Enterprise

§  Support for encrypted storage
§  New device administration policy support
  –  Encrypted storage
  –  Password expiration
  –  Password history
  –  Password complex character required




                                               27
Q3 2011


Media – Updates from Android 3.0, 3.1, 3.2

§  HTTP Live Streaming
§  Pluggable DRM framework
§  Inline playback of HTML5 <video>!
§  MTP/PTP
§  RTP
§  Updated Media Formats
  –  Raw ADTS AAC, FLAC…
                                            28
Q3 2011




Your App & Honeycomb
Q3 2011


Design With Tablets in Mind

§  Use density independent pixels (dp)
§  Design flexible layouts
§  Centralize dimensions using dimens.xml!
§  Keep application logic and UI separate
§  Support landscape and don’t assume
    portrait

                                              30
Q3 2011


Updating Your App for Honeycomb
§  Test holographic theme
§  Update for ActionBar
§  Add higher resolution graphics
§  Tweak layouts, spacing, font sizes
§  Fragments
<manifest ... >!
    <uses-sdk android:minSdkVersion="4" !
              android:targetSdkVersion="11" />!
</manifest>!
                                                      31
Q3 2011


Compatibility Library

§  Not really a compatibility library anymore,
    more of a support library
§  Works back to API Level 4 (Donut / 1.6)
§  Provides:
  –  Fragments
  –  Loaders
  –  ViewPager / PagerAdapter - neat!
  –  LruCache
  –  and more…
                                               32
Q3 2011


Screen Size Support – Updated in 3.2

§  Screen compatibility mode
§  Optimizations for a wider range of tablets
§  New numeric selectors
  –  smallestWidth (res/layout-sw720dp)
  –  width (res/layout-w600dp)
  –  height (res/layout-h720dp)




                                                 33
Q3 2011


Looking Forward

§  Ice Cream Sandwich – very tasty dessert




                                              34
Q3 2011




    For more, visit
developer.android.com
Q3 2011


Copyrights and trademarks

§  Android, Google are registered
    trademarks of Google Inc.
§  All other trademarks and copyrights are
    the property of their respective owners.




                                               36

Weitere ähnliche Inhalte

Was ist angesagt?

Image processing techniques 1
Image processing techniques   1Image processing techniques   1
Image processing techniques 11988sreejith
 
Mobile Application Development with JUCE and Native API’s
Mobile Application Development with JUCE and Native API’sMobile Application Development with JUCE and Native API’s
Mobile Application Development with JUCE and Native API’sAdam Wilson
 
IBM Mobile Foundation POT - Part 2 introduction to application development wi...
IBM Mobile Foundation POT - Part 2 introduction to application development wi...IBM Mobile Foundation POT - Part 2 introduction to application development wi...
IBM Mobile Foundation POT - Part 2 introduction to application development wi...AIP Foundation
 
View groups containers
View groups containersView groups containers
View groups containersMani Selvaraj
 
iOS 7 UI Transition Guide
iOS 7 UI Transition GuideiOS 7 UI Transition Guide
iOS 7 UI Transition GuideEvgeny Belyaev
 
Open social gadgets in ibm connections
Open social gadgets in ibm connectionsOpen social gadgets in ibm connections
Open social gadgets in ibm connectionsVincent Burckhardt
 
Intro to Google TV
Intro to Google TVIntro to Google TV
Intro to Google TVGauntFace
 
Session 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 applicationSession 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 applicationVu Tran Lam
 
Android UI Reference
Android UI ReferenceAndroid UI Reference
Android UI ReferenceGauntFace
 
Android Screen Containers & Layouts
Android Screen Containers & LayoutsAndroid Screen Containers & Layouts
Android Screen Containers & LayoutsVijay Rastogi
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User InterfaceMarko Gargenta
 
I phone human interface guidlines
I phone human interface guidlinesI phone human interface guidlines
I phone human interface guidlineszhuxiongjie
 
Accessible web applications
Accessible web applications Accessible web applications
Accessible web applications Steven Faulkner
 

Was ist angesagt? (20)

Image processing techniques 1
Image processing techniques   1Image processing techniques   1
Image processing techniques 1
 
Android xml-based layouts-chapter5
Android xml-based layouts-chapter5Android xml-based layouts-chapter5
Android xml-based layouts-chapter5
 
Motion 4 user manual (en)
Motion 4 user manual (en)Motion 4 user manual (en)
Motion 4 user manual (en)
 
Mobile Application Development with JUCE and Native API’s
Mobile Application Development with JUCE and Native API’sMobile Application Development with JUCE and Native API’s
Mobile Application Development with JUCE and Native API’s
 
Android and Intel Inside
Android and Intel InsideAndroid and Intel Inside
Android and Intel Inside
 
IBM Mobile Foundation POT - Part 2 introduction to application development wi...
IBM Mobile Foundation POT - Part 2 introduction to application development wi...IBM Mobile Foundation POT - Part 2 introduction to application development wi...
IBM Mobile Foundation POT - Part 2 introduction to application development wi...
 
Unit2
Unit2Unit2
Unit2
 
View groups containers
View groups containersView groups containers
View groups containers
 
iOS 7 UI Transition Guide
iOS 7 UI Transition GuideiOS 7 UI Transition Guide
iOS 7 UI Transition Guide
 
Sikuli
SikuliSikuli
Sikuli
 
Open social gadgets in ibm connections
Open social gadgets in ibm connectionsOpen social gadgets in ibm connections
Open social gadgets in ibm connections
 
Intro to Google TV
Intro to Google TVIntro to Google TV
Intro to Google TV
 
Session 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 applicationSession 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 application
 
Android UI Reference
Android UI ReferenceAndroid UI Reference
Android UI Reference
 
Report swings
Report swingsReport swings
Report swings
 
Android Screen Containers & Layouts
Android Screen Containers & LayoutsAndroid Screen Containers & Layouts
Android Screen Containers & Layouts
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User Interface
 
I phone human interface guidlines
I phone human interface guidlinesI phone human interface guidlines
I phone human interface guidlines
 
Android Basic Components
Android Basic ComponentsAndroid Basic Components
Android Basic Components
 
Accessible web applications
Accessible web applications Accessible web applications
Accessible web applications
 

Ähnlich wie Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3

Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)Gabor Varadi
 
Introducing Honeycomb
Introducing HoneycombIntroducing Honeycomb
Introducing HoneycombCommonsWare
 
Proteus - android layout engine
Proteus - android layout engineProteus - android layout engine
Proteus - android layout engineKiran Kumar
 
Introduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDKIntroduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDKBrendan Lim
 
Introduction to Flex Hero for Mobile Devices
Introduction to Flex Hero for Mobile DevicesIntroduction to Flex Hero for Mobile Devices
Introduction to Flex Hero for Mobile DevicesRyan Stewart
 
iOS app dev Training - Session1
iOS app dev Training - Session1iOS app dev Training - Session1
iOS app dev Training - Session1Hussain Behestee
 
Android Architecture Components
Android Architecture ComponentsAndroid Architecture Components
Android Architecture ComponentsDarshan Parikh
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperFabrit Global
 
Making mobile flex apps blazing fast
Making mobile flex apps blazing fastMaking mobile flex apps blazing fast
Making mobile flex apps blazing fastMichał Wróblewski
 
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...DicodingEvent
 
QTP Interview Questions and answers
QTP Interview Questions and answersQTP Interview Questions and answers
QTP Interview Questions and answersRita Singh
 
React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)Chiew Carol
 
Win8 development lessons learned jayway
Win8 development lessons learned jaywayWin8 development lessons learned jayway
Win8 development lessons learned jaywayAndreas Hammar
 
MVP Community Camp 2014 - How to use enhanced features of Windows 8.1 Store ...
MVP Community Camp 2014 - How to useenhanced features of Windows 8.1 Store ...MVP Community Camp 2014 - How to useenhanced features of Windows 8.1 Store ...
MVP Community Camp 2014 - How to use enhanced features of Windows 8.1 Store ...Akira Hatsune
 
[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Android[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Androidrizki adam kurniawan
 
Android - Open Source Bridge 2011
Android - Open Source Bridge 2011Android - Open Source Bridge 2011
Android - Open Source Bridge 2011sullis
 
Google I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and JetpackGoogle I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and JetpackSunita Singh
 

Ähnlich wie Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3 (20)

Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)
 
Windows phone and azure
Windows phone and azureWindows phone and azure
Windows phone and azure
 
Introducing Honeycomb
Introducing HoneycombIntroducing Honeycomb
Introducing Honeycomb
 
Proteus - android layout engine
Proteus - android layout engineProteus - android layout engine
Proteus - android layout engine
 
Introduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDKIntroduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDK
 
Introduction to Flex Hero for Mobile Devices
Introduction to Flex Hero for Mobile DevicesIntroduction to Flex Hero for Mobile Devices
Introduction to Flex Hero for Mobile Devices
 
iOS app dev Training - Session1
iOS app dev Training - Session1iOS app dev Training - Session1
iOS app dev Training - Session1
 
Android Architecture Components
Android Architecture ComponentsAndroid Architecture Components
Android Architecture Components
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular Developer
 
Os Haase
Os HaaseOs Haase
Os Haase
 
Making mobile flex apps blazing fast
Making mobile flex apps blazing fastMaking mobile flex apps blazing fast
Making mobile flex apps blazing fast
 
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
 
Stmik bandung
Stmik bandungStmik bandung
Stmik bandung
 
QTP Interview Questions and answers
QTP Interview Questions and answersQTP Interview Questions and answers
QTP Interview Questions and answers
 
React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)
 
Win8 development lessons learned jayway
Win8 development lessons learned jaywayWin8 development lessons learned jayway
Win8 development lessons learned jayway
 
MVP Community Camp 2014 - How to use enhanced features of Windows 8.1 Store ...
MVP Community Camp 2014 - How to useenhanced features of Windows 8.1 Store ...MVP Community Camp 2014 - How to useenhanced features of Windows 8.1 Store ...
MVP Community Camp 2014 - How to use enhanced features of Windows 8.1 Store ...
 
[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Android[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Android
 
Android - Open Source Bridge 2011
Android - Open Source Bridge 2011Android - Open Source Bridge 2011
Android - Open Source Bridge 2011
 
Google I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and JetpackGoogle I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and Jetpack
 

Mehr von Paris Android User Group

Workshop: building your mobile backend with Parse - Droidcon Paris2014
Workshop: building your mobile backend with Parse - Droidcon Paris2014Workshop: building your mobile backend with Parse - Droidcon Paris2014
Workshop: building your mobile backend with Parse - Droidcon Paris2014Paris Android User Group
 
Workshop: Amazon developer ecosystem - DroidCon Paris2014
Workshop: Amazon developer ecosystem - DroidCon Paris2014Workshop: Amazon developer ecosystem - DroidCon Paris2014
Workshop: Amazon developer ecosystem - DroidCon Paris2014Paris Android User Group
 
Extending your apps to wearables - DroidCon Paris 2014
Extending your apps to wearables -  DroidCon Paris 2014Extending your apps to wearables -  DroidCon Paris 2014
Extending your apps to wearables - DroidCon Paris 2014Paris Android User Group
 
Scaling android development - DroidCon Paris 2014
Scaling android development - DroidCon Paris 2014Scaling android development - DroidCon Paris 2014
Scaling android development - DroidCon Paris 2014Paris Android User Group
 
Ingredient of awesome app - DroidCon Paris 2014
Ingredient of awesome app - DroidCon Paris 2014Ingredient of awesome app - DroidCon Paris 2014
Ingredient of awesome app - DroidCon Paris 2014Paris Android User Group
 
Deep dive into android restoration - DroidCon Paris 2014
Deep dive into android restoration - DroidCon Paris 2014Deep dive into android restoration - DroidCon Paris 2014
Deep dive into android restoration - DroidCon Paris 2014Paris Android User Group
 
Archos Android based connected home solution - DroidCon Paris 2014
Archos Android based connected home solution - DroidCon Paris 2014Archos Android based connected home solution - DroidCon Paris 2014
Archos Android based connected home solution - DroidCon Paris 2014Paris Android User Group
 
Porting VLC on Android - DroidCon Paris 2014
Porting VLC on Android - DroidCon Paris 2014Porting VLC on Android - DroidCon Paris 2014
Porting VLC on Android - DroidCon Paris 2014Paris Android User Group
 
Robotium vs Espresso: Get ready to rumble ! - DroidCon Paris 2014
Robotium vs Espresso: Get ready to rumble ! - DroidCon Paris 2014Robotium vs Espresso: Get ready to rumble ! - DroidCon Paris 2014
Robotium vs Espresso: Get ready to rumble ! - DroidCon Paris 2014Paris Android User Group
 
maximize app engagement and monetization - DroidCon Paris 2014
maximize app engagement and monetization - DroidCon Paris 2014maximize app engagement and monetization - DroidCon Paris 2014
maximize app engagement and monetization - DroidCon Paris 2014Paris Android User Group
 
Using the android ndk - DroidCon Paris 2014
Using the android ndk - DroidCon Paris 2014Using the android ndk - DroidCon Paris 2014
Using the android ndk - DroidCon Paris 2014Paris Android User Group
 
Holo material design transition - DroidCon Paris 2014
Holo material design transition - DroidCon Paris 2014Holo material design transition - DroidCon Paris 2014
Holo material design transition - DroidCon Paris 2014Paris Android User Group
 
Google glass droidcon - DroidCon Paris 2014
Google glass droidcon - DroidCon Paris 2014Google glass droidcon - DroidCon Paris 2014
Google glass droidcon - DroidCon Paris 2014Paris Android User Group
 
Embedded webserver implementation and usage - DroidCon Paris 2014
Embedded webserver implementation and usage - DroidCon Paris 2014Embedded webserver implementation and usage - DroidCon Paris 2014
Embedded webserver implementation and usage - DroidCon Paris 2014Paris Android User Group
 
Petit design Grande humanité par Geoffrey Dorne - DroidCon Paris 2014
Petit design Grande humanité par Geoffrey Dorne - DroidCon Paris 2014Petit design Grande humanité par Geoffrey Dorne - DroidCon Paris 2014
Petit design Grande humanité par Geoffrey Dorne - DroidCon Paris 2014Paris Android User Group
 
Efficient Image Processing - Nicolas Roard
Efficient Image Processing - Nicolas RoardEfficient Image Processing - Nicolas Roard
Efficient Image Processing - Nicolas RoardParis Android User Group
 

Mehr von Paris Android User Group (20)

Workshop: building your mobile backend with Parse - Droidcon Paris2014
Workshop: building your mobile backend with Parse - Droidcon Paris2014Workshop: building your mobile backend with Parse - Droidcon Paris2014
Workshop: building your mobile backend with Parse - Droidcon Paris2014
 
Workshop: Amazon developer ecosystem - DroidCon Paris2014
Workshop: Amazon developer ecosystem - DroidCon Paris2014Workshop: Amazon developer ecosystem - DroidCon Paris2014
Workshop: Amazon developer ecosystem - DroidCon Paris2014
 
Extending your apps to wearables - DroidCon Paris 2014
Extending your apps to wearables -  DroidCon Paris 2014Extending your apps to wearables -  DroidCon Paris 2014
Extending your apps to wearables - DroidCon Paris 2014
 
Scaling android development - DroidCon Paris 2014
Scaling android development - DroidCon Paris 2014Scaling android development - DroidCon Paris 2014
Scaling android development - DroidCon Paris 2014
 
Ingredient of awesome app - DroidCon Paris 2014
Ingredient of awesome app - DroidCon Paris 2014Ingredient of awesome app - DroidCon Paris 2014
Ingredient of awesome app - DroidCon Paris 2014
 
Framing the canvas - DroidCon Paris 2014
Framing the canvas - DroidCon Paris 2014Framing the canvas - DroidCon Paris 2014
Framing the canvas - DroidCon Paris 2014
 
Deep dive into android restoration - DroidCon Paris 2014
Deep dive into android restoration - DroidCon Paris 2014Deep dive into android restoration - DroidCon Paris 2014
Deep dive into android restoration - DroidCon Paris 2014
 
Archos Android based connected home solution - DroidCon Paris 2014
Archos Android based connected home solution - DroidCon Paris 2014Archos Android based connected home solution - DroidCon Paris 2014
Archos Android based connected home solution - DroidCon Paris 2014
 
Porting VLC on Android - DroidCon Paris 2014
Porting VLC on Android - DroidCon Paris 2014Porting VLC on Android - DroidCon Paris 2014
Porting VLC on Android - DroidCon Paris 2014
 
Robotium vs Espresso: Get ready to rumble ! - DroidCon Paris 2014
Robotium vs Espresso: Get ready to rumble ! - DroidCon Paris 2014Robotium vs Espresso: Get ready to rumble ! - DroidCon Paris 2014
Robotium vs Espresso: Get ready to rumble ! - DroidCon Paris 2014
 
Buildsystem.mk - DroidCon Paris 2014
Buildsystem.mk - DroidCon Paris 2014Buildsystem.mk - DroidCon Paris 2014
Buildsystem.mk - DroidCon Paris 2014
 
maximize app engagement and monetization - DroidCon Paris 2014
maximize app engagement and monetization - DroidCon Paris 2014maximize app engagement and monetization - DroidCon Paris 2014
maximize app engagement and monetization - DroidCon Paris 2014
 
Using the android ndk - DroidCon Paris 2014
Using the android ndk - DroidCon Paris 2014Using the android ndk - DroidCon Paris 2014
Using the android ndk - DroidCon Paris 2014
 
Holo material design transition - DroidCon Paris 2014
Holo material design transition - DroidCon Paris 2014Holo material design transition - DroidCon Paris 2014
Holo material design transition - DroidCon Paris 2014
 
Death to passwords - DroidCon Paris 2014
Death to passwords - DroidCon Paris 2014Death to passwords - DroidCon Paris 2014
Death to passwords - DroidCon Paris 2014
 
Google glass droidcon - DroidCon Paris 2014
Google glass droidcon - DroidCon Paris 2014Google glass droidcon - DroidCon Paris 2014
Google glass droidcon - DroidCon Paris 2014
 
Embedded webserver implementation and usage - DroidCon Paris 2014
Embedded webserver implementation and usage - DroidCon Paris 2014Embedded webserver implementation and usage - DroidCon Paris 2014
Embedded webserver implementation and usage - DroidCon Paris 2014
 
Petit design Grande humanité par Geoffrey Dorne - DroidCon Paris 2014
Petit design Grande humanité par Geoffrey Dorne - DroidCon Paris 2014Petit design Grande humanité par Geoffrey Dorne - DroidCon Paris 2014
Petit design Grande humanité par Geoffrey Dorne - DroidCon Paris 2014
 
Efficient Image Processing - Nicolas Roard
Efficient Image Processing - Nicolas RoardEfficient Image Processing - Nicolas Roard
Efficient Image Processing - Nicolas Roard
 
Build a user experience by Eyal Lezmy
Build a user experience by Eyal LezmyBuild a user experience by Eyal Lezmy
Build a user experience by Eyal Lezmy
 

Kürzlich hochgeladen

Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 

Kürzlich hochgeladen (20)

Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 

Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3

  • 3. Q3 2011 Honeycomb §  Focused on tablets §  Huge release, many updates and new features §  New holographic system theme §  Version 3.0 (base), 3.1 and 3.2 (point releases), API levels 11/12/13 3
  • 4. Q3 2011 System Bar §  System-wide navigation and status §  Orientation agnostic §  Always there with varying height –  ~48dp-56dp –  design flexible layouts! –  can use display.getHeight()/getWidth() ! 4
  • 5. Q3 2011 System Bar §  Lights out mode mView.setSystemUiVisibility(View.STATUS_BAR_HIDDEN);! mView.setSystemUiVisibility(View.STATUS_BAR_VISIBLE);! 5
  • 6. Q3 2011 Notifications §  Android’s great notifications, improved §  Dismiss individually §  Customizable –  Larger icon –  Actionable buttons 6
  • 7. Q3 2011 Action Bar Navigation Custom Action App Icon View Items 7
  • 8. Q3 2011 Action Bar (Action Items) §  Menu items from Options Menu §  Easily configured via menu resource file <item android:id="@+id/menu_add"
    android:icon="@drawable/ic_menu_save"
    android:title="@string/menu_save"
    android:showAsAction="ifRoom|withText" />! 8
  • 9. Q3 2011 Action Bar (Action Items) public boolean onCreateOptionsMenu(Menu menu) {! MenuInflater inflater = getActivity().getMenuInflater();! inflater.inflate(R.menu.my_menu, menu);! return true;! }! public boolean onOptionsItemSelected(MenuItem item) {! switch (item.getItemId()) {! case android.R.id.home:! // app icon in Action Bar clicked; go home! return true;! case R.id.my_menu_item:! // app menu item selected! return true;! default:! return super.onOptionsItemSelected(item);! }! }! 9
  • 10. Q3 2011 Redesigned Home Screen Widgets §  Users can interact with home screen widgets in new ways like flipping and scrolling §  New widgets: ListView, GridView, StackView… §  Resizable (from 3.1) 10
  • 11. Q3 2011 Fragments Phone Tablet Activity 1 Activity Fragment Fragment 2 1 2 Activity Fragment Re-think your UI, don’t just let it stretch! 11
  • 13. Q3 2011 Fragments – Lifecycle 13
  • 14. Q3 2011 Fragments – Other Uses §  Award for best named method: –  onRetainNonConfigurationInstance()! §  Instead use: –  setRetainInstance(true)! §  Fragments without UI –  Retain state through configuration changes –  Use in conjunction with AsyncTask 14
  • 15. Q3 2011 Fragments – Summary §  Reusable UI components within an Activity §  Has its own lifecycle and back stack. Its lifecycle is affected by the host Activity’s lifecycle §  Attach to a ViewGroup in the Activity view hierarchy through <fragment> in XML or programmatically §  Act as a background worker (findFragmentByTag) §  Can be added, removed and replaced via FragmentTransaction! §  Can communicate with each other via FragmentManager! 15
  • 16. Q3 2011 Fragments Example // Get FragmentManager! FragmentManager fragmentManager = getFragmentManager();! ! // Create new fragment and transaction! Fragment newFragment = new ExampleFragment();! ! FragmentTransaction transaction =! fragmentManager.beginTransaction();! ! // Replace view and add to back stack! transaction.replace(R.id.fragment_container, newFragment);! transaction.addToBackStack(null);! ! // Commit! transaction.commit();! 16
  • 17. Q3 2011 Loaders §  Easy way to asynchronously load data in an Activity or Fragment §  Monitors data source and deliver results when content changes §  Automatically reconnect after configuration change 17
  • 18. Q3 2011 CursorLoader Example §  Implement LoaderManager.LoaderCallbacks! public Loader<Cursor> onCreateLoader(int id, Bundle args) {! ...! return new CursorLoader(! getActivity(), mUri, mProjection,! mSelection, mSelectionArgs, mSortOrder)! }! ! public void onLoadFinished(Loader<Cursor> loader,! Cursor data) {! mAdapter.swapCursor(data);! }! ! public void onLoaderReset(Loader<Cursor> loader) {! mAdapter.swapCursor(null);! }! 18
  • 19. Q3 2011 CursorLoader Example §  Init loader in onCreate()! SimpleCursorAdapter mAdapter;! ! public void onActivityCreated(Bundle savedInstanceState) {! ...! mAdapter = new SimpleCursorAdapter(...);! setListAdapter(mAdapter);! getLoaderManager().initLoader(0, null, this);! }! 19
  • 20. Q3 2011 Clipboard Framework – Copy & Paste §  Supports 3 types of content –  Text –  URI –  Intent §  At any time, only one clip on the clipboard §  For each clip (ClipData), it can store multiple items of the same type §  You decide what MIME types can be handled by your app 20
  • 21. Q3 2011 Drag and Drop §  A drag begins by calling view.startDrag(dragData, shadow, null, 0);! §  To accept a drop implement View.OnDragListener! §  Use ClipData to store “drag” data 21
  • 22. Q3 2011 Hardware Acceleration §  Speed up standard widgets, drawables – all drawing operations on View’s Canvas §  Can be set at the Activity, Window and View levels §  Default is disabled <application android:hardwareAccelerated=“true”>! …        ! </application>! 22
  • 23. Q3 2011 Renderscript §  High performance 3D rendering and compute API §  Written in C99 (a dialect of C) §  Pros: portability, performance, usability §  Cons: new APIs, debugging, fewer features (compared to OpenGL) 23
  • 24. Q3 2011 Renderscript – Sample Apps Google Books YouTube 24
  • 25. Q3 2011 Property Animation Framework §  New animation system that can animate any object’s properties §  Changes objects and their behavior as well §  Can animate changes to a ViewGroup! §  ViewPropertyAnimator (3.1+) makes animations even simpler and more efficient 25
  • 26. Q3 2011 Property Animation Framework §  Simple property animation: ObjectAnimator.ofFloat(myView, "alpha", 0f)! .setDuration(500)
 .start();! §  Even better using ViewPropertyAnimator: myView.animate().setDuration(500).alpha(0);! 26
  • 27. Q3 2011 Enterprise §  Support for encrypted storage §  New device administration policy support –  Encrypted storage –  Password expiration –  Password history –  Password complex character required 27
  • 28. Q3 2011 Media – Updates from Android 3.0, 3.1, 3.2 §  HTTP Live Streaming §  Pluggable DRM framework §  Inline playback of HTML5 <video>! §  MTP/PTP §  RTP §  Updated Media Formats –  Raw ADTS AAC, FLAC… 28
  • 29. Q3 2011 Your App & Honeycomb
  • 30. Q3 2011 Design With Tablets in Mind §  Use density independent pixels (dp) §  Design flexible layouts §  Centralize dimensions using dimens.xml! §  Keep application logic and UI separate §  Support landscape and don’t assume portrait 30
  • 31. Q3 2011 Updating Your App for Honeycomb §  Test holographic theme §  Update for ActionBar §  Add higher resolution graphics §  Tweak layouts, spacing, font sizes §  Fragments <manifest ... >! <uses-sdk android:minSdkVersion="4" ! android:targetSdkVersion="11" />! </manifest>! 31
  • 32. Q3 2011 Compatibility Library §  Not really a compatibility library anymore, more of a support library §  Works back to API Level 4 (Donut / 1.6) §  Provides: –  Fragments –  Loaders –  ViewPager / PagerAdapter - neat! –  LruCache –  and more… 32
  • 33. Q3 2011 Screen Size Support – Updated in 3.2 §  Screen compatibility mode §  Optimizations for a wider range of tablets §  New numeric selectors –  smallestWidth (res/layout-sw720dp) –  width (res/layout-w600dp) –  height (res/layout-h720dp) 33
  • 34. Q3 2011 Looking Forward §  Ice Cream Sandwich – very tasty dessert 34
  • 35. Q3 2011 For more, visit developer.android.com
  • 36. Q3 2011 Copyrights and trademarks §  Android, Google are registered trademarks of Google Inc. §  All other trademarks and copyrights are the property of their respective owners. 36