API version notes

From Android Wiki

Revision as of 08:37, 31 January 2013 by Ldo (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, searcha

The online Android API reference pages only document the latest version of the Android API. In some cases, this will mislead you into how to do things to work with older versions of Android. Instances of such should be documented on this page as we find them.

Animation Interpolators

Classes like AccelerateDecelerateInterpolator etc are shown as inheriting from TimeInterpolator. However, in pre-Honeycomb, they actually inherit from Interpolator, and the getInterpolation method is directly defined in that interface, not inherited from TimeInterpolator (which doesn’t exist pre-Honeycomb).

SurfaceHolder Types

In SurfaceHolder, all the SURFACE_TYPE_xxx constants are currently marked “deprecated” and “this value is set automatically when needed”. In fact you do need to set type SURFACE_TYPE_PUSH_BUFFERS for camera preview surfaces, at least on Android 2.2.

Clipboard Handling

Thankfully this has been fixed. The ClipboardManager class restores the documentation for the pre-Honeycomb API.

Personal tools