SlideShare a Scribd company logo
Robert Cooper
Reach Health
   Tablet-specific version of Android
       New UI Metaphors
       New LaF (Holographic)
       New/Improved APIs.
       Old APIs made optional (telephony, etc)
       New Technologies
   Basis for future releases
     3.1 seems to be on-deck
     Merged with phone branch?
   Hopefully everything, at least briefly.
   Detailed discussion of the things I just you
    are most likely to care about as a
    developer :P
   ActionBar
     Used for “App Global” Tabs
     Special MenuItems or SubMenus
     App Icon with a “Logical Home” operation
   No Hard Buttons
     NotificationBar now includes “Back”, “Home”
     and “Tasks”
   Long-Touch context menus deprecated as
    a model
Android 3
   Holographic look and feel added
   Make it more TRON-ish…
   … but not too TRON-ish
   Lots of glows, varied depth line
    markers, 3D transitions
   Improved text ops mechanics
Android 3
Android 3
Android 3
   Fragments
     Sub-Activities
   Loaders
     Async-Friendly Content Fetchers
   ActionBar
     New Menuing and Nav System.
   Enhanced Interaction for Widgets and
    Notifications
   Drag and Drop
   Fragments
     Fragments are Sub-Activities that can be
      recomposed based on UI factors (screen
      size, orientation, etc)
     Part of 3.0, but available as a build-in backport
      as far back as 1.6 with the “Android
      Compatibility Package” (Available in the
      SDK/AVD Manager)
   Fragments mimic Activity lifecycle:
     onCreate()
     onStart()
     onCreateView()*
     onPause()
     onStop()
   Fragments laid out as part of Layouts
<?xml version="1.0" encoding="utf-8"?>
   <LinearLayout
   xmlns:android="http://schemas.android.com/apk/res/android"
       android:orientation="horizontal"
       android:layout_width="match_parent"
       android:layout_height="match_parent">
       <fragment android:name="com.example.news.ArticleListFragment"
               android:id="@+id/list"
               android:layout_weight="1"
               android:layout_width="0dp"
               android:layout_height="match_parent" />
       <fragment
   android:name="com.example.news.ArticleReaderFragment"
               android:id="@+id/viewer"
               android:layout_weight="2"
               android:layout_width="0dp"
               android:layout_height="match_parent" />
   </LinearLayout>
   Each Fragment becomes unique in the
    application
   Can move between Activities with different
    combinations of Fragments by passing
    Fragment model/URI information using
    the FragmentManager API.
   FragmentTransaction can be used to
    manipulate fragment state and “back”
    behavior
   FragmentTransaction
     Fragment newFragment = new ExampleFragment();
    FragmentTransaction transaction =
    getFragmentManager().beginTransaction();

    transaction.replace(R.id.fragment_container, newFragmen
    t);
    transaction.addToBackStack(null);

    transaction.commit();
   Loaders provide a standard way to load
    data for Fragments
   AsyncTaskLoader provides API for loading
    data asynchronously
   CursorLoader loads a paged dataset
    asynchronously – this is likely what you
    want to read, for example, an Atom Pub
    Proto data source remotely.
   Moving MenuItems to the ActionBar

<?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>
   Custom Views in ActionBar
<?xml version="1.0" encoding="utf-8"?>
  <menu
  xmlns:android="http://schemas.android.com/apk/res/andro
  id">
      <item android:id="@+id/menu_search"
          android:title="Search"
          android:icon="@drawable/ic_menu_search"
          android:showAsAction="ifRoom"
      android:actionLayout="@layout/searchview"
      android:actionViewClass="android.widget.SearchView"

              />
    </menu>
   Custom Views in ActionBar (cont)

SearchView searchView = (SearchView)
  menu.findItem(R.id.menu_search).getActionView
  ();
   Navigation
     Big win over iOS!
   Implicit “Home” widget (vs iOS Nav Bar)
   App Global Tabs (vs iOS Tool Bar)
   App List Navigation
   Getting the “Home” icon view
View home = a.findViewById(android.R.id.home);
home.setOnClickListener(new OnClickListener() {
      public void onClick(View arg0) {
         a.finish();
      }
});
   Adding “Up” marker
ActionBar actionBar = this.getActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
   ActionBar Tabs
    final ActionBar actionBar = getActionBar();
    actionBar.setNavigationMode(
           ActionBar.NAVIGATION_MODE_TABS);
    // remove the activity title to make space for tabs
    actionBar.setDisplayShowTitleEnabled(false);
    Fragment artistsFragment = new ArtistsFragment();
    actionBar.addTab(actionBar.newTab()
         .setText(R.string.tab_artists)
        .setTabListener(new TabListener(artistsFragment)));
    Fragment albumsFragment = new AlbumsFragment();
    actionBar.addTab(actionBar.newTab()
         .setText(R.string.tab_albums)
         .setTabListener(new TabListener(albumsFragment)));
   ActionBar List (Spinner) Navigation
    ActionBar actionBar = getActionBar();
    actionBar.setNavigationMode(
             ActionBar.NAVIGATION_MODE_LIST);
    actionBar.setListNavigationCallbacks(
       new SpinnerAdapter(){
          public View getDropDownView(int position,
              View convertView, View Group parent){
              // …
          }

    }, new OnNavigationListener(){
          public boolean onNavigationItemSelected(
              int itemPosition, long itemId){
            //…
          }
    });
   Notifications can now use RemoteViews to
    allow interaction with the popup notification,
    rather than just launch an intent.
    RemoteViews layout = new RemoteViews(
       getPackageName(), R.layout.notification);

    notification.contentView = layout;

    layout.setOnClickPendingIntent(
      R.id.my_button,
     getDialogPendingIntent(
      "You pressed it!"));
PendingIntent getDialogPendingIntent(
     String dialogText) {
          return PendingIntent.getActivity(
                  this, // send back to the creating Act.
                  dialogText.hashCode(),
                  new Intent(ACTION_DIALOG)
                          .putExtra(Intent.EXTRA_TEXT,
                                     dialogText)
                          .addFlags(
                           Intent.FLAG_ACTIVITY_NEW_TASK),
                  0);
      }
Handling the PendingIntent:

 if (ACTION_DIALOG.equals(intent.getAction())) {
               showDialog(
                    intent.getStringExtra(
                             Intent.EXTRA_TEXT))
 }



PendingIntent then becomes an invisible
 call back into your Activity.
   Any View can now be dragged about the
    screen.
   To begin a drag action call:
    myView.startDrag(
    dragData, dragShadowBuilder, localData,
     0 /*unused int flags */);
   Can be called from you
    OnClick/OnLongClick listeners…
   localData is just any Object that will be
    sent with each DragEvent.
   dragData: is a ClipData object. This
    contains the data representation of what is
    being dragged:
    ClipData.Item item =
               new ClipData.Item(v.getTag());
     ClipData dragData = new ClipData(v.getTag(),
               ClipData.MIMETYPE_TEXT_PLAIN,item);


Be sure to use the “tag” property for your
 model data!
 Create the DrawShadowBuilder. This returns the
  view that is dragged about under the pointer.
 This class takes a View as an argument and
  looks a lot like the stock View paint lifecycle.
    @Override
    public void onProvideShadowMetrics (Point
    size, Point touch)
    @Override
    public void onDrawShadow(Canvas canvas)
 The first method sets the bounds, the second
  paints to the canvas.
 You can use the View’s existing draw() method
  then mutate it
   DragEvents
     onDragEvent(DragEvent) or
     View.OnDragListener on any view (These are
     really for Drop Targets)
   DragEvent.getAction() returns one of the
    possible event action types.
   ACTION_DRAG_STARTED
     Sent to all active Views – check here for drop target
      validity!
   ACTION_DRAG_ENTERED
     Sent when the touch enters the box of the View
   ACTION_DRAG_LOCATION
     Sent on each move while in the box of the View
   ACTION_DRAG_EXITED
     Sent when the touch leaves the box.
   ACTION_DROP
     Sent on drop event *ONLY* when the View/Listener
      returned “true” from the ACTION_DRAG_STARTED
      event.
   Support for Hardware Accelerated Graphics
       Applies to stock animations and drawing APIs
       Comes damned near for free but…
       … if you haven’t tested it, it doesn’t work.
       Romain Guy eats his words! :P
   Property animation
   RenderScript
     A C99-ish script for doing OpenGL ops
     Should be like falling off a log for people with
        OpenCL experience (read: not me)
   Activation/Deactivation
     Step 1: Add…
    android:hardwareAccelerated="true|false“
    …to your <application> or <activity>
     Step 2: Profit!
   Looks a whole lot like every other
    reflective animator (Swing-X, Gwittir, Moo
    Tools, etc)
   Lots of possible options, but easily
    summarized:
    ObjectAnimator anim = ObjectAnimator.ofFloat(
      someObject, “someProperty", startValue, endValue);
    anim.setInterpolater( someInterpolater );
    anim.setDuration(1000);
    anim.start();
   Lots of stock interpolators (mutation
    strategies)
     AccelerateDecelerateInterpolator : Sinoidal
     AccelerateInterpolator : Geometric
     AnticipateInterpolator : Start backwards, then fling
      forward
     BounceInterpolator : Bounces around the end
      value
     Linear Interpolator : Even steps
     “And many, many more!”
   Not even going to get into this. Example from Google:
    #pragma version(1)
    #pragma rs java_package_name(com.android.example.hellocompute)
    rs_allocation gIn;
    rs_allocation gOut;
    rs_script gScript;
    const static float3 gMonoMult = {0.299f, 0.587f, 0.114f};
    void root(const uchar4 *v_in, uchar4 *v_out, const void
    *usrData, uint32_t x, uint32_t y) {
        float4 f4 = rsUnpackColor8888(*v_in);
        float3 mono = dot(f4.rgb, gMonoMult);
        *v_out = rsPackColorTo8888(mono);
    }
    void filter() {
        rsForEach(gScript, gIn, gOut, 0);
    }
   DownloadManager API is VASTLY
    improved over the Gingerbread version!
     It is actually usable now!
   HTTP Live Streaming support
   Improved SIP API over Gingerbread.
   Accessibility improvements
   Still questions about what API 12 will mean
     ActionBar/New Notifications on Phones? Is that a
      good idea?
     Keeping phones with the current menu strategy?
     How to detect “Tablet-y” systems?
   Google TV?
   Lots and Lots of “Reflectively constructed
    strategies” – I it is manageable, but getting
    harder to support older devices

More Related Content

What's hot

Android dev toolbox
Android dev toolboxAndroid dev toolbox
Android dev toolbox
Shem Magnezi
 
Material Design and Backwards Compatibility
Material Design and Backwards CompatibilityMaterial Design and Backwards Compatibility
Material Design and Backwards Compatibility
Angelo Rüggeberg
 
Android basic 4 Navigation Drawer
Android basic 4 Navigation DrawerAndroid basic 4 Navigation Drawer
Android basic 4 Navigation Drawer
Eakapong Kattiya
 
Android Sliding Menu dengan Navigation Drawer
Android Sliding Menu dengan Navigation DrawerAndroid Sliding Menu dengan Navigation Drawer
Android Sliding Menu dengan Navigation Drawer
Agus Haryanto
 
Andriod dev toolbox part 2
Andriod dev toolbox  part 2Andriod dev toolbox  part 2
Andriod dev toolbox part 2
Shem Magnezi
 
Eclipse Tricks
Eclipse TricksEclipse Tricks
Eclipse Tricks
Kaniska Mandal
 
Android basic 3 Dialogs
Android basic 3 DialogsAndroid basic 3 Dialogs
Android basic 3 Dialogs
Eakapong Kattiya
 
Android UI Reference
Android UI ReferenceAndroid UI Reference
Android UI Reference
GauntFace
 
Android basic 2 UI Design
Android basic 2 UI DesignAndroid basic 2 UI Design
Android basic 2 UI Design
Eakapong Kattiya
 
STYLISH FLOOR
STYLISH FLOORSTYLISH FLOOR
STYLISH FLOOR
ABU HASAN
 
Design Patterns for Tablets and Smartphones
Design Patterns for Tablets and SmartphonesDesign Patterns for Tablets and Smartphones
Design Patterns for Tablets and Smartphones
Michael Galpin
 
Quick Intro to Android Development
Quick Intro to Android DevelopmentQuick Intro to Android Development
Quick Intro to Android Development
Jussi Pohjolainen
 
Intro to Google TV
Intro to Google TVIntro to Google TV
Intro to Google TV
GauntFace
 
Android app material design from dev's perspective
Android app material design from dev's perspectiveAndroid app material design from dev's perspective
Android app material design from dev's perspective
DeSmart Agile Software House
 
Android Testing
Android TestingAndroid Testing
Android Testing
Evan Lin
 
A comprehensive guide on developing responsive and common react filter component
A comprehensive guide on developing responsive and common react filter componentA comprehensive guide on developing responsive and common react filter component
A comprehensive guide on developing responsive and common react filter component
Katy Slemon
 
Capture image on eye blink
Capture image on eye blinkCapture image on eye blink
Capture image on eye blink
InnovationM
 
Session 2- day 3
Session 2- day 3Session 2- day 3
Session 2- day 3
Vivek Bhusal
 
Android Accessibility
Android AccessibilityAndroid Accessibility
Android Accessibility
Ascii Huang
 
Day seven
Day sevenDay seven
Day seven
Vivek Bhusal
 

What's hot (20)

Android dev toolbox
Android dev toolboxAndroid dev toolbox
Android dev toolbox
 
Material Design and Backwards Compatibility
Material Design and Backwards CompatibilityMaterial Design and Backwards Compatibility
Material Design and Backwards Compatibility
 
Android basic 4 Navigation Drawer
Android basic 4 Navigation DrawerAndroid basic 4 Navigation Drawer
Android basic 4 Navigation Drawer
 
Android Sliding Menu dengan Navigation Drawer
Android Sliding Menu dengan Navigation DrawerAndroid Sliding Menu dengan Navigation Drawer
Android Sliding Menu dengan Navigation Drawer
 
Andriod dev toolbox part 2
Andriod dev toolbox  part 2Andriod dev toolbox  part 2
Andriod dev toolbox part 2
 
Eclipse Tricks
Eclipse TricksEclipse Tricks
Eclipse Tricks
 
Android basic 3 Dialogs
Android basic 3 DialogsAndroid basic 3 Dialogs
Android basic 3 Dialogs
 
Android UI Reference
Android UI ReferenceAndroid UI Reference
Android UI Reference
 
Android basic 2 UI Design
Android basic 2 UI DesignAndroid basic 2 UI Design
Android basic 2 UI Design
 
STYLISH FLOOR
STYLISH FLOORSTYLISH FLOOR
STYLISH FLOOR
 
Design Patterns for Tablets and Smartphones
Design Patterns for Tablets and SmartphonesDesign Patterns for Tablets and Smartphones
Design Patterns for Tablets and Smartphones
 
Quick Intro to Android Development
Quick Intro to Android DevelopmentQuick Intro to Android Development
Quick Intro to Android Development
 
Intro to Google TV
Intro to Google TVIntro to Google TV
Intro to Google TV
 
Android app material design from dev's perspective
Android app material design from dev's perspectiveAndroid app material design from dev's perspective
Android app material design from dev's perspective
 
Android Testing
Android TestingAndroid Testing
Android Testing
 
A comprehensive guide on developing responsive and common react filter component
A comprehensive guide on developing responsive and common react filter componentA comprehensive guide on developing responsive and common react filter component
A comprehensive guide on developing responsive and common react filter component
 
Capture image on eye blink
Capture image on eye blinkCapture image on eye blink
Capture image on eye blink
 
Session 2- day 3
Session 2- day 3Session 2- day 3
Session 2- day 3
 
Android Accessibility
Android AccessibilityAndroid Accessibility
Android Accessibility
 
Day seven
Day sevenDay seven
Day seven
 

Viewers also liked

Improved tablet production
Improved tablet productionImproved tablet production
Improved tablet production
ceutics1315
 
What's new in android M(6.0)
What's new in android M(6.0)What's new in android M(6.0)
What's new in android M(6.0)
Yonatan Levin
 
Android M: Top Features That You Need To Know
Android M: Top Features That You Need To KnowAndroid M: Top Features That You Need To Know
Android M: Top Features That You Need To Know
360 Degree Technosoft
 
Granulation ppt.
Granulation ppt.Granulation ppt.
Granulation ppt.
Namdeo Shinde
 
tablet presentation
tablet presentationtablet presentation
tablet presentation
Anju K John
 
Apple presentation final ppt
Apple presentation final pptApple presentation final ppt
Apple presentation final ppt
glowe123
 
Apple presentation.ppt
Apple presentation.pptApple presentation.ppt
Apple presentation.ppt
Rakesh Kumar
 
Presentation On Apple INC
Presentation On Apple INCPresentation On Apple INC
Presentation On Apple INC
Husnain Shah
 
Apple Inc Presentatioin
Apple Inc PresentatioinApple Inc Presentatioin
Apple Inc Presentatioin
2AM
 

Viewers also liked (9)

Improved tablet production
Improved tablet productionImproved tablet production
Improved tablet production
 
What's new in android M(6.0)
What's new in android M(6.0)What's new in android M(6.0)
What's new in android M(6.0)
 
Android M: Top Features That You Need To Know
Android M: Top Features That You Need To KnowAndroid M: Top Features That You Need To Know
Android M: Top Features That You Need To Know
 
Granulation ppt.
Granulation ppt.Granulation ppt.
Granulation ppt.
 
tablet presentation
tablet presentationtablet presentation
tablet presentation
 
Apple presentation final ppt
Apple presentation final pptApple presentation final ppt
Apple presentation final ppt
 
Apple presentation.ppt
Apple presentation.pptApple presentation.ppt
Apple presentation.ppt
 
Presentation On Apple INC
Presentation On Apple INCPresentation On Apple INC
Presentation On Apple INC
 
Apple Inc Presentatioin
Apple Inc PresentatioinApple Inc Presentatioin
Apple Inc Presentatioin
 

Similar to Android 3

Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best Practices
Yekmer Simsek
 
Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recievers
Utkarsh Mankad
 
04 activities - Android
04   activities - Android04   activities - Android
04 activities - Android
Wingston
 
Android apps development
Android apps developmentAndroid apps development
Android apps development
Monir Zzaman
 
Android
AndroidAndroid
Android
Pranav Ashok
 
Improving android experience for both users and developers
Improving android experience for both users and developersImproving android experience for both users and developers
Improving android experience for both users and developers
Pavel Lahoda
 
Droidcon2013 android experience lahoda
Droidcon2013 android experience lahodaDroidcon2013 android experience lahoda
Droidcon2013 android experience lahoda
Droidcon Berlin
 
Android best practices
Android best practicesAndroid best practices
Android best practices
Jose Manuel Ortega Candel
 
Android por onde começar? Mini Curso Erbase 2015
Android por onde começar? Mini Curso Erbase 2015 Android por onde começar? Mini Curso Erbase 2015
Android por onde começar? Mini Curso Erbase 2015
Mario Jorge Pereira
 
Day 5
Day 5Day 5
How to become an Android dev starting from iOS (and vice versa)
How to become an Android dev starting from iOS (and vice versa)How to become an Android dev starting from iOS (and vice versa)
How to become an Android dev starting from iOS (and vice versa)
Giuseppe Filograno
 
Android app development basics
Android app development basicsAndroid app development basics
Android app development basics
Anton Narusberg
 
What's new in android: jetpack compose 2024
What's new in android: jetpack compose 2024What's new in android: jetpack compose 2024
What's new in android: jetpack compose 2024
Toru Wonyoung Choi
 
Getting Started With Material Design
Getting Started With Material DesignGetting Started With Material Design
Getting Started With Material Design
Yasin Yildirim
 
Introduction toandroid
Introduction toandroidIntroduction toandroid
Introduction toandroid
Google Developer Group Bucharest
 
Android App Dev Manual-1.doc
Android App Dev Manual-1.docAndroid App Dev Manual-1.doc
Android App Dev Manual-1.doc
SriKGangadharRaoAssi
 
Workshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideWorkshop 26: React Native - The Native Side
Workshop 26: React Native - The Native Side
Visual Engineering
 
mobl
moblmobl
mobl
zefhemel
 
07_UIAndroid.pdf
07_UIAndroid.pdf07_UIAndroid.pdf
07_UIAndroid.pdf
ImranS18
 
Designing Apps for the Motorola XOOM
Designing Apps for the Motorola XOOM Designing Apps for the Motorola XOOM
Designing Apps for the Motorola XOOM
Motorola Mobility - MOTODEV
 

Similar to Android 3 (20)

Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best Practices
 
Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recievers
 
04 activities - Android
04   activities - Android04   activities - Android
04 activities - Android
 
Android apps development
Android apps developmentAndroid apps development
Android apps development
 
Android
AndroidAndroid
Android
 
Improving android experience for both users and developers
Improving android experience for both users and developersImproving android experience for both users and developers
Improving android experience for both users and developers
 
Droidcon2013 android experience lahoda
Droidcon2013 android experience lahodaDroidcon2013 android experience lahoda
Droidcon2013 android experience lahoda
 
Android best practices
Android best practicesAndroid best practices
Android best practices
 
Android por onde começar? Mini Curso Erbase 2015
Android por onde começar? Mini Curso Erbase 2015 Android por onde começar? Mini Curso Erbase 2015
Android por onde começar? Mini Curso Erbase 2015
 
Day 5
Day 5Day 5
Day 5
 
How to become an Android dev starting from iOS (and vice versa)
How to become an Android dev starting from iOS (and vice versa)How to become an Android dev starting from iOS (and vice versa)
How to become an Android dev starting from iOS (and vice versa)
 
Android app development basics
Android app development basicsAndroid app development basics
Android app development basics
 
What's new in android: jetpack compose 2024
What's new in android: jetpack compose 2024What's new in android: jetpack compose 2024
What's new in android: jetpack compose 2024
 
Getting Started With Material Design
Getting Started With Material DesignGetting Started With Material Design
Getting Started With Material Design
 
Introduction toandroid
Introduction toandroidIntroduction toandroid
Introduction toandroid
 
Android App Dev Manual-1.doc
Android App Dev Manual-1.docAndroid App Dev Manual-1.doc
Android App Dev Manual-1.doc
 
Workshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideWorkshop 26: React Native - The Native Side
Workshop 26: React Native - The Native Side
 
mobl
moblmobl
mobl
 
07_UIAndroid.pdf
07_UIAndroid.pdf07_UIAndroid.pdf
07_UIAndroid.pdf
 
Designing Apps for the Motorola XOOM
Designing Apps for the Motorola XOOM Designing Apps for the Motorola XOOM
Designing Apps for the Motorola XOOM
 

More from Robert Cooper

GWT is Smarter Than You
GWT is Smarter Than YouGWT is Smarter Than You
GWT is Smarter Than You
Robert Cooper
 
Guice gin
Guice ginGuice gin
Guice gin
Robert Cooper
 
Sapphire Gimlets
Sapphire GimletsSapphire Gimlets
Sapphire Gimlets
Robert Cooper
 
Android Froyo
Android FroyoAndroid Froyo
Android Froyo
Robert Cooper
 
Extreme Source Compatibility
Extreme Source CompatibilityExtreme Source Compatibility
Extreme Source Compatibility
Robert Cooper
 
GWT 2 Is Smarter Than You
GWT 2 Is Smarter Than YouGWT 2 Is Smarter Than You
GWT 2 Is Smarter Than You
Robert Cooper
 

More from Robert Cooper (6)

GWT is Smarter Than You
GWT is Smarter Than YouGWT is Smarter Than You
GWT is Smarter Than You
 
Guice gin
Guice ginGuice gin
Guice gin
 
Sapphire Gimlets
Sapphire GimletsSapphire Gimlets
Sapphire Gimlets
 
Android Froyo
Android FroyoAndroid Froyo
Android Froyo
 
Extreme Source Compatibility
Extreme Source CompatibilityExtreme Source Compatibility
Extreme Source Compatibility
 
GWT 2 Is Smarter Than You
GWT 2 Is Smarter Than YouGWT 2 Is Smarter Than You
GWT 2 Is Smarter Than You
 

Recently uploaded

Semantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software DevelopmentSemantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software Development
Baishakhi Ray
 
Uncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in LibrariesUncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in Libraries
Brian Pichman
 
Integrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecaseIntegrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecase
shyamraj55
 
Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024
Nicolás Lopéz
 
kk vathada _digital transformation frameworks_2024.pdf
kk vathada _digital transformation frameworks_2024.pdfkk vathada _digital transformation frameworks_2024.pdf
kk vathada _digital transformation frameworks_2024.pdf
KIRAN KV
 
Zaitechno Handheld Raman Spectrometer.pdf
Zaitechno Handheld Raman Spectrometer.pdfZaitechno Handheld Raman Spectrometer.pdf
Zaitechno Handheld Raman Spectrometer.pdf
AmandaCheung15
 
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
alexjohnson7307
 
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
bhumivarma35300
 
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptxMAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
janagijoythi
 
The Impact of the Internet of Things (IoT) on Smart Homes and Cities
The Impact of the Internet of Things (IoT) on Smart Homes and CitiesThe Impact of the Internet of Things (IoT) on Smart Homes and Cities
The Impact of the Internet of Things (IoT) on Smart Homes and Cities
Arpan Buwa
 
Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17
Bhajan Mehta
 
It's your unstructured data: How to get your GenAI app to production (and spe...
It's your unstructured data: How to get your GenAI app to production (and spe...It's your unstructured data: How to get your GenAI app to production (and spe...
It's your unstructured data: How to get your GenAI app to production (and spe...
Zilliz
 
Step-By-Step Process to Develop a Mobile App From Scratch
Step-By-Step Process to Develop a Mobile App From ScratchStep-By-Step Process to Develop a Mobile App From Scratch
Step-By-Step Process to Develop a Mobile App From Scratch
softsuave
 
LeadMagnet IQ Review: Unlock the Secret to Effortless Traffic and Leads.pdf
LeadMagnet IQ Review:  Unlock the Secret to Effortless Traffic and Leads.pdfLeadMagnet IQ Review:  Unlock the Secret to Effortless Traffic and Leads.pdf
LeadMagnet IQ Review: Unlock the Secret to Effortless Traffic and Leads.pdf
SelfMade bd
 
Generative AI Reasoning Tech Talk - July 2024
Generative AI Reasoning Tech Talk - July 2024Generative AI Reasoning Tech Talk - July 2024
Generative AI Reasoning Tech Talk - July 2024
siddu769252
 
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
shanihomely
 
Tailored CRM Software Development for Enhanced Customer Insights
Tailored CRM Software Development for Enhanced Customer InsightsTailored CRM Software Development for Enhanced Customer Insights
Tailored CRM Software Development for Enhanced Customer Insights
SynapseIndia
 
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptxUse Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
SynapseIndia
 
Improving Learning Content Efficiency with Reusable Learning Content
Improving Learning Content Efficiency with Reusable Learning ContentImproving Learning Content Efficiency with Reusable Learning Content
Improving Learning Content Efficiency with Reusable Learning Content
Enterprise Knowledge
 
Communications Mining Series - Zero to Hero - Session 3
Communications Mining Series - Zero to Hero - Session 3Communications Mining Series - Zero to Hero - Session 3
Communications Mining Series - Zero to Hero - Session 3
DianaGray10
 

Recently uploaded (20)

Semantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software DevelopmentSemantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software Development
 
Uncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in LibrariesUncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in Libraries
 
Integrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecaseIntegrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecase
 
Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024
 
kk vathada _digital transformation frameworks_2024.pdf
kk vathada _digital transformation frameworks_2024.pdfkk vathada _digital transformation frameworks_2024.pdf
kk vathada _digital transformation frameworks_2024.pdf
 
Zaitechno Handheld Raman Spectrometer.pdf
Zaitechno Handheld Raman Spectrometer.pdfZaitechno Handheld Raman Spectrometer.pdf
Zaitechno Handheld Raman Spectrometer.pdf
 
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
 
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
 
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptxMAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
 
The Impact of the Internet of Things (IoT) on Smart Homes and Cities
The Impact of the Internet of Things (IoT) on Smart Homes and CitiesThe Impact of the Internet of Things (IoT) on Smart Homes and Cities
The Impact of the Internet of Things (IoT) on Smart Homes and Cities
 
Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17
 
It's your unstructured data: How to get your GenAI app to production (and spe...
It's your unstructured data: How to get your GenAI app to production (and spe...It's your unstructured data: How to get your GenAI app to production (and spe...
It's your unstructured data: How to get your GenAI app to production (and spe...
 
Step-By-Step Process to Develop a Mobile App From Scratch
Step-By-Step Process to Develop a Mobile App From ScratchStep-By-Step Process to Develop a Mobile App From Scratch
Step-By-Step Process to Develop a Mobile App From Scratch
 
LeadMagnet IQ Review: Unlock the Secret to Effortless Traffic and Leads.pdf
LeadMagnet IQ Review:  Unlock the Secret to Effortless Traffic and Leads.pdfLeadMagnet IQ Review:  Unlock the Secret to Effortless Traffic and Leads.pdf
LeadMagnet IQ Review: Unlock the Secret to Effortless Traffic and Leads.pdf
 
Generative AI Reasoning Tech Talk - July 2024
Generative AI Reasoning Tech Talk - July 2024Generative AI Reasoning Tech Talk - July 2024
Generative AI Reasoning Tech Talk - July 2024
 
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
 
Tailored CRM Software Development for Enhanced Customer Insights
Tailored CRM Software Development for Enhanced Customer InsightsTailored CRM Software Development for Enhanced Customer Insights
Tailored CRM Software Development for Enhanced Customer Insights
 
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptxUse Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
 
Improving Learning Content Efficiency with Reusable Learning Content
Improving Learning Content Efficiency with Reusable Learning ContentImproving Learning Content Efficiency with Reusable Learning Content
Improving Learning Content Efficiency with Reusable Learning Content
 
Communications Mining Series - Zero to Hero - Session 3
Communications Mining Series - Zero to Hero - Session 3Communications Mining Series - Zero to Hero - Session 3
Communications Mining Series - Zero to Hero - Session 3
 

Android 3

  • 2. Tablet-specific version of Android  New UI Metaphors  New LaF (Holographic)  New/Improved APIs.  Old APIs made optional (telephony, etc)  New Technologies  Basis for future releases  3.1 seems to be on-deck  Merged with phone branch?
  • 3. Hopefully everything, at least briefly.  Detailed discussion of the things I just you are most likely to care about as a developer :P
  • 4. ActionBar  Used for “App Global” Tabs  Special MenuItems or SubMenus  App Icon with a “Logical Home” operation  No Hard Buttons  NotificationBar now includes “Back”, “Home” and “Tasks”  Long-Touch context menus deprecated as a model
  • 6. Holographic look and feel added  Make it more TRON-ish…  … but not too TRON-ish  Lots of glows, varied depth line markers, 3D transitions  Improved text ops mechanics
  • 10. Fragments  Sub-Activities  Loaders  Async-Friendly Content Fetchers  ActionBar  New Menuing and Nav System.  Enhanced Interaction for Widgets and Notifications  Drag and Drop
  • 11. Fragments  Fragments are Sub-Activities that can be recomposed based on UI factors (screen size, orientation, etc)  Part of 3.0, but available as a build-in backport as far back as 1.6 with the “Android Compatibility Package” (Available in the SDK/AVD Manager)
  • 12. Fragments mimic Activity lifecycle:  onCreate()  onStart()  onCreateView()*  onPause()  onStop()
  • 13. Fragments laid out as part of Layouts <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="match_parent"> <fragment android:name="com.example.news.ArticleListFragment" android:id="@+id/list" android:layout_weight="1" android:layout_width="0dp" android:layout_height="match_parent" /> <fragment android:name="com.example.news.ArticleReaderFragment" android:id="@+id/viewer" android:layout_weight="2" android:layout_width="0dp" android:layout_height="match_parent" /> </LinearLayout>
  • 14. Each Fragment becomes unique in the application  Can move between Activities with different combinations of Fragments by passing Fragment model/URI information using the FragmentManager API.  FragmentTransaction can be used to manipulate fragment state and “back” behavior
  • 15. FragmentTransaction Fragment newFragment = new ExampleFragment(); FragmentTransaction transaction = getFragmentManager().beginTransaction(); transaction.replace(R.id.fragment_container, newFragmen t); transaction.addToBackStack(null); transaction.commit();
  • 16. Loaders provide a standard way to load data for Fragments  AsyncTaskLoader provides API for loading data asynchronously  CursorLoader loads a paged dataset asynchronously – this is likely what you want to read, for example, an Atom Pub Proto data source remotely.
  • 17. Moving MenuItems to the ActionBar <?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>
  • 18. Custom Views in ActionBar <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/andro id"> <item android:id="@+id/menu_search" android:title="Search" android:icon="@drawable/ic_menu_search" android:showAsAction="ifRoom" android:actionLayout="@layout/searchview" android:actionViewClass="android.widget.SearchView" /> </menu>
  • 19. Custom Views in ActionBar (cont) SearchView searchView = (SearchView) menu.findItem(R.id.menu_search).getActionView ();
  • 20. Navigation  Big win over iOS!  Implicit “Home” widget (vs iOS Nav Bar)  App Global Tabs (vs iOS Tool Bar)  App List Navigation
  • 21. Getting the “Home” icon view View home = a.findViewById(android.R.id.home); home.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { a.finish(); } });  Adding “Up” marker ActionBar actionBar = this.getActionBar(); actionBar.setDisplayHomeAsUpEnabled(true);
  • 22. ActionBar Tabs final ActionBar actionBar = getActionBar(); actionBar.setNavigationMode( ActionBar.NAVIGATION_MODE_TABS); // remove the activity title to make space for tabs actionBar.setDisplayShowTitleEnabled(false); Fragment artistsFragment = new ArtistsFragment(); actionBar.addTab(actionBar.newTab() .setText(R.string.tab_artists) .setTabListener(new TabListener(artistsFragment))); Fragment albumsFragment = new AlbumsFragment(); actionBar.addTab(actionBar.newTab() .setText(R.string.tab_albums) .setTabListener(new TabListener(albumsFragment)));
  • 23. ActionBar List (Spinner) Navigation ActionBar actionBar = getActionBar(); actionBar.setNavigationMode( ActionBar.NAVIGATION_MODE_LIST); actionBar.setListNavigationCallbacks( new SpinnerAdapter(){ public View getDropDownView(int position, View convertView, View Group parent){ // … } }, new OnNavigationListener(){ public boolean onNavigationItemSelected( int itemPosition, long itemId){ //… } });
  • 24. Notifications can now use RemoteViews to allow interaction with the popup notification, rather than just launch an intent. RemoteViews layout = new RemoteViews( getPackageName(), R.layout.notification); notification.contentView = layout; layout.setOnClickPendingIntent( R.id.my_button, getDialogPendingIntent( "You pressed it!"));
  • 25. PendingIntent getDialogPendingIntent( String dialogText) { return PendingIntent.getActivity( this, // send back to the creating Act. dialogText.hashCode(), new Intent(ACTION_DIALOG) .putExtra(Intent.EXTRA_TEXT, dialogText) .addFlags( Intent.FLAG_ACTIVITY_NEW_TASK), 0); }
  • 26. Handling the PendingIntent: if (ACTION_DIALOG.equals(intent.getAction())) { showDialog( intent.getStringExtra( Intent.EXTRA_TEXT)) } PendingIntent then becomes an invisible call back into your Activity.
  • 27. Any View can now be dragged about the screen.  To begin a drag action call: myView.startDrag( dragData, dragShadowBuilder, localData,  0 /*unused int flags */);  Can be called from you OnClick/OnLongClick listeners…  localData is just any Object that will be sent with each DragEvent.
  • 28. dragData: is a ClipData object. This contains the data representation of what is being dragged: ClipData.Item item = new ClipData.Item(v.getTag()); ClipData dragData = new ClipData(v.getTag(), ClipData.MIMETYPE_TEXT_PLAIN,item); Be sure to use the “tag” property for your model data!
  • 29.  Create the DrawShadowBuilder. This returns the view that is dragged about under the pointer.  This class takes a View as an argument and looks a lot like the stock View paint lifecycle. @Override public void onProvideShadowMetrics (Point size, Point touch) @Override public void onDrawShadow(Canvas canvas)  The first method sets the bounds, the second paints to the canvas.  You can use the View’s existing draw() method then mutate it
  • 30. DragEvents  onDragEvent(DragEvent) or View.OnDragListener on any view (These are really for Drop Targets)  DragEvent.getAction() returns one of the possible event action types.
  • 31. ACTION_DRAG_STARTED  Sent to all active Views – check here for drop target validity!  ACTION_DRAG_ENTERED  Sent when the touch enters the box of the View  ACTION_DRAG_LOCATION  Sent on each move while in the box of the View  ACTION_DRAG_EXITED  Sent when the touch leaves the box.  ACTION_DROP  Sent on drop event *ONLY* when the View/Listener returned “true” from the ACTION_DRAG_STARTED event.
  • 32. Support for Hardware Accelerated Graphics  Applies to stock animations and drawing APIs  Comes damned near for free but…  … if you haven’t tested it, it doesn’t work.  Romain Guy eats his words! :P  Property animation  RenderScript  A C99-ish script for doing OpenGL ops  Should be like falling off a log for people with OpenCL experience (read: not me)
  • 33. Activation/Deactivation  Step 1: Add… android:hardwareAccelerated="true|false“ …to your <application> or <activity>  Step 2: Profit!
  • 34. Looks a whole lot like every other reflective animator (Swing-X, Gwittir, Moo Tools, etc)  Lots of possible options, but easily summarized: ObjectAnimator anim = ObjectAnimator.ofFloat( someObject, “someProperty", startValue, endValue); anim.setInterpolater( someInterpolater ); anim.setDuration(1000); anim.start();
  • 35. Lots of stock interpolators (mutation strategies)  AccelerateDecelerateInterpolator : Sinoidal  AccelerateInterpolator : Geometric  AnticipateInterpolator : Start backwards, then fling forward  BounceInterpolator : Bounces around the end value  Linear Interpolator : Even steps  “And many, many more!”
  • 36. Not even going to get into this. Example from Google: #pragma version(1) #pragma rs java_package_name(com.android.example.hellocompute) rs_allocation gIn; rs_allocation gOut; rs_script gScript; const static float3 gMonoMult = {0.299f, 0.587f, 0.114f}; void root(const uchar4 *v_in, uchar4 *v_out, const void *usrData, uint32_t x, uint32_t y) { float4 f4 = rsUnpackColor8888(*v_in); float3 mono = dot(f4.rgb, gMonoMult); *v_out = rsPackColorTo8888(mono); } void filter() { rsForEach(gScript, gIn, gOut, 0); }
  • 37. DownloadManager API is VASTLY improved over the Gingerbread version!  It is actually usable now!  HTTP Live Streaming support  Improved SIP API over Gingerbread.  Accessibility improvements
  • 38. Still questions about what API 12 will mean  ActionBar/New Notifications on Phones? Is that a good idea?  Keeping phones with the current menu strategy?  How to detect “Tablet-y” systems?  Google TV?  Lots and Lots of “Reflectively constructed strategies” – I it is manageable, but getting harder to support older devices