DO NOT MERGE. Integrate support work from master.
First submit of FragmentPager class.
This provides an easy way to build a UI where the user can
swipe left or right through its elements. The elements are
implemented as fragments, and the class takes care of managing
those fragments as the user navigates through it.
This implementation also introduces a new FragmentManager
concept of a "detached" fragment -- basically a way for you
to put a fragment in the same state as when it is on the
back stack, where the framework is managing its current state
but it is no longer actively running.
Also required the introduction of new compatibility code for
MotionEvent and VelocityTracker for accessing multi-touch data.
Tweak view save/restore state so it will play well with list views.
We need to restore the state *after* the adapter has been set;
setting the adapter clears the state. To do this, we move the
state restore from immediately after the view is created to after
we call Fragment.onActivityAttached().
Also introduced a new Fragment.onViewCreated() callback which is
nice for fragments that want to do some setup after onCreateView()
but allow for subclasses to override that method. (ListFragment
I'm looking at you.)
diff --git a/v4/Android.mk b/v4/Android.mk
index c65ca42..c6c1d82 100644
--- a/v4/Android.mk
+++ b/v4/Android.mk
@@ -17,6 +17,24 @@
# Note: the source code is in java/, not src/, because this code is also part of
# the framework library, and build/core/pathmap.mk expects a java/ subdirectory.
+# A helper sub-library that makes direct use of Eclair APIs.
+include $(CLEAR_VARS)
+LOCAL_MODULE := android-support-v4-eclair
+LOCAL_SDK_VERSION := 5
+LOCAL_SRC_FILES := $(call all-java-files-under, eclair)
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+# -----------------------------------------------------------------------
+
+# A helper sub-library that makes direct use of Froyo APIs.
+include $(CLEAR_VARS)
+LOCAL_MODULE := android-support-v4-froyo
+LOCAL_SDK_VERSION := 8
+LOCAL_SRC_FILES := $(call all-java-files-under, froyo)
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+# -----------------------------------------------------------------------
+
# A helper sub-library that makes direct use of Honeycomb APIs.
include $(CLEAR_VARS)
LOCAL_MODULE := android-support-v4-honeycomb
@@ -31,7 +49,10 @@
LOCAL_MODULE := android-support-v4
LOCAL_SDK_VERSION := 4
LOCAL_SRC_FILES := $(call all-java-files-under, java)
-LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4-honeycomb
+LOCAL_STATIC_JAVA_LIBRARIES += \
+ android-support-v4-eclair \
+ android-support-v4-froyo \
+ android-support-v4-honeycomb
include $(BUILD_STATIC_JAVA_LIBRARY)
# Include this library in the build server's output directory