Merge "Make sure we honor canChildScrollUp()" into mnc-ub-dev
diff --git a/.gitignore b/.gitignore
index c8c3ed8..a72b3dc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,5 @@
 project.properties
 **/bin
 **/gen
+*.iml
+**/out
diff --git a/design/src/android/support/design/widget/TextInputLayout.java b/design/src/android/support/design/widget/TextInputLayout.java
index b583945..318ca6d 100644
--- a/design/src/android/support/design/widget/TextInputLayout.java
+++ b/design/src/android/support/design/widget/TextInputLayout.java
@@ -71,6 +71,7 @@
     private Paint mTmpPaint;
 
     private LinearLayout mIndicatorArea;
+    private int mIndicatorsAdded;
 
     private boolean mErrorEnabled;
     private TextView mErrorView;
@@ -421,6 +422,7 @@
         }
         mIndicatorArea.setVisibility(View.VISIBLE);
         mIndicatorArea.addView(indicator, index);
+        mIndicatorsAdded++;
     }
 
     private void adjustIndicatorPadding() {
@@ -432,7 +434,7 @@
     private void removeIndicator(TextView indicator) {
         if (mIndicatorArea != null) {
             mIndicatorArea.removeView(indicator);
-            if (mIndicatorArea.getChildCount() == 0) {
+            if (--mIndicatorsAdded == 0) {
                 mIndicatorArea.setVisibility(View.GONE);
             }
         }
diff --git a/design/src/android/support/design/widget/ViewOffsetHelper.java b/design/src/android/support/design/widget/ViewOffsetHelper.java
index a76ca9a..1254f17 100644
--- a/design/src/android/support/design/widget/ViewOffsetHelper.java
+++ b/design/src/android/support/design/widget/ViewOffsetHelper.java
@@ -66,9 +66,9 @@
     }
 
     private static void tickleInvalidationFlag(View view) {
-        final float x = ViewCompat.getTranslationX(view);
-        ViewCompat.setTranslationY(view, x + 1);
-        ViewCompat.setTranslationY(view, x);
+        final float y = ViewCompat.getTranslationY(view);
+        ViewCompat.setTranslationY(view, y + 1);
+        ViewCompat.setTranslationY(view, y);
     }
 
     /**
diff --git a/graphics/drawable/Android.mk b/graphics/drawable/Android.mk
index 63e93b7..06d8d6f 100644
--- a/graphics/drawable/Android.mk
+++ b/graphics/drawable/Android.mk
@@ -17,8 +17,8 @@
 #static vector drawable library
 include $(CLEAR_VARS)
 LOCAL_MODULE := android-support-v7-vectordrawable
-LOCAL_SDK_VERSION := 7
-LOCAL_SRC_FILES := $(call all-java-files-under, static)
+LOCAL_SDK_VERSION := current
+LOCAL_SRC_FILES := $(call all-java-files-under, static util)
 
 LOCAL_JAVA_LIBRARIES := android-support-v4
 
@@ -29,8 +29,8 @@
 #Animated vector drawable library
 include $(CLEAR_VARS)
 LOCAL_MODULE := android-support-v11-animatedvectordrawable
-LOCAL_SDK_VERSION := 11
-LOCAL_SRC_FILES := $(call all-java-files-under, animated)
+LOCAL_SDK_VERSION := current
+LOCAL_SRC_FILES := $(call all-java-files-under, animated util)
 
 LOCAL_JAVA_LIBRARIES := android-support-v4
 
@@ -38,4 +38,5 @@
 
 LOCAL_STATIC_JAVA_LIBRARIES := android-support-v7-vectordrawable
 
+LOCAL_AAPT_FLAGS := --no-version-vectors
 include $(BUILD_STATIC_JAVA_LIBRARY)
\ No newline at end of file
diff --git a/graphics/drawable/animated/src/android/support/graphics/drawable/AnimatedVectorDrawableCompat.java b/graphics/drawable/animated/src/android/support/graphics/drawable/AnimatedVectorDrawableCompat.java
index 78ef62d..eff9670 100644
--- a/graphics/drawable/animated/src/android/support/graphics/drawable/AnimatedVectorDrawableCompat.java
+++ b/graphics/drawable/animated/src/android/support/graphics/drawable/AnimatedVectorDrawableCompat.java
@@ -16,7 +16,6 @@
 
 import android.animation.Animator;
 import android.animation.AnimatorInflater;
-import android.animation.ObjectAnimator;
 import android.content.Context;
 import android.content.res.ColorStateList;
 import android.content.res.Resources;
@@ -45,12 +44,12 @@
 /**
  * This class uses {@link android.animation.ObjectAnimator} and
  * {@link android.animation.AnimatorSet} to animate the properties of a
- * {@link android.graphics.drawable.VectorDrawableCompat} to create an animated drawable.
+ * {@link android.support.graphics.drawable.VectorDrawableCompat} to create an animated drawable.
  * <p>
  * AnimatedVectorDrawableCompat are normally defined as 3 separate XML files.
  * </p>
  * <p>
- * First is the XML file for {@link android.graphics.drawable.VectorDrawableCompat}. Note that we
+ * First is the XML file for {@link android.support.graphics.drawable.VectorDrawableCompat}. Note that we
  * allow the animation to happen on the group's attributes and path's attributes, which requires they
  * are uniquely named in this XML file. Groups and paths without animations do not need names.
  * </p>
@@ -306,9 +305,9 @@
                 }
                 if (ANIMATED_VECTOR.equals(tagName)) {
                     final TypedArray a =
-                            obtainAttributes(res, theme, attrs, R.styleable.AnimatedVectorDrawable);
+                            obtainAttributes(res, theme, attrs, AndroidResources.styleable_AnimatedVectorDrawable);
 
-                    int drawableRes = a.getResourceId(R.styleable.AnimatedVectorDrawable_drawable,
+                    int drawableRes = a.getResourceId(AndroidResources.styleable_AnimatedVectorDrawable_drawable,
                             0);
                     if (DBG_ANIMATION_VECTOR_DRAWABLE) {
                         Log.v(LOGTAG, "drawableRes is " + drawableRes);
@@ -327,11 +326,11 @@
                     a.recycle();
                 } else if (TARGET.equals(tagName)) {
                     final TypedArray a =
-                            res.obtainAttributes(attrs, R.styleable.AnimatedVectorDrawableTarget);
+                            res.obtainAttributes(attrs, AndroidResources.styleable_AnimatedVectorDrawableTarget);
                     final String target = a.getString(
-                            R.styleable.AnimatedVectorDrawableTarget_name);
+                            AndroidResources.styleable_AnimatedVectorDrawableTarget_name);
 
-                    int id = a.getResourceId(R.styleable.AnimatedVectorDrawableTarget_animation, 0);
+                    int id = a.getResourceId(AndroidResources.styleable_AnimatedVectorDrawableTarget_animation, 0);
                     if (id != 0) {
                         Animator objectAnimator = AnimatorInflater.loadAnimator(mContext, id);
                         setupAnimatorsForTarget(target, objectAnimator);
diff --git a/graphics/drawable/static/src/android/support/graphics/drawable/PathParser.java b/graphics/drawable/static/src/android/support/graphics/drawable/PathParser.java
index a92c3e5..8503fae 100644
--- a/graphics/drawable/static/src/android/support/graphics/drawable/PathParser.java
+++ b/graphics/drawable/static/src/android/support/graphics/drawable/PathParser.java
@@ -131,8 +131,8 @@
         }
 
         for (int i = 0; i < nodesFrom.length; i ++) {
-            if (nodesFrom[i].mType != nodesTo[i].mType
-                    || nodesFrom[i].mParams.length != nodesTo[i].mParams.length) {
+            if (nodesFrom[i].type != nodesTo[i].type
+                    || nodesFrom[i].params.length != nodesTo[i].params.length) {
                 return false;
             }
         }
@@ -148,9 +148,9 @@
      */
     public static void updateNodes(PathDataNode[] target, PathDataNode[] source) {
         for (int i = 0; i < source.length; i ++) {
-            target[i].mType = source[i].mType;
-            for (int j = 0; j < source[i].mParams.length; j ++) {
-                target[i].mParams[j] = source[i].mParams[j];
+            target[i].type = source[i].type;
+            for (int j = 0; j < source[i].params.length; j ++) {
+                target[i].params[j] = source[i].params[j];
             }
         }
     }
@@ -288,17 +288,18 @@
      * An array of PathDataNode can represent the whole "d" attribute.
      */
     public static class PathDataNode {
-        private char mType;
-        private float[] mParams;
+        /*package*/
+        char type;
+        float[] params;
 
         private PathDataNode(char type, float[] params) {
-            mType = type;
-            mParams = params;
+            this.type = type;
+            this.params = params;
         }
 
         private PathDataNode(PathDataNode n) {
-            mType = n.mType;
-            mParams = copyOfRange(n.mParams, 0, n.mParams.length);
+            type = n.type;
+            params = copyOfRange(n.params, 0, n.params.length);
         }
 
         /**
@@ -311,8 +312,8 @@
             float[] current = new float[6];
             char previousCommand = 'm';
             for (int i = 0; i < node.length; i++) {
-                addCommand(path, current, previousCommand, node[i].mType, node[i].mParams);
-                previousCommand = node[i].mType;
+                addCommand(path, current, previousCommand, node[i].type, node[i].params);
+                previousCommand = node[i].type;
             }
         }
 
@@ -327,9 +328,9 @@
          */
         public void interpolatePathDataNode(PathDataNode nodeFrom,
                 PathDataNode nodeTo, float fraction) {
-            for (int i = 0; i < nodeFrom.mParams.length; i++) {
-                mParams[i] = nodeFrom.mParams[i] * (1 - fraction)
-                        + nodeTo.mParams[i] * fraction;
+            for (int i = 0; i < nodeFrom.params.length; i++) {
+                params[i] = nodeFrom.params[i] * (1 - fraction)
+                        + nodeTo.params[i] * fraction;
             }
         }
 
diff --git a/graphics/drawable/static/src/android/support/graphics/drawable/VectorDrawableCompat.java b/graphics/drawable/static/src/android/support/graphics/drawable/VectorDrawableCompat.java
index d33c204..c0e5b40 100644
--- a/graphics/drawable/static/src/android/support/graphics/drawable/VectorDrawableCompat.java
+++ b/graphics/drawable/static/src/android/support/graphics/drawable/VectorDrawableCompat.java
@@ -196,7 +196,7 @@
     private static final int LINEJOIN_ROUND = 1;
     private static final int LINEJOIN_BEVEL = 2;
 
-    private static final boolean DBG_VECTOR_DRAWABLE = true;
+    private static final boolean DBG_VECTOR_DRAWABLE = false;
 
     private VectorDrawableState mVectorState;
 
@@ -420,7 +420,6 @@
 
             final VectorDrawableCompat drawable = new VectorDrawableCompat();
             drawable.inflate(res, parser, attrs, theme);
-
             return drawable;
         } catch (XmlPullParserException e) {
             Log.e(LOGTAG, "parser error", e);
@@ -462,8 +461,9 @@
         final VPathRenderer pathRenderer = new VPathRenderer();
         state.mVPathRenderer = pathRenderer;
 
-        final TypedArray a = obtainAttributes(res, theme, attrs, R.styleable.VectorDrawable);
-        updateStateFromTypedArray(a);
+        final TypedArray a = obtainAttributes(res, theme, attrs, AndroidResources.styleable_VectorDrawableTypeArray);
+
+        updateStateFromTypedArray(a, parser);
         a.recycle();
         state.mChangingConfigurations = getChangingConfigurations();
         state.mCacheDirty = true;
@@ -472,30 +472,47 @@
         mTintFilter = updateTintFilter(mTintFilter, state.mTint, state.mTintMode);
     }
 
-    private void updateStateFromTypedArray(TypedArray a) throws XmlPullParserException {
+
+    /**
+     * Parses a {@link android.graphics.PorterDuff.Mode} from a tintMode
+     * attribute's enum value.
+     */
+    private static PorterDuff.Mode parseTintMode(int value, Mode defaultMode) {
+        switch (value) {
+            case 3: return Mode.SRC_OVER;
+            case 5: return Mode.SRC_IN;
+            case 9: return Mode.SRC_ATOP;
+            case 14: return Mode.MULTIPLY;
+            case 15: return Mode.SCREEN;
+            case 16: return Mode.ADD;
+            default: return defaultMode;
+        }
+    }
+
+    private void updateStateFromTypedArray(TypedArray a, XmlPullParser parser) throws XmlPullParserException {
         final VectorDrawableState state = mVectorState;
         final VPathRenderer pathRenderer = state.mVPathRenderer;
 
         // Account for any configuration changes.
         // state.mChangingConfigurations |= Utils.getChangingConfigurations(a);
 
-        final int tintMode = a.getInt(R.styleable.VectorDrawable_tintMode, -1);
-        // if (tintMode != -1) {
-        // state.mTintMode = Utils.parseTintMode(tintMode, DEFAULT_TINT_MODE);
-        // }
+        final int mode = TypedArrayUtils.getNamedInt(a, parser, "tintMode",
+                AndroidResources.styleable_VectorDrawable_Mode, -1);
+        state.mTintMode = parseTintMode(mode, Mode.SRC_IN);
 
-        final ColorStateList tint = a.getColorStateList(R.styleable.VectorDrawable_tint);
+        final ColorStateList tint = a.getColorStateList(AndroidResources.styleable_VectorDrawable_tint);
         if (tint != null) {
             state.mTint = tint;
         }
 
-        state.mAutoMirrored = a.getBoolean(
-                R.styleable.VectorDrawable_autoMirrored, state.mAutoMirrored);
+        state.mAutoMirrored = TypedArrayUtils.getNamedBoolean(a, parser, "autoMirrored",
+                    AndroidResources.styleable_VectorDrawable_autoMirrored, state.mAutoMirrored);
 
-        pathRenderer.mViewportWidth = a.getFloat(
-                R.styleable.VectorDrawable_viewportWidth, pathRenderer.mViewportWidth);
-        pathRenderer.mViewportHeight = a.getFloat(
-                R.styleable.VectorDrawable_viewportHeight, pathRenderer.mViewportHeight);
+        pathRenderer.mViewportWidth = TypedArrayUtils.getNamedFloat(a, parser, "viewportWidth",
+                AndroidResources.styleable_VectorDrawable_viewportWidth, pathRenderer.mViewportWidth);
+
+        pathRenderer.mViewportHeight = TypedArrayUtils.getNamedFloat(a, parser, "viewportHeight",
+                AndroidResources.styleable_VectorDrawable_viewportHeight, pathRenderer.mViewportHeight);
 
         if (pathRenderer.mViewportWidth <= 0) {
             throw new XmlPullParserException(a.getPositionDescription() +
@@ -506,10 +523,9 @@
         }
 
         pathRenderer.mBaseWidth = a.getDimension(
-                R.styleable.VectorDrawable_width, pathRenderer.mBaseWidth);
+                AndroidResources.styleable_VectorDrawable_width, pathRenderer.mBaseWidth);
         pathRenderer.mBaseHeight = a.getDimension(
-                R.styleable.VectorDrawable_height, pathRenderer.mBaseHeight);
-
+                AndroidResources.styleable_VectorDrawable_height, pathRenderer.mBaseHeight);
         if (pathRenderer.mBaseWidth <= 0) {
             throw new XmlPullParserException(a.getPositionDescription() +
                     "<vector> tag requires width > 0");
@@ -518,11 +534,12 @@
                     "<vector> tag requires height > 0");
         }
 
-        final float alphaInFloat = a.getFloat(R.styleable.VectorDrawable_alpha,
-                pathRenderer.getAlpha());
+        // shown up from API 11.
+        final float alphaInFloat = TypedArrayUtils.getNamedFloat(a, parser, "alpha",
+                    AndroidResources.styleable_VectorDrawable_alpha, pathRenderer.getAlpha());
         pathRenderer.setAlpha(alphaInFloat);
 
-        final String name = a.getString(R.styleable.VectorDrawable_name);
+        final String name = a.getString(AndroidResources.styleable_VectorDrawable_name);
         if (name != null) {
             pathRenderer.mRootName = name;
             pathRenderer.mVGTargetsMap.put(name, pathRenderer);
@@ -545,10 +562,9 @@
             if (eventType == XmlPullParser.START_TAG) {
                 final String tagName = parser.getName();
                 final VGroup currentGroup = groupStack.peek();
-                Log.v(LOGTAG, tagName);
                 if (SHAPE_PATH.equals(tagName)) {
                     final VFullPath path = new VFullPath();
-                    path.inflate(res, attrs, theme);
+                    path.inflate(res, attrs, theme, parser);
                     currentGroup.mChildren.add(path);
                     if (path.getPathName() != null) {
                         pathRenderer.mVGTargetsMap.put(path.getPathName(), path);
@@ -557,7 +573,7 @@
                     state.mChangingConfigurations |= path.mChangingConfigurations;
                 } else if (SHAPE_CLIP_PATH.equals(tagName)) {
                     final VClipPath path = new VClipPath();
-                    path.inflate(res, attrs, theme);
+                    path.inflate(res, attrs, theme, parser);
                     currentGroup.mChildren.add(path);
                     if (path.getPathName() != null) {
                         pathRenderer.mVGTargetsMap.put(path.getPathName(), path);
@@ -565,7 +581,7 @@
                     state.mChangingConfigurations |= path.mChangingConfigurations;
                 } else if (SHAPE_GROUP.equals(tagName)) {
                     VGroup newChildGroup = new VGroup();
-                    newChildGroup.inflate(res, attrs, theme);
+                    newChildGroup.inflate(res, attrs, theme, parser);
                     currentGroup.mChildren.add(newChildGroup);
                     groupStack.push(newChildGroup);
                     if (newChildGroup.getGroupName() != null) {
@@ -614,6 +630,8 @@
             Object child = currentGroup.mChildren.get(i);
             if (child instanceof VGroup) {
                 printGroupTree((VGroup) child, level + 1);
+            } else {
+                ((VPath) child).printVPath(level + 1);
             }
         }
     }
@@ -1017,29 +1035,41 @@
             return mLocalMatrix;
         }
 
-        public void inflate(Resources res, AttributeSet attrs, Theme theme) {
+        public void inflate(Resources res, AttributeSet attrs, Theme theme, XmlPullParser parser) {
             final TypedArray a = obtainAttributes(res, theme, attrs,
-                    R.styleable.VectorDrawableGroup);
-            updateStateFromTypedArray(a);
+                    AndroidResources.styleable_VectorDrawableGroup);
+            updateStateFromTypedArray(a, parser);
             a.recycle();
         }
 
-        private void updateStateFromTypedArray(TypedArray a) {
+        private void updateStateFromTypedArray(TypedArray a, XmlPullParser parser) {
             // Account for any configuration changes.
             // mChangingConfigurations |= Utils.getChangingConfigurations(a);
 
             // Extract the theme attributes, if any.
             mThemeAttrs = null; // TODO TINT THEME Not supported yet a.extractThemeAttrs();
 
-            mRotate = a.getFloat(R.styleable.VectorDrawableGroup_rotation, mRotate);
-            mPivotX = a.getFloat(R.styleable.VectorDrawableGroup_pivotX, mPivotX);
-            mPivotY = a.getFloat(R.styleable.VectorDrawableGroup_pivotY, mPivotY);
-            mScaleX = a.getFloat(R.styleable.VectorDrawableGroup_scaleX, mScaleX);
-            mScaleY = a.getFloat(R.styleable.VectorDrawableGroup_scaleY, mScaleY);
-            mTranslateX = a.getFloat(R.styleable.VectorDrawableGroup_translateX, mTranslateX);
-            mTranslateY = a.getFloat(R.styleable.VectorDrawableGroup_translateY, mTranslateY);
+            // This is added in API 11
+            mRotate = TypedArrayUtils.getNamedFloat(a, parser, "rotation",
+                    AndroidResources.styleable_VectorDrawableGroup_rotation, mRotate);
 
-            final String groupName = a.getString(R.styleable.VectorDrawableGroup_name);
+            mPivotX = a.getFloat(AndroidResources.styleable_VectorDrawableGroup_pivotX, mPivotX);
+            mPivotY = a.getFloat(AndroidResources.styleable_VectorDrawableGroup_pivotY, mPivotY);
+
+            // This is added in API 11
+            mScaleX = TypedArrayUtils.getNamedFloat(a, parser, "scaleX",
+                    AndroidResources.styleable_VectorDrawableGroup_scaleX, mScaleX);
+
+            // This is added in API 11
+            mScaleY = TypedArrayUtils.getNamedFloat(a, parser, "scaleY",
+                    AndroidResources.styleable_VectorDrawableGroup_scaleY, mScaleY);
+
+            mTranslateX = TypedArrayUtils.getNamedFloat(a, parser, "translateX",
+                    AndroidResources.styleable_VectorDrawableGroup_translateX, mTranslateX);
+            mTranslateY = TypedArrayUtils.getNamedFloat(a, parser, "translateY",
+                    AndroidResources.styleable_VectorDrawableGroup_translateY, mTranslateY);
+
+            final String groupName = a.getString(AndroidResources.styleable_VectorDrawableGroup_name);
             if (groupName != null) {
                 mGroupName = groupName;
             }
@@ -1162,6 +1192,28 @@
             // Empty constructor.
         }
 
+        public void printVPath(int level) {
+            String indent = "";
+            for (int i = 0; i < level; i++) {
+                indent += "    ";
+            }
+            Log.v(LOGTAG, indent + "current path is :" + mPathName +
+                    " pathData is " + NodesToString(mNodes));
+
+        }
+
+        public String NodesToString(PathParser.PathDataNode[] nodes) {
+            String result = " ";
+            for (int i = 0; i < nodes.length; i++) {
+                result += nodes[i].type + ":";
+                float[] params = nodes[i].params;
+                for (int j = 0; j < params.length; j++) {
+                    result += params[j] + ",";
+                }
+            }
+            return result;
+        }
+
         public VPath(VPath copy) {
             mPathName = copy.mPathName;
             mChangingConfigurations = copy.mChangingConfigurations;
@@ -1219,10 +1271,14 @@
             super(copy);
         }
 
-        public void inflate(Resources r, AttributeSet attrs, Theme theme) {
+        public void inflate(Resources r, AttributeSet attrs, Theme theme, XmlPullParser parser) {
             // TODO TINT THEME Not supported yet
+            final boolean hasPathData = TypedArrayUtils.hasAttribute(parser, "pathData");
+            if (!hasPathData) {
+                return;
+            }
             final TypedArray a = obtainAttributes(r, theme, attrs,
-                    R.styleable.VectorDrawableClipPath);
+                    AndroidResources.styleable_VectorDrawableClipPath);
             updateStateFromTypedArray(a);
             a.recycle();
         }
@@ -1231,12 +1287,12 @@
             // Account for any configuration changes.
             // mChangingConfigurations |= Utils.getChangingConfigurations(a);;
 
-            final String pathName = a.getString(R.styleable.VectorDrawableClipPath_name);
+            final String pathName = a.getString(AndroidResources.styleable_VectorDrawableClipPath_name);
             if (pathName != null) {
                 mPathName = pathName;
             }
 
-            final String pathData = a.getString(R.styleable.VectorDrawableClipPath_pathData);
+            final String pathData = a.getString(AndroidResources.styleable_VectorDrawableClipPath_pathData);
             if (pathData != null) {
                 mNodes = PathParser.createNodesFromPathData(pathData);
             }
@@ -1325,52 +1381,64 @@
             return mThemeAttrs != null;
         }
 
-        public void inflate(Resources r, AttributeSet attrs, Theme theme) {
+        public void inflate(Resources r, AttributeSet attrs, Theme theme, XmlPullParser parser) {
             final TypedArray a = obtainAttributes(r, theme, attrs,
-                    R.styleable.VectorDrawablePath);
-            updateStateFromTypedArray(a);
+                    AndroidResources.styleable_VectorDrawablePath);
+            updateStateFromTypedArray(a, parser);
             a.recycle();
         }
 
-        private void updateStateFromTypedArray(TypedArray a) {
+        private void updateStateFromTypedArray(TypedArray a, XmlPullParser parser) {
             // Account for any configuration changes.
             // mChangingConfigurations |= Utils.getChangingConfigurations(a);
 
             // Extract the theme attributes, if any.
             mThemeAttrs = null; // TODO TINT THEME Not supported yet a.extractThemeAttrs();
 
-            final String pathName = a.getString(R.styleable.VectorDrawablePath_name);
+            // In order to work around the conflicting id issue, we need to double check the existence
+            // of the attribute.
+            // B/c if the attribute existed in the compiled XML, then calling TypedArray will be safe
+            // since the framework will look up in the XML first.
+            // Note that each getAttributeValue take roughly 0.03ms, it is a price we have to pay here.
+            final boolean hasPathData = TypedArrayUtils.hasAttribute(parser, "pathData");
+            if (!hasPathData) {
+                //If there is no pathData in the <path> tag, then this is an empty path, nothing need to be drawn.
+                return;
+            }
+
+            final String pathName = a.getString(AndroidResources.styleable_VectorDrawablePath_name);
             if (pathName != null) {
                 mPathName = pathName;
             }
-
-            final String pathData = a.getString(R.styleable.VectorDrawablePath_pathData);
+            final String pathData = a.getString(AndroidResources.styleable_VectorDrawablePath_pathData);
             if (pathData != null) {
                 mNodes = PathParser.createNodesFromPathData(pathData);
             }
 
-            mFillColor = a.getColor(R.styleable.VectorDrawablePath_fillColor,
-                    mFillColor);
-            mFillAlpha = a.getFloat(R.styleable.VectorDrawablePath_fillAlpha,
-                    mFillAlpha);
-            mStrokeLineCap = getStrokeLineCap(a.getInt(
-                    R.styleable.VectorDrawablePath_strokeLineCap, -1), mStrokeLineCap);
-            mStrokeLineJoin = getStrokeLineJoin(a.getInt(
-                    R.styleable.VectorDrawablePath_strokeLineJoin, -1), mStrokeLineJoin);
-            mStrokeMiterlimit = a.getFloat(
-                    R.styleable.VectorDrawablePath_strokeMiterLimit, mStrokeMiterlimit);
-            mStrokeColor = a.getColor(R.styleable.VectorDrawablePath_strokeColor,
-                    mStrokeColor);
-            mStrokeAlpha = a.getFloat(R.styleable.VectorDrawablePath_strokeAlpha,
-                    mStrokeAlpha);
-            mStrokeWidth = a.getFloat(R.styleable.VectorDrawablePath_strokeWidth,
-                    mStrokeWidth);
-            mTrimPathEnd = a.getFloat(R.styleable.VectorDrawablePath_trimPathEnd,
-                    mTrimPathEnd);
-            mTrimPathOffset = a.getFloat(
-                    R.styleable.VectorDrawablePath_trimPathOffset, mTrimPathOffset);
-            mTrimPathStart = a.getFloat(
-                    R.styleable.VectorDrawablePath_trimPathStart, mTrimPathStart);
+            mFillColor = TypedArrayUtils.getNamedColor(a, parser, "fillColor",
+                    AndroidResources.styleable_VectorDrawablePath_fillColor, mFillColor);
+            mFillAlpha = TypedArrayUtils.getNamedFloat(a, parser, "alpha",
+                    AndroidResources.styleable_VectorDrawablePath_fillAlpha, mFillAlpha);
+            final int lineCap = TypedArrayUtils.getNamedInt(a, parser, "strokeLineCap",
+                    AndroidResources.styleable_VectorDrawablePath_strokeLineCap, -1);
+            mStrokeLineCap = getStrokeLineCap(lineCap, mStrokeLineCap);
+            final int lineJoin = TypedArrayUtils.getNamedInt(a, parser, "strokeLineJoin",
+                    AndroidResources.styleable_VectorDrawablePath_strokeLineJoin, -1);
+            mStrokeLineJoin = getStrokeLineJoin(lineJoin, mStrokeLineJoin);
+            mStrokeMiterlimit = TypedArrayUtils.getNamedFloat(a, parser, "strokeMiterLimit",
+                    AndroidResources.styleable_VectorDrawablePath_strokeMiterLimit, mStrokeMiterlimit);
+            mStrokeColor = TypedArrayUtils.getNamedColor(a, parser, "strokeColor",
+                    AndroidResources.styleable_VectorDrawablePath_strokeColor, mStrokeColor);
+            mStrokeAlpha = TypedArrayUtils.getNamedFloat(a, parser, "strokeAlpha",
+                    AndroidResources.styleable_VectorDrawablePath_strokeAlpha, mStrokeAlpha);
+            mStrokeWidth = TypedArrayUtils.getNamedFloat(a, parser, "strokeWidth",
+                    AndroidResources.styleable_VectorDrawablePath_strokeWidth, mStrokeWidth);
+            mTrimPathEnd = TypedArrayUtils.getNamedFloat(a, parser, "trimPathEnd",
+                    AndroidResources.styleable_VectorDrawablePath_trimPathEnd, mTrimPathEnd);
+            mTrimPathOffset = TypedArrayUtils.getNamedFloat(a, parser, "trimPathOffset",
+                    AndroidResources.styleable_VectorDrawablePath_trimPathOffset, mTrimPathOffset);
+            mTrimPathStart = TypedArrayUtils.getNamedFloat(a, parser, "trimPathStart",
+                    AndroidResources.styleable_VectorDrawablePath_trimPathStart, mTrimPathStart);
         }
 
         @Override
@@ -1381,7 +1449,7 @@
 
             /*
              * TODO TINT THEME Not supported yet final TypedArray a =
-             * t.resolveAttributes(mThemeAttrs, R.styleable.VectorDrawablePath);
+             * t.resolveAttributes(mThemeAttrs, styleable_VectorDrawablePath);
              * updateStateFromTypedArray(a); a.recycle();
              */
         }
diff --git a/graphics/drawable/testanimated/Android.mk b/graphics/drawable/testanimated/Android.mk
index c888d9e..004cddb 100644
--- a/graphics/drawable/testanimated/Android.mk
+++ b/graphics/drawable/testanimated/Android.mk
@@ -18,7 +18,7 @@
 
 LOCAL_MODULE_TAGS := tests
 
-LOCAL_SDK_VERSION := 11
+LOCAL_SDK_VERSION := current
 
 LOCAL_SRC_FILES := $(call all-java-files-under, src)
 
@@ -30,6 +30,8 @@
 
 LOCAL_STATIC_JAVA_LIBRARIES := android-support-v11-animatedvectordrawable android-support-v4
 
-LOCAL_AAPT_FLAGS += --auto-add-overlay --extra-packages android.support.graphics.drawable
+LOCAL_AAPT_FLAGS += --auto-add-overlay \
+        --extra-packages android.support.graphics.drawable \
+        --no-version-vectors
 
 include $(BUILD_PACKAGE)
diff --git a/graphics/drawable/testanimated/res/drawable/animation_vector_drawable_grouping_1.xml b/graphics/drawable/testanimated/res/drawable/animation_vector_drawable_grouping_1.xml
index 7c3b1de..dac981b 100644
--- a/graphics/drawable/testanimated/res/drawable/animation_vector_drawable_grouping_1.xml
+++ b/graphics/drawable/testanimated/res/drawable/animation_vector_drawable_grouping_1.xml
@@ -14,14 +14,13 @@
      limitations under the License.
 -->
 <animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:auto="http://schemas.android.com/apk/res-auto"
-    auto:drawable="@drawable/vector_drawable_grouping_1" >
+    android:drawable="@drawable/vector_drawable_grouping_1" >
 
     <target
-        auto:name="sun"
-        auto:animation="@anim/animation_grouping_1_01" />
+        android:name="sun"
+        android:animation="@anim/animation_grouping_1_01" />
     <target
-        auto:name="earth"
-        auto:animation="@anim/animation_grouping_1_01" />
+        android:name="earth"
+        android:animation="@anim/animation_grouping_1_01" />
 
 </animated-vector>
\ No newline at end of file
diff --git a/graphics/drawable/testanimated/res/drawable/animation_vector_progress_bar.xml b/graphics/drawable/testanimated/res/drawable/animation_vector_progress_bar.xml
index e37d2a1..2944dc2 100644
--- a/graphics/drawable/testanimated/res/drawable/animation_vector_progress_bar.xml
+++ b/graphics/drawable/testanimated/res/drawable/animation_vector_progress_bar.xml
@@ -14,13 +14,12 @@
      limitations under the License.
 -->
 <animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:auto="http://schemas.android.com/apk/res-auto"
-    auto:drawable="@drawable/vector_drawable_progress_bar" >
+    android:drawable="@drawable/vector_drawable_progress_bar" >
 
     <target
-        auto:name="pie1"
-        auto:animation="@anim/trim_path_animation_progress_bar" />
+        android:name="pie1"
+        android:animation="@anim/trim_path_animation_progress_bar" />
     <target
-        auto:name="root_bar"
-        auto:animation="@anim/alpha_animation_progress_bar" />
+        android:name="root_bar"
+        android:animation="@anim/alpha_animation_progress_bar" />
 </animated-vector>
\ No newline at end of file
diff --git a/graphics/drawable/testanimated/res/drawable/vector_drawable_grouping_1.xml b/graphics/drawable/testanimated/res/drawable/vector_drawable_grouping_1.xml
index eceda71..06f098e 100644
--- a/graphics/drawable/testanimated/res/drawable/vector_drawable_grouping_1.xml
+++ b/graphics/drawable/testanimated/res/drawable/vector_drawable_grouping_1.xml
@@ -14,37 +14,36 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-        auto:height="64dp"
-        auto:width="64dp"
-        auto:viewportHeight="256"
-        auto:viewportWidth="256" >
+        android:height="64dp"
+        android:width="64dp"
+        android:viewportHeight="256"
+        android:viewportWidth="256" >
 
     <group
-        auto:name="shape_layer_1"
-        auto:translateX="128"
-        auto:translateY="128" >
-        <group auto:name="sun" >
+        android:name="shape_layer_1"
+        android:translateX="128"
+        android:translateY="128" >
+        <group android:name="sun" >
             <path
-                auto:name="ellipse_path_1"
-                auto:fillColor="#ffff8000"
-                auto:pathData="m -25 0 a 25,25 0 1,0 50,0 a 25,25 0 1,0 -50,0" />
+                android:name="ellipse_path_1"
+                android:fillColor="#ffff8000"
+                android:pathData="m -25 0 a 25,25 0 1,0 50,0 a 25,25 0 1,0 -50,0" />
 
             <group
-                auto:name="earth"
-                auto:translateX="75" >
+                android:name="earth"
+                android:translateX="75" >
                 <path
-                    auto:name="ellipse_path_1_1"
-                    auto:fillColor="#ff5656ea"
-                    auto:pathData="m -10 0 a 10,10 0 1,0 20,0 a 10,10 0 1,0 -20,0" />
+                    android:name="ellipse_path_1_1"
+                    android:fillColor="#ff5656ea"
+                    android:pathData="m -10 0 a 10,10 0 1,0 20,0 a 10,10 0 1,0 -20,0" />
 
                 <group
-                    auto:name="moon"
-                    auto:translateX="25" >
+                    android:name="moon"
+                    android:translateX="25" >
                     <path
-                        auto:name="ellipse_path_1_2"
-                        auto:fillColor="#ffadadad"
-                        auto:pathData="m -5 0 a 5,5 0 1,0 10,0 a 5,5 0 1,0 -10,0" />
+                        android:name="ellipse_path_1_2"
+                        android:fillColor="#ffadadad"
+                        android:pathData="m -5 0 a 5,5 0 1,0 10,0 a 5,5 0 1,0 -10,0" />
                 </group>
             </group>
         </group>
diff --git a/graphics/drawable/testanimated/res/drawable/vector_drawable_progress_bar.xml b/graphics/drawable/testanimated/res/drawable/vector_drawable_progress_bar.xml
index 0b8884b..535265e 100644
--- a/graphics/drawable/testanimated/res/drawable/vector_drawable_progress_bar.xml
+++ b/graphics/drawable/testanimated/res/drawable/vector_drawable_progress_bar.xml
@@ -14,36 +14,35 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-        auto:height="64dp"
-        auto:width="64dp"
-        auto:viewportHeight="64"
-        auto:viewportWidth="64"
-        auto:name="root_bar" >
+        android:height="64dp"
+        android:width="64dp"
+        android:viewportHeight="64"
+        android:viewportWidth="64"
+        android:name="root_bar" >
 
     <group
-        auto:name="root"
-        auto:pivotX="0.0"
-        auto:pivotY="0.0"
-        auto:rotation="0"
-        auto:translateX="32.0"
-        auto:translateY="32.0" >
+        android:name="root"
+        android:pivotX="0.0"
+        android:pivotY="0.0"
+        android:rotation="0"
+        android:translateX="32.0"
+        android:translateY="32.0" >
         <group
-            auto:name="rotationGroup"
-            auto:pivotX="0.0"
-            auto:pivotY="0.0"
-            auto:rotation="0" >
+            android:name="rotationGroup"
+            android:pivotX="0.0"
+            android:pivotY="0.0"
+            android:rotation="0" >
             <path
-                auto:name="pie1"
-                auto:fillColor="#00000000"
-                auto:pathData="M0, 0 m 0, -9.5 a 9.5,9.5 0 1,1 0,19 a 9.5,9.5 0 1,1 0,-19"
-                auto:strokeColor="#FF00FFFF"
-                auto:strokeLineCap="round"
-                auto:strokeLineJoin="miter"
-                auto:strokeWidth="2"
-                auto:trimPathEnd="0.1"
-                auto:trimPathOffset="0"
-                auto:trimPathStart="0" />
+                android:name="pie1"
+                android:fillColor="#00000000"
+                android:pathData="M0, 0 m 0, -9.5 a 9.5,9.5 0 1,1 0,19 a 9.5,9.5 0 1,1 0,-19"
+                android:strokeColor="#FF00FFFF"
+                android:strokeLineCap="round"
+                android:strokeLineJoin="miter"
+                android:strokeWidth="2"
+                android:trimPathEnd="0.1"
+                android:trimPathOffset="0"
+                android:trimPathStart="0" />
         </group>
     </group>
 
diff --git a/graphics/drawable/teststatic/Android.mk b/graphics/drawable/teststatic/Android.mk
index d8a0fd7..4c4a7ba 100644
--- a/graphics/drawable/teststatic/Android.mk
+++ b/graphics/drawable/teststatic/Android.mk
@@ -18,7 +18,7 @@
 
 LOCAL_MODULE_TAGS := tests
 
-LOCAL_SDK_VERSION := 7
+LOCAL_SDK_VERSION := current
 
 LOCAL_SRC_FILES := $(call all-java-files-under, src)
 
@@ -32,7 +32,8 @@
 
 LOCAL_AAPT_FLAGS := \
         --auto-add-overlay \
-        --extra-packages android.support.graphics.drawable
+        --extra-packages android.support.graphics.drawable \
+        --no-version-vectors
 
 include $(BUILD_PACKAGE)
 
diff --git a/graphics/drawable/teststatic/AndroidManifest.xml b/graphics/drawable/teststatic/AndroidManifest.xml
index 19586fb..39ac8ba 100644
--- a/graphics/drawable/teststatic/AndroidManifest.xml
+++ b/graphics/drawable/teststatic/AndroidManifest.xml
@@ -17,7 +17,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="android.support.test.vectordrawable" >
 
-    <uses-sdk android:minSdkVersion="7" />
+    <uses-sdk android:minSdkVersion="7"/>
 
     <application android:icon="@drawable/app_sample_code" android:label="VectorDrawableCompatTest" >
         <activity android:name="android.support.test.vectordrawable.TestActivity" />
@@ -29,4 +29,4 @@
         </intent-filter>
     </application>
 
-</manifest>
\ No newline at end of file
+</manifest>
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable01.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable01.xml
index 12357ef..286b487 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable01.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable01.xml
@@ -1,4 +1,3 @@
-<?xml version="1.0" encoding="utf-8"?>
 <!--
  Copyright (C) 2015 The Android Open Source Project
 
@@ -15,20 +14,16 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:auto="http://schemas.android.com/apk/res-auto"
-    auto:height="48dp"
-    auto:viewportHeight="480"
-    auto:viewportWidth="480"
-    auto:width="48dp" >
+        android:height="48dp"
+        android:width="48dp"
+        android:viewportHeight="480"
+        android:viewportWidth="480" >
 
     <group>
         <path
-            auto:name="box1"
-            auto:fillColor="?android:attr/textColorPrimary"
-            auto:pathData="m20,200l100,90l180-180l-35-35l-145,145l-60-60l-40,40z"
-            auto:strokeColor="?android:attr/colorBackground"
-            auto:strokeLineCap="round"
-            auto:strokeLineJoin="round" />
+            android:name="box1"
+            android:pathData="m20,200l100,90l180-180l-35-35l-145,145l-60-60l-40,40z"
+            android:strokeLineCap="round"
+            android:strokeLineJoin="round" />
     </group>
-
-</vector>
\ No newline at end of file
+</vector>
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable02.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable02.xml
index cb6b9df..7567887 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable02.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable02.xml
@@ -1,5 +1,4 @@
-<!--
- Copyright (C) 2015 The Android Open Source Project
+<!-- Copyright (C) 2015 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -14,24 +13,20 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:auto="http://schemas.android.com/apk/res-auto"
-    auto:height="64dp"
-    auto:viewportHeight="320"
-    auto:viewportWidth="320"
-    auto:width="64dp" >
-
+        android:width="64dp"
+        android:height="64dp" android:viewportWidth="320"
+          android:viewportHeight="320">
     <group
-        auto:pivotX="70"
-        auto:pivotY="120"
-        auto:rotation="180" >
+        android:rotation="180"
+        android:pivotX="70"
+        android:pivotY="120">
         <path
-            auto:name="house"
-            auto:fillColor="#ff440000"
-            auto:pathData="M 130,225 L 130,115 L 130,115 L 70,15 L 10,115 L 10,115 L 10,225 z"
-            auto:strokeColor="#FF00FF00"
-            auto:strokeWidth="10"
-            auto:trimPathEnd=".9"
-            auto:trimPathStart=".1" />
+            android:name="house"
+            android:pathData="M 130,225 L 130,115 L 130,115 L 70,15 L 10,115 L 10,115 L 10,225 z"
+            android:fillColor="#ff440000"
+            android:strokeColor="#FF00FF00"
+            android:strokeWidth="10"
+            android:trimPathStart=".1"
+            android:trimPathEnd=".9"/>
     </group>
-
-</vector>
\ No newline at end of file
+</vector>
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable03.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable03.xml
index 37d0086..454468a 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable03.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable03.xml
@@ -14,51 +14,57 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-    auto:height="64dp"
-    auto:viewportHeight="12.25"
-    auto:viewportWidth="7.30625"
-    auto:width="64dp" >
+    android:height="64dp"
+    android:viewportHeight="12.25"
+    android:viewportWidth="7.30625"
+    android:width="64dp" >
 
     <group
-        auto:pivotX="3.65"
-        auto:pivotY="6.125"
-        auto:rotation="-30" >
+        android:pivotX="3.65"
+        android:pivotY="6.125"
+        android:rotation="-30" >
         <clip-path
-            auto:name="clip1"
-            auto:pathData="
+            android:name="clip1"
+            android:pathData="
                 M 0, 6.125
                 l 7.3, 0
                 l 0, 12.25
                 l-7.3, 0
                 z" />
-    </group>
-    <group>
-        <path
-            auto:name="one"
-            auto:fillColor="#ff88ff"
-            auto:pathData="M 1.215625,9.5l 1.9375,0.0 0.0-6.671875-2.109375,0.421875 0.0-1.078125
+
+        <group
+            android:pivotX="3.65"
+            android:pivotY="6.125"
+            android:rotation="30" >
+            <path
+                android:name="one"
+                android:fillColor="#ff88ff"
+                android:pathData="M 1.215625,9.5l 1.9375,0.0 0.0-6.671875-2.109375,0.421875 0.0-1.078125
                 l 2.09375-0.421875 1.1874998,0.0 0.0,7.75 1.9375,0.0 0.0,1.0
                 l-5.046875,0.0 0.0-1.0Z" />
+        </group>
     </group>
     <group
-        auto:pivotX="3.65"
-        auto:pivotY="6.125"
-        auto:rotation="-30" >
+        android:pivotX="3.65"
+        android:pivotY="6.125"
+        android:rotation="-30" >
         <clip-path
-            auto:name="clip2"
-            auto:pathData="
+            android:name="clip2"
+            android:pathData="
                 M 0, 0
                 l 7.3, 0
                 l 0, 6.125
                 l-7.3, 0
                 z" />
-    </group>
-    <group>
-        <path
-            auto:name="two"
-            auto:fillColor="#ff88ff"
-            auto:pathData="M 2.534375,9.6875l 4.140625,0.0 0.0,1.0-5.5625,0.0 0.0-1.0q 0.671875-0.6875 1.828125-1.859375
+
+        <group
+            android:pivotX="3.65"
+            android:pivotY="6.125"
+            android:rotation="30" >
+            <path
+                android:name="two"
+                android:fillColor="#ff88ff"
+                android:pathData="M 2.534375,9.6875l 4.140625,0.0 0.0,1.0-5.5625,0.0 0.0-1.0q 0.671875-0.6875 1.828125-1.859375
                         q 1.1718752-1.1875 1.4687502-1.53125 0.578125-0.625 0.796875-1.0625
                         q 0.234375-0.453125 0.234375-0.875 0.0-0.703125-0.5-1.140625
                         q-0.484375-0.4375-1.2656252-0.4375-0.5625,0.0-1.1875,0.1875
@@ -67,6 +73,7 @@
                         q 0.8125,0.671875 0.8125,1.8125 0.0,0.53125-0.203125,1.015625
                         q-0.203125,0.484375-0.734375,1.140625-0.15625,0.171875-0.9375,0.984375
                         q-0.78125024,0.8125-2.2187502,2.265625Z" />
+        </group>
     </group>
 
 </vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable04.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable04.xml
index 4e2086f..e6658a6 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable04.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable04.xml
@@ -13,38 +13,41 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-            auto:width="64dp"
-            auto:height="64dp"
-            auto:viewportWidth="7.30625"
-            auto:viewportHeight="12.25"
-            auto:autoMirrored="true">
+    android:autoMirrored="true"
+    android:height="64dp"
+    android:viewportHeight="12.25"
+    android:viewportWidth="7.30625"
+    android:width="64dp" >
 
     <group>
         <clip-path
-                auto:name="clip1"
-                auto:pathData="
+            android:name="clip1"
+            android:pathData="
                 M 3.65, 6.125
                 m-.001, 0
                 a .001,.001 0 1,0 .002,0
-                a .001,.001 0 1,0-.002,0z"/>
-        <path
-                auto:name="one"
-                auto:pathData="M 1.215625,9.5l 1.9375,0.0 0.0-6.671875-2.109375,0.421875 0.0-1.078125
-                l 2.09375-0.421875 1.1874998,0.0 0.0,7.75 1.9375,0.0 0.0,1.0
-                l-5.046875,0.0 0.0-1.0Z"
-                auto:fillColor="#ff88ff"/>
+                a .001,.001 0 1,0-.002,0z" />
 
+        <path
+            android:name="one"
+            android:fillColor="#ff88ff"
+            android:pathData="M 1.215625,9.5l 1.9375,0.0 0.0-6.671875-2.109375,0.421875 0.0-1.078125
+                l 2.09375-0.421875 1.1874998,0.0 0.0,7.75 1.9375,0.0 0.0,1.0
+                l-5.046875,0.0 0.0-1.0Z" />
+    </group>
+    <group>
         <clip-path
-                auto:name="clip2"
-                auto:pathData="
+            android:name="clip2"
+            android:pathData="
                 M 3.65, 6.125
                 m-6, 0
                 a 6,6 0 1,0 12,0
-                a 6,6 0 1,0-12,0z"/>
+                a 6,6 0 1,0-12,0z" />
+
         <path
-                auto:name="two"
-                auto:pathData="M 2.534375,9.6875l 4.140625,0.0 0.0,1.0-5.5625,0.0 0.0-1.0q 0.671875-0.6875 1.828125-1.859375
+            android:name="two"
+            android:fillColor="#ff88ff"
+            android:pathData="M 2.534375,9.6875l 4.140625,0.0 0.0,1.0-5.5625,0.0 0.0-1.0q 0.671875-0.6875 1.828125-1.859375
                         q 1.1718752-1.1875 1.4687502-1.53125 0.578125-0.625 0.796875-1.0625
                         q 0.234375-0.453125 0.234375-0.875 0.0-0.703125-0.5-1.140625
                         q-0.484375-0.4375-1.2656252-0.4375-0.5625,0.0-1.1875,0.1875
@@ -52,7 +55,7 @@
                         q 0.625-0.15625 1.140625-0.15625 1.3593752,0.0 2.1718752,0.6875
                         q 0.8125,0.671875 0.8125,1.8125 0.0,0.53125-0.203125,1.015625
                         q-0.203125,0.484375-0.734375,1.140625-0.15625,0.171875-0.9375,0.984375
-                        q-0.78125024,0.8125-2.2187502,2.265625Z"
-                auto:fillColor="#ff88ff"/>
+                        q-0.78125024,0.8125-2.2187502,2.265625Z" />
     </group>
-</vector>
+
+</vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable05.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable05.xml
index 48801e3..d1723dc 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable05.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable05.xml
@@ -14,24 +14,23 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-        auto:height="64dp"
-        auto:width="64dp"
-        auto:viewportHeight="12.25"
-        auto:viewportWidth="7.30625" >
+        android:height="64dp"
+        android:width="64dp"
+        android:viewportHeight="12.25"
+        android:viewportWidth="7.30625" >
 
     <group>
         <path
-            auto:name="one"
-            auto:fillColor="#ffff00"
-            auto:pathData="M 1.215625,9.5l 1.9375,0.0 0.0-6.671875-2.109375,0.421875 0.0-1.078125
+            android:name="one"
+            android:fillColor="#ffff00"
+            android:pathData="M 1.215625,9.5l 1.9375,0.0 0.0-6.671875-2.109375,0.421875 0.0-1.078125
                 l 2.09375-0.421875 1.1874998,0.0 0.0,7.75 1.9375,0.0 0.0,1.0
                 l-5.046875,0.0 0.0-1.0Z" />
         <path
-            auto:name="two"
-            auto:fillColor="#ffff00"
-            auto:fillAlpha="0"
-            auto:pathData="M 2.534375,9.6875l 4.140625,0.0 0.0,1.0-5.5625,0.0 0.0-1.0q 0.671875-0.6875 1.828125-1.859375
+            android:name="two"
+            android:fillColor="#ffff00"
+            android:fillAlpha="0"
+            android:pathData="M 2.534375,9.6875l 4.140625,0.0 0.0,1.0-5.5625,0.0 0.0-1.0q 0.671875-0.6875 1.828125-1.859375
                         q 1.1718752-1.1875 1.4687502-1.53125 0.578125-0.625 0.796875-1.0625
                         q 0.234375-0.453125 0.234375-0.875 0.0-0.703125-0.5-1.140625
                         q-0.484375-0.4375-1.2656252-0.4375-0.5625,0.0-1.1875,0.1875
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable06.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable06.xml
index 24173e2..4b530fd 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable06.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable06.xml
@@ -13,37 +13,36 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-            auto:width="64dp"
-            auto:height="64dp"
-            auto:viewportWidth="700"
-            auto:viewportHeight="700">
+            android:width="64dp"
+            android:height="64dp"
+            android:viewportWidth="700"
+            android:viewportHeight="700">
 
     <group>
-        <path auto:pathData="M 569.374 461.472L 569.374 160.658L 160.658 160.658L 160.658 461.472L 569.374 461.472z"
-              auto:name="path2451"
-              auto:fillColor="#00000000"
-              auto:strokeColor="#FF000000"
-              auto:strokeWidth="30.65500000000000"/>
-        <path auto:pathData="M 365.015 311.066"
-              auto:name="path2453"
-              auto:fillColor="#00000000"
-              auto:strokeColor="#FF000000"
-              auto:strokeWidth="30.655000000000001"/>
-        <path auto:pathData="M 164.46 164.49L 340.78 343.158C 353.849 356.328 377.63 356.172 390.423 343.278L 566.622 165.928"
-              auto:name="path2455"
-              auto:strokeColor="#FF000000"
-              auto:fillColor="#FFFFFFFF"
-              auto:strokeWidth="30.655000000000001"/>
-        <path auto:pathData="M 170.515 451.566L 305.61 313.46"
-              auto:name="path2457"
-              auto:fillColor="#00000000"
-              auto:strokeColor="#000000"
-              auto:strokeWidth="30.655000000000001"/>
-        <path auto:pathData="M 557.968 449.974L 426.515 315.375"
-              auto:name="path2459"
-              auto:fillColor="#00000000"
-              auto:strokeColor="#000000"
-              auto:strokeWidth="30.655000000000001"/>
+        <path android:pathData="M 569.374 461.472L 569.374 160.658L 160.658 160.658L 160.658 461.472L 569.374 461.472z"
+              android:name="path2451"
+              android:fillColor="#00000000"
+              android:strokeColor="#FF000000"
+              android:strokeWidth="30.65500000000000"/>
+        <path android:pathData="M 365.015 311.066"
+              android:name="path2453"
+              android:fillColor="#00000000"
+              android:strokeColor="#FF000000"
+              android:strokeWidth="30.655000000000001"/>
+        <path android:pathData="M 164.46 164.49L 340.78 343.158C 353.849 356.328 377.63 356.172 390.423 343.278L 566.622 165.928"
+              android:name="path2455"
+              android:strokeColor="#FF000000"
+              android:fillColor="#FFFFFFFF"
+              android:strokeWidth="30.655000000000001"/>
+        <path android:pathData="M 170.515 451.566L 305.61 313.46"
+              android:name="path2457"
+              android:fillColor="#00000000"
+              android:strokeColor="#000000"
+              android:strokeWidth="30.655000000000001"/>
+        <path android:pathData="M 557.968 449.974L 426.515 315.375"
+              android:name="path2459"
+              android:fillColor="#00000000"
+              android:strokeColor="#000000"
+              android:strokeWidth="30.655000000000001"/>
     </group>
 </vector>
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable07.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable07.xml
index 90435d3..bbf2451 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable07.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable07.xml
@@ -13,18 +13,17 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-            auto:width="64dp"
-            auto:height="64dp" auto:viewportWidth="140"
-          auto:viewportHeight="110">
+            android:width="64dp"
+            android:height="64dp" android:viewportWidth="140"
+          android:viewportHeight="110">
 
     <group>
         <path
-                auto:name="back"
-                auto:pathData="M 20,55 l 35.3-35.3 7.07,7.07-35.3,35.3 z
+                android:name="back"
+                android:pathData="M 20,55 l 35.3-35.3 7.07,7.07-35.3,35.3 z
               M 27,50 l 97,0 0,10-97,0 z
               M 20,55 l 7.07-7.07 35.3,35.3-7.07,7.07 z"
-                auto:fillColor="#ffffffff"
+                android:fillColor="#ffffffff"
                 />
     </group>
 </vector>
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable08.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable08.xml
index 251d694..e5b59df 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable08.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable08.xml
@@ -13,18 +13,17 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-            auto:width="64dp"
-            auto:height="64dp" auto:viewportWidth="600"
-          auto:viewportHeight="600">
+            android:width="64dp"
+            android:height="64dp" android:viewportWidth="600"
+          android:viewportHeight="600">
 
     <group>
         <path
-                auto:name="pie1"
-                auto:pathData="M535.441,412.339A280.868,280.868 0 1,1 536.186,161.733L284.493,286.29Z"
-                auto:fillColor="#ffffcc00"
-                auto:strokeColor="#FF00FF00"
-                auto:strokeWidth="1"/>
+                android:name="pie1"
+                android:pathData="M535.441,412.339A280.868,280.868 0 1,1 536.186,161.733L284.493,286.29Z"
+                android:fillColor="#ffffcc00"
+                android:strokeColor="#FF00FF00"
+                android:strokeWidth="1"/>
     </group>
 
 </vector>
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable09.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable09.xml
index eccb0d0..ce2441d 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable09.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable09.xml
@@ -14,20 +14,19 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-        auto:height="64dp"
-        auto:width="64dp"
-        auto:viewportHeight="200"
-        auto:viewportWidth="200" >
+        android:height="64dp"
+        android:width="64dp"
+        android:viewportHeight="200"
+        android:viewportWidth="200" >
 
     <group
-        auto:pivotX="100"
-        auto:pivotY="100"
-        auto:rotation="90">
+        android:pivotX="100"
+        android:pivotY="100"
+        android:rotation="90">
         <path
-            auto:name="house"
-            auto:fillColor="#ffffffff"
-            auto:pathData="M 100,20 l 0,0 0,140-80,0 z M 100,20 l 0,0 80,140-80,0 z"/>
+            android:name="house"
+            android:fillColor="#ffffffff"
+            android:pathData="M 100,20 l 0,0 0,140-80,0 z M 100,20 l 0,0 80,140-80,0 z"/>
     </group>
 
 </vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable10.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable10.xml
index b26d30d..935d4a5 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable10.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable10.xml
@@ -15,29 +15,28 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-        auto:height="64dp"
-        auto:width="64dp"
-        auto:viewportWidth="200"
-        auto:viewportHeight="200">
+        android:height="64dp"
+        android:width="64dp"
+        android:viewportWidth="200"
+        android:viewportHeight="200">
 
     <group>
         <path
-            auto:name="bar3"
-            auto:fillColor="#FFFFFFFF"
-            auto:pathData="M49.001,60c-5.466,0-9.899,4.478-9.899,10s4.434,10,9.899,10c5.468,0,9.899-4.478,9.899-10S54.469,60,49.001,60z" />
+            android:name="bar3"
+            android:fillColor="#FFFFFFFF"
+            android:pathData="M49.001,60c-5.466,0-9.899,4.478-9.899,10s4.434,10,9.899,10c5.468,0,9.899-4.478,9.899-10S54.469,60,49.001,60z" />
         <path
-            auto:name="bar2"
-            auto:fillColor="#FFFFFFFF"
-            auto:pathData="M28.001,48.787l7,7.07c7.731-7.811,20.269-7.81,28.001,0l6.999-7.07C58.403,37.071,39.599,37.071,28.001,48.787z" />
+            android:name="bar2"
+            android:fillColor="#FFFFFFFF"
+            android:pathData="M28.001,48.787l7,7.07c7.731-7.811,20.269-7.81,28.001,0l6.999-7.07C58.403,37.071,39.599,37.071,28.001,48.787z" />
         <path
-            auto:name="bar1"
-            auto:fillColor="#FF555555"
-            auto:pathData="M14.001,34.645   L21,41.716c15.464-15.621,40.536-15.621,56,0l7.001-7.071C64.672,15.119,33.33,15.119,14.001,34.645z" />
+            android:name="bar1"
+            android:fillColor="#FF555555"
+            android:pathData="M14.001,34.645   L21,41.716c15.464-15.621,40.536-15.621,56,0l7.001-7.071C64.672,15.119,33.33,15.119,14.001,34.645z" />
         <path
-            auto:name="bar0"
-            auto:fillColor="#FF555555"
-            auto:pathData="M0,20.502l6.999,7.071   c23.196-23.431,60.806-23.431,84.002,0L98,20.503C70.938-6.834,27.063-6.834,0,20.502z" />
+            android:name="bar0"
+            android:fillColor="#FF555555"
+            android:pathData="M0,20.502l6.999,7.071   c23.196-23.431,60.806-23.431,84.002,0L98,20.503C70.938-6.834,27.063-6.834,0,20.502z" />
     </group>
 
 </vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable11.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable11.xml
index eb440f5..05f481b 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable11.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable11.xml
@@ -14,23 +14,22 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-        auto:height="64dp"
-        auto:width="64dp"
-        auto:viewportHeight="80"
-        auto:viewportWidth="40" >
+        android:height="64dp"
+        android:width="64dp"
+        android:viewportHeight="80"
+        android:viewportWidth="40" >
 
     <group>
         <path
-            auto:name="battery"
-            auto:fillColor="#3388ff"
-            auto:pathData="M 20.28125,2.0000002 C 17.352748,2.0000002 15,4.3527485 15,7.2812502 L 15,8.0000002 L 13.15625,8.0000002 C 9.7507553,8.0000002 7,10.750759 7,14.15625 L 7,39.84375 C 7,43.24924 9.7507558,46 13.15625,46 L 33.84375,46 C 37.249245,46 39.999999,43.24924 40,39.84375 L 40,14.15625 C 40,10.75076 37.249243,8.0000002 33.84375,8.0000002 L 32,8.0000002 L 32,7.2812502 C 32,4.3527485 29.647252,2.0000002 26.71875,2.0000002 L 20.28125,2.0000002 z"
-            auto:strokeColor="#ff8833"
-            auto:strokeWidth="1" />
+            android:name="battery"
+            android:fillColor="#3388ff"
+            android:pathData="M 20.28125,2.0000002 C 17.352748,2.0000002 15,4.3527485 15,7.2812502 L 15,8.0000002 L 13.15625,8.0000002 C 9.7507553,8.0000002 7,10.750759 7,14.15625 L 7,39.84375 C 7,43.24924 9.7507558,46 13.15625,46 L 33.84375,46 C 37.249245,46 39.999999,43.24924 40,39.84375 L 40,14.15625 C 40,10.75076 37.249243,8.0000002 33.84375,8.0000002 L 32,8.0000002 L 32,7.2812502 C 32,4.3527485 29.647252,2.0000002 26.71875,2.0000002 L 20.28125,2.0000002 z"
+            android:strokeColor="#ff8833"
+            android:strokeWidth="1" />
         <path
-            auto:name="spark"
-            auto:fillColor="#FFFF0000"
-            auto:pathData="M 30,18.031528 L 25.579581,23.421071 L 29.370621,26.765348 L 20.096792,37 L 21.156922,28.014053 L 17,24.902844 L 20.880632,18 L 30,18.031528 z" />
+            android:name="spark"
+            android:fillColor="#FFFF0000"
+            android:pathData="M 30,18.031528 L 25.579581,23.421071 L 29.370621,26.765348 L 20.096792,37 L 21.156922,28.014053 L 17,24.902844 L 20.880632,18 L 30,18.031528 z" />
     </group>
 
 </vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable12.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable12.xml
index 94a23e8..94338a7 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable12.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable12.xml
@@ -14,79 +14,78 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-        auto:name="rootGroup"
-        auto:height="64dp"
-        auto:width="64dp"
-        auto:viewportHeight="600"
-        auto:viewportWidth="600"
-        auto:alpha="0.5" >
+        android:name="rootGroup"
+        android:height="64dp"
+        android:width="64dp"
+        android:viewportHeight="600"
+        android:viewportWidth="600"
+        android:alpha="0.5" >
 
     <group
-        auto:name="rotationGroup"
-        auto:pivotX="300.0"
-        auto:pivotY="300.0"
-        auto:rotation="45.0" >
+        android:name="rotationGroup"
+        android:pivotX="300.0"
+        android:pivotY="300.0"
+        android:rotation="45.0" >
         <path
-            auto:name="pie1"
-            auto:fillColor="#00000000"
-            auto:pathData="M300,70 a230,230 0 1,0 1,0 z"
-            auto:strokeColor="#FF777777"
-            auto:strokeWidth="70"
-            auto:trimPathEnd=".75"
-            auto:trimPathOffset="0"
-            auto:trimPathStart="0" />
+            android:name="pie1"
+            android:fillColor="#00000000"
+            android:pathData="M300,70 a230,230 0 1,0 1,0 z"
+            android:strokeColor="#FF777777"
+            android:strokeWidth="70"
+            android:trimPathEnd=".75"
+            android:trimPathOffset="0"
+            android:trimPathStart="0" />
         <path
-            auto:name="v"
-            auto:fillColor="#000000"
-            auto:pathData="M300,70 l 0,-70 70,70 0,0 -70,70z" />
+            android:name="v"
+            android:fillColor="#000000"
+            android:pathData="M300,70 l 0,-70 70,70 0,0 -70,70z" />
 
         <group
-            auto:name="translateToCenterGroup"
-            auto:rotation="0.0"
-            auto:translateX="200.0"
-            auto:translateY="200.0" >
+            android:name="translateToCenterGroup"
+            android:rotation="0.0"
+            android:translateX="200.0"
+            android:translateY="200.0" >
             <group
-                auto:name="rotationGroup2"
-                auto:pivotX="0.0"
-                auto:pivotY="0.0"
-                auto:rotation="-45.0" >
+                android:name="rotationGroup2"
+                android:pivotX="0.0"
+                android:pivotY="0.0"
+                android:rotation="-45.0" >
                 <path
-                    auto:name="twoLines1"
-                    auto:pathData="@string/twoLinePathData"
-                    auto:strokeColor="#FFFF0000"
-                    auto:strokeWidth="20" />
+                    android:name="twoLines1"
+                    android:pathData="@string/twoLinePathData"
+                    android:strokeColor="#FFFF0000"
+                    android:strokeWidth="20" />
 
                 <group
-                    auto:name="translateGroupHalf"
-                    auto:translateX="65.0"
-                    auto:translateY="80.0" >
+                    android:name="translateGroupHalf"
+                    android:translateX="65.0"
+                    android:translateY="80.0" >
                     <group
-                        auto:name="rotationGroup3"
-                        auto:pivotX="-65.0"
-                        auto:pivotY="-80.0"
-                        auto:rotation="-45.0" >
+                        android:name="rotationGroup3"
+                        android:pivotX="-65.0"
+                        android:pivotY="-80.0"
+                        android:rotation="-45.0" >
                         <path
-                            auto:name="twoLines2"
-                            auto:fillColor="#FF00FF00"
-                            auto:pathData="@string/twoLinePathData"
-                            auto:strokeColor="#FF00FF00"
-                            auto:strokeWidth="20" />
+                            android:name="twoLines2"
+                            android:fillColor="#FF00FF00"
+                            android:pathData="@string/twoLinePathData"
+                            android:strokeColor="#FF00FF00"
+                            android:strokeWidth="20" />
 
                         <group
-                            auto:name="translateGroup"
-                            auto:translateX="65.0"
-                            auto:translateY="80.0" >
+                            android:name="translateGroup"
+                            android:translateX="65.0"
+                            android:translateY="80.0" >
                             <group
-                                auto:name="rotationGroupBlue"
-                                auto:pivotX="-65.0"
-                                auto:pivotY="-80.0"
-                                auto:rotation="-45.0" >
+                                android:name="rotationGroupBlue"
+                                android:pivotX="-65.0"
+                                android:pivotY="-80.0"
+                                android:rotation="-45.0" >
                                 <path
-                                    auto:name="twoLines3"
-                                    auto:pathData="@string/twoLinePathData"
-                                    auto:strokeColor="#FF0000FF"
-                                    auto:strokeWidth="20" />
+                                    android:name="twoLines3"
+                                    android:pathData="@string/twoLinePathData"
+                                    android:strokeColor="#FF0000FF"
+                                    android:strokeWidth="20" />
                             </group>
                         </group>
                     </group>
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable13.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable13.xml
index 43fc7ea..097e028 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable13.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable13.xml
@@ -14,25 +14,24 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-        auto:height="64dp"
-        auto:width="64dp"
-        auto:viewportHeight="400"
-        auto:viewportWidth="600" >
+        android:height="64dp"
+        android:width="64dp"
+        android:viewportHeight="400"
+        android:viewportWidth="600" >
 
     <group>
         <path
-            auto:name="pie1"
-            auto:fillColor="#ffffffff"
-            auto:pathData="M300,200 h-150 a150,150 0 1,0 150,-150 z"
-            auto:strokeColor="#FF00FF00"
-            auto:strokeWidth="1" />
+            android:name="pie1"
+            android:fillColor="#ffffffff"
+            android:pathData="M300,200 h-150 a150,150 0 1,0 150,-150 z"
+            android:strokeColor="#FF00FF00"
+            android:strokeWidth="1" />
         <path
-            auto:name="half"
-            auto:fillColor="#FFFF0000"
-            auto:pathData="M275,175 v-150 a150,150 0 0,0 -150,150 z"
-            auto:strokeColor="#FF0000FF"
-            auto:strokeWidth="5" />
+            android:name="half"
+            android:fillColor="#FFFF0000"
+            android:pathData="M275,175 v-150 a150,150 0 0,0 -150,150 z"
+            android:strokeColor="#FF0000FF"
+            android:strokeWidth="5" />
     </group>
 
 </vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable14.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable14.xml
index 5b4fdd1..102ae7a 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable14.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable14.xml
@@ -14,26 +14,25 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-        auto:height="64dp"
-        auto:width="64dp"
-        auto:viewportHeight="500"
-        auto:viewportWidth="800" >
+        android:height="64dp"
+        android:width="64dp"
+        android:viewportHeight="500"
+        android:viewportWidth="800" >
 
     <group
-        auto:pivotX="90"
-        auto:pivotY="100"
-        auto:rotation="20">
+        android:pivotX="90"
+        android:pivotY="100"
+        android:rotation="20">
         <path
-            auto:name="pie2"
-            auto:pathData="M200,350 l 50,-25
+            android:name="pie2"
+            android:pathData="M200,350 l 50,-25
            a25,12 -30 0,1 100,-50 l 50,-25
            a25,25 -30 0,1 100,-50 l 50,-25
            a25,37 -30 0,1 100,-50 l 50,-25
            a25,50 -30 0,1 100,-50 l 50,-25"
-            auto:fillColor="#00000000"
-            auto:strokeColor="#FF00FF00"
-            auto:strokeWidth="10" />
+            android:fillColor="#00000000"
+            android:strokeColor="#FF00FF00"
+            android:strokeWidth="10" />
     </group>
 
 </vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable15.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable15.xml
index f4ef87f..bdfcf81 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable15.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable15.xml
@@ -14,22 +14,21 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-        auto:height="64dp"
-        auto:width="64dp"
-        auto:viewportHeight="400"
-        auto:viewportWidth="500" >
+        android:height="64dp"
+        android:width="64dp"
+        android:viewportHeight="400"
+        android:viewportWidth="500" >
 
     <group
-        auto:pivotX="250"
-        auto:pivotY="200"
-        auto:rotation="180">
+        android:pivotX="250"
+        android:pivotY="200"
+        android:rotation="180">
         <path
-            auto:name="house"
-            auto:fillColor="#ff440000"
-            auto:pathData="M100,200 C100,100 250,100 250,200 S400,300 400,200"
-            auto:strokeColor="#FFFF0000"
-            auto:strokeWidth="10" />
+            android:name="house"
+            android:fillColor="#ff440000"
+            android:pathData="M100,200 C100,100 250,100 250,200 S400,300 400,200"
+            android:strokeColor="#FFFF0000"
+            android:strokeWidth="10" />
     </group>
 
 </vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable16.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable16.xml
index 0c64bca..ed1efa0 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable16.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable16.xml
@@ -14,35 +14,34 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-        auto:height="64dp"
-        auto:width="64dp"
-        auto:viewportHeight="200"
-        auto:viewportWidth="200" >
+        android:height="64dp"
+        android:width="64dp"
+        android:viewportHeight="200"
+        android:viewportWidth="200" >
 
     <group>
         <path
-            auto:name="background1"
-            auto:pathData="M 0,0 l 100,0 l 0, 100 l -100, 0 z"
-            auto:fillColor="#FF000000"/>
+            android:name="background1"
+            android:pathData="M 0,0 l 100,0 l 0, 100 l -100, 0 z"
+            android:fillColor="#FF000000"/>
         <path
-            auto:name="background2"
-            auto:pathData="M 100,100 l 100,0 l 0, 100 l -100, 0 z"
-            auto:fillColor="#FF000000"/>
+            android:name="background2"
+            android:pathData="M 100,100 l 100,0 l 0, 100 l -100, 0 z"
+            android:fillColor="#FF000000"/>
     </group>
     <group
-        auto:pivotX="100"
-        auto:pivotY="100"
-        auto:rotation="90"
-        auto:scaleX="0.75"
-        auto:scaleY="0.5"
-        auto:translateX="0.0"
-        auto:translateY="100.0">
+        android:pivotX="100"
+        android:pivotY="100"
+        android:rotation="90"
+        android:scaleX="0.75"
+        android:scaleY="0.5"
+        android:translateX="0.0"
+        android:translateY="100.0">
         <path
-            auto:name="twoLines"
-            auto:pathData="M 100,10 v 90 M 10,100 h 90"
-            auto:strokeColor="#FF00FF00"
-            auto:strokeWidth="10" />
+            android:name="twoLines"
+            android:pathData="M 100,10 v 90 M 10,100 h 90"
+            android:strokeColor="#FF00FF00"
+            android:strokeWidth="10" />
     </group>
 
 </vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable17.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable17.xml
index 28cf09a..ba15f41 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable17.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable17.xml
@@ -13,18 +13,17 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-            auto:width="64dp"
-            auto:height="64dp" auto:viewportWidth="1200"
-          auto:viewportHeight="600">
+            android:width="64dp"
+            android:height="64dp" android:viewportWidth="1200"
+          android:viewportHeight="600">
 
     <group>
         <path
-                auto:name="house"
-                auto:pathData="M200,300 Q400,50 600,300 T1000,300"
-                auto:fillColor="#00000000"
-                auto:strokeColor="#FFFF0000"
-                auto:strokeWidth="10"/>
+                android:name="house"
+                android:pathData="M200,300 Q400,50 600,300 T1000,300"
+                android:fillColor="#00000000"
+                android:strokeColor="#FFFF0000"
+                android:strokeWidth="10"/>
     </group>
 
 </vector>
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable18.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable18.xml
index d66d4ff..ee2122a 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable18.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable18.xml
@@ -14,19 +14,18 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-        auto:height="64dp"
-        auto:width="64dp"
-        auto:viewportHeight="400"
-        auto:viewportWidth="500" >
+        android:height="64dp"
+        android:width="64dp"
+        android:viewportHeight="400"
+        android:viewportWidth="500" >
 
     <group>
         <path
-            auto:name="house"
-            auto:pathData="M100,200 C100,100 250,100 250,200 S400,300 400,200"
-            auto:fillColor="#00000000"
-            auto:strokeColor="#FFFFFF00"
-            auto:strokeWidth="10" />
+            android:name="house"
+            android:pathData="M100,200 C100,100 250,100 250,200 S400,300 400,200"
+            android:fillColor="#00000000"
+            android:strokeColor="#FFFFFF00"
+            android:strokeWidth="10" />
     </group>
 
 </vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable19.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable19.xml
index 3a6559d..b98e1de 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable19.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable19.xml
@@ -14,21 +14,20 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-        auto:height="64dp"
-        auto:width="64dp"
-        auto:viewportHeight="800"
-        auto:viewportWidth="1000" >
+        android:height="64dp"
+        android:width="64dp"
+        android:viewportHeight="800"
+        android:viewportWidth="1000" >
 
     <group>
         <path
-            auto:name="house"
-            auto:pathData="M10,300 Q400,550 600,300 T1000,300"
-            auto:pivotX="90"
-            auto:pivotY="100"
-            auto:fillColor="#00000000"
-            auto:strokeColor="#FFFF0000"
-            auto:strokeWidth="60" />
+            android:name="house"
+            android:pathData="M10,300 Q400,550 600,300 T1000,300"
+            android:pivotX="90"
+            android:pivotY="100"
+            android:fillColor="#00000000"
+            android:strokeColor="#FFFF0000"
+            android:strokeWidth="60" />
     </group>
 
 </vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable20.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable20.xml
index d6fd704..1c86818 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable20.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable20.xml
@@ -14,22 +14,21 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-        auto:height="64dp"
-        auto:width="64dp"
-        auto:viewportHeight="480"
-        auto:viewportWidth="480" >
+        android:height="64dp"
+        android:width="64dp"
+        android:viewportHeight="480"
+        android:viewportWidth="480" >
 
     <group>
         <path
-            auto:name="edit"
-            auto:fillColor="#FF00FFFF"
-            auto:pathData="M406.667,180c0,0 -100 -100 -113.334 -113.333
+            android:name="edit"
+            android:fillColor="#FF00FFFF"
+            android:pathData="M406.667,180c0,0 -100 -100 -113.334 -113.333
     c-13.333 -13.334 -33.333,0 -33.333,0l-160,160c0,0 -40,153.333 -40,173.333c0,13.333,13.333,13.333,13.333,13.333l173.334 -40
     c0,0,146.666 -146.666,160 -160C420,200,406.667,180,406.667,180z M226.399,356.823L131.95,378.62l-38.516 -38.522
     c7.848 -34.675,20.152 -82.52,23.538 -95.593l3.027,2.162l106.667,106.666L226.399,356.823z"
-            auto:strokeColor="#FF000000"
-            auto:strokeWidth="10" />
+            android:strokeColor="#FF000000"
+            android:strokeWidth="10" />
     </group>
 
 </vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable21.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable21.xml
index 9136b73..247f6bc 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable21.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable21.xml
@@ -14,35 +14,34 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-        auto:height="64dp"
-        auto:width="64dp"
-        auto:viewportHeight="200"
-        auto:viewportWidth="200" >
+        android:height="64dp"
+        android:width="64dp"
+        android:viewportHeight="200"
+        android:viewportWidth="200" >
 
     <group>
         <path
-            auto:name="background1"
-            auto:pathData="M 0,0 l 100,0 l 0, 100 l -100, 0 z"
-            auto:fillColor="#FF000000"/>
+            android:name="background1"
+            android:pathData="M 0,0 l 100,0 l 0, 100 l -100, 0 z"
+            android:fillColor="#FF000000"/>
         <path
-            auto:name="background2"
-            auto:pathData="M 100,100 l 100,0 l 0, 100 l -100, 0 z"
-            auto:fillColor="#FF000000"/>
+            android:name="background2"
+            android:pathData="M 100,100 l 100,0 l 0, 100 l -100, 0 z"
+            android:fillColor="#FF000000"/>
     </group>
     <group
-        auto:pivotX="0"
-        auto:pivotY="0"
-        auto:rotation="90"
-        auto:scaleX="0.75"
-        auto:scaleY="0.5"
-        auto:translateX="100.0"
-        auto:translateY="100.0">
+        android:pivotX="0"
+        android:pivotY="0"
+        android:rotation="90"
+        android:scaleX="0.75"
+        android:scaleY="0.5"
+        android:translateX="100.0"
+        android:translateY="100.0">
         <path
-            auto:name="twoLines"
-            auto:pathData="M 100,10 v 90 M 10,100 h 90"
-            auto:strokeColor="#FF00FF00"
-            auto:strokeWidth="10" />
+            android:name="twoLines"
+            android:pathData="M 100,10 v 90 M 10,100 h 90"
+            android:strokeColor="#FF00FF00"
+            android:strokeWidth="10" />
     </group>
 
 </vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable22.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable22.xml
index 2b33a89..39d891f 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable22.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable22.xml
@@ -14,53 +14,52 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-        auto:height="64dp"
-        auto:width="64dp"
-        auto:viewportHeight="400"
-        auto:viewportWidth="400" >
+        android:height="64dp"
+        android:width="64dp"
+        android:viewportHeight="400"
+        android:viewportWidth="400" >
 
-    <group auto:name="backgroundGroup" >
+    <group android:name="backgroundGroup" >
         <path
-            auto:name="background1"
-            auto:fillColor="#80000000"
-            auto:pathData="M 0,0 l 200,0 l 0, 200 l -200, 0 z" />
+            android:name="background1"
+            android:fillColor="#80000000"
+            android:pathData="M 0,0 l 200,0 l 0, 200 l -200, 0 z" />
         <path
-            auto:name="background2"
-            auto:fillColor="#80000000"
-            auto:pathData="M 200,200 l 200,0 l 0, 200 l -200, 0 z" />
+            android:name="background2"
+            android:fillColor="#80000000"
+            android:pathData="M 200,200 l 200,0 l 0, 200 l -200, 0 z" />
     </group>
     <group
-        auto:name="translateToCenterGroup"
-        auto:translateX="50.0"
-        auto:translateY="90.0" >
+        android:name="translateToCenterGroup"
+        android:translateX="50.0"
+        android:translateY="90.0" >
         <path
-            auto:name="twoLines"
-            auto:pathData="M 0,0 v 100 M 0,0 h 100"
-            auto:strokeColor="#FFFF0000"
-            auto:strokeWidth="20" />
+            android:name="twoLines"
+            android:pathData="M 0,0 v 100 M 0,0 h 100"
+            android:strokeColor="#FFFF0000"
+            android:strokeWidth="20" />
 
         <group
-            auto:name="rotationGroup"
-            auto:pivotX="0.0"
-            auto:pivotY="0.0"
-            auto:rotation="-45.0" >
+            android:name="rotationGroup"
+            android:pivotX="0.0"
+            android:pivotY="0.0"
+            android:rotation="-45.0" >
             <path
-                auto:name="twoLines1"
-                auto:pathData="M 0,0 v 100 M 0,0 h 100"
-                auto:strokeColor="#FF00FF00"
-                auto:strokeWidth="20" />
+                android:name="twoLines1"
+                android:pathData="M 0,0 v 100 M 0,0 h 100"
+                android:strokeColor="#FF00FF00"
+                android:strokeWidth="20" />
 
             <group
-                auto:name="translateGroup"
-                auto:translateX="130.0"
-                auto:translateY="160.0" >
-                <group auto:name="scaleGroup" >
+                android:name="translateGroup"
+                android:translateX="130.0"
+                android:translateY="160.0" >
+                <group android:name="scaleGroup" >
                     <path
-                        auto:name="twoLines2"
-                        auto:pathData="M 0,0 v 100 M 0,0 h 100"
-                        auto:strokeColor="#FF0000FF"
-                        auto:strokeWidth="20" />
+                        android:name="twoLines2"
+                        android:pathData="M 0,0 v 100 M 0,0 h 100"
+                        android:strokeColor="#FF0000FF"
+                        android:strokeWidth="20" />
                 </group>
             </group>
         </group>
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable23.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable23.xml
index d5759f9..4a1c062 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable23.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable23.xml
@@ -14,67 +14,66 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-        auto:height="64dp"
-        auto:width="64dp"
-        auto:viewportHeight="400"
-        auto:viewportWidth="400" >
+        android:height="64dp"
+        android:width="64dp"
+        android:viewportHeight="400"
+        android:viewportWidth="400" >
 
-    <group auto:name="backgroundGroup" >
+    <group android:name="backgroundGroup" >
         <path
-            auto:name="background1"
-            auto:fillColor="#80000000"
-            auto:pathData="M 0,0 l 200,0 l 0, 200 l -200, 0 z" />
+            android:name="background1"
+            android:fillColor="#80000000"
+            android:pathData="M 0,0 l 200,0 l 0, 200 l -200, 0 z" />
         <path
-            auto:name="background2"
-            auto:fillColor="#80000000"
-            auto:pathData="M 200,200 l 200,0 l 0, 200 l -200, 0 z" />
+            android:name="background2"
+            android:fillColor="#80000000"
+            android:pathData="M 200,200 l 200,0 l 0, 200 l -200, 0 z" />
     </group>
     <group
-        auto:name="translateToCenterGroup"
-        auto:translateX="50.0"
-        auto:translateY="90.0" >
+        android:name="translateToCenterGroup"
+        android:translateX="50.0"
+        android:translateY="90.0" >
         <path
-            auto:name="twoLines"
-            auto:pathData="@string/twoLinePathData"
-            auto:strokeColor="#FFFF0000"
-            auto:strokeWidth="20" />
+            android:name="twoLines"
+            android:pathData="@string/twoLinePathData"
+            android:strokeColor="#FFFF0000"
+            android:strokeWidth="20" />
 
         <group
-            auto:name="rotationGroup"
-            auto:pivotX="0.0"
-            auto:pivotY="0.0"
-            auto:rotation="-45.0" >
+            android:name="rotationGroup"
+            android:pivotX="0.0"
+            android:pivotY="0.0"
+            android:rotation="-45.0" >
             <path
-                auto:name="twoLines1"
-                auto:pathData="@string/twoLinePathData"
-                auto:strokeColor="#FF00FF00"
-                auto:strokeWidth="20" />
+                android:name="twoLines1"
+                android:pathData="@string/twoLinePathData"
+                android:strokeColor="#FF00FF00"
+                android:strokeWidth="20" />
 
             <group
-                auto:name="translateGroup"
-                auto:translateX="130.0"
-                auto:translateY="160.0" >
-                <group auto:name="scaleGroup" >
+                android:name="translateGroup"
+                android:translateX="130.0"
+                android:translateY="160.0" >
+                <group android:name="scaleGroup" >
                     <path
-                        auto:name="twoLines3"
-                        auto:pathData="@string/twoLinePathData"
-                        auto:strokeColor="#FF0000FF"
-                        auto:strokeWidth="20" />
+                        android:name="twoLines3"
+                        android:pathData="@string/twoLinePathData"
+                        android:strokeColor="#FF0000FF"
+                        android:strokeWidth="20" />
                 </group>
             </group>
 
             <group
-                auto:name="translateGroupHalf"
-                auto:translateX="65.0"
-                auto:translateY="80.0" >
-                <group auto:name="scaleGroup" >
+                android:name="translateGroupHalf"
+                android:translateX="65.0"
+                android:translateY="80.0" >
+                <group android:name="scaleGroup" >
                     <path
-                        auto:name="twoLines2"
-                        auto:pathData="@string/twoLinePathData"
-                        auto:fillColor="#FFFFFFFF"
-                        auto:strokeColor="#FFFFFFFF"
-                        auto:strokeWidth="20" />
+                        android:name="twoLines2"
+                        android:pathData="@string/twoLinePathData"
+                        android:fillColor="?android:attr/colorForeground"
+                        android:strokeColor="?android:attr/colorForeground"
+                        android:strokeWidth="20" />
                 </group>
             </group>
         </group>
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable24.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable24.xml
index b054692..a7a8bd3 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable24.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable24.xml
@@ -14,67 +14,66 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-        auto:height="64dp"
-        auto:width="64dp"
-        auto:viewportHeight="400"
-        auto:viewportWidth="400" >
+        android:height="64dp"
+        android:width="64dp"
+        android:viewportHeight="400"
+        android:viewportWidth="400" >
 
-    <group auto:name="backgroundGroup">
+    <group android:name="backgroundGroup">
         <path
-            auto:name="background1"
-            auto:fillColor="#FF000000"
-            auto:pathData="M 0,0 l 200,0 l 0, 200 l -200, 0 z" />
+            android:name="background1"
+            android:fillColor="#FF000000"
+            android:pathData="M 0,0 l 200,0 l 0, 200 l -200, 0 z" />
         <path
-            auto:name="background2"
-            auto:fillColor="#FF000000"
-            auto:pathData="M 200,200 l 200,0 l 0, 200 l -200, 0 z" />
+            android:name="background2"
+            android:fillColor="#FF000000"
+            android:pathData="M 200,200 l 200,0 l 0, 200 l -200, 0 z" />
     </group>
     <group
-        auto:name="translateToCenterGroup"
-        auto:translateX="50.0"
-        auto:translateY="90.0" >
+        android:name="translateToCenterGroup"
+        android:translateX="50.0"
+        android:translateY="90.0" >
         <path
-            auto:name="twoLines"
-            auto:pathData="@string/twoLinePathData"
-            auto:strokeColor="#FFFF0000"
-            auto:strokeWidth="20" />
+            android:name="twoLines"
+            android:pathData="@string/twoLinePathData"
+            android:strokeColor="#FFFF0000"
+            android:strokeWidth="20" />
 
         <group
-            auto:name="rotationGroup"
-            auto:pivotX="0.0"
-            auto:pivotY="0.0"
-            auto:rotation="-45.0">
+            android:name="rotationGroup"
+            android:pivotX="0.0"
+            android:pivotY="0.0"
+            android:rotation="-45.0">
             <path
-                auto:name="twoLines1"
-                auto:pathData="@string/twoLinePathData"
-                auto:strokeColor="#FF00FF00"
-                auto:strokeWidth="20" />
+                android:name="twoLines1"
+                android:pathData="@string/twoLinePathData"
+                android:strokeColor="#FF00FF00"
+                android:strokeWidth="20" />
 
             <group
-                auto:name="translateGroup"
-                auto:translateX="130.0"
-                auto:translateY="160.0">
-                <group auto:name="scaleGroup" >
+                android:name="translateGroup"
+                android:translateX="130.0"
+                android:translateY="160.0">
+                <group android:name="scaleGroup" >
                     <path
-                        auto:name="twoLines3"
-                        auto:pathData="@string/twoLinePathData"
-                        auto:strokeColor="#FF0000FF"
-                        auto:strokeWidth="20" />
+                        android:name="twoLines3"
+                        android:pathData="@string/twoLinePathData"
+                        android:strokeColor="#FF0000FF"
+                        android:strokeWidth="20" />
                 </group>
             </group>
 
             <group
-                auto:name="translateGroupHalf"
-                auto:translateX="65.0"
-                auto:translateY="80.0">
-                <group auto:name="scaleGroup" >
+                android:name="translateGroupHalf"
+                android:translateX="65.0"
+                android:translateY="80.0">
+                <group android:name="scaleGroup" >
                     <path
-                        auto:name="twoLines2"
-                        auto:pathData="@string/twoLinePathData"
-                        auto:fillColor="#FFFFFFFF"
-                        auto:strokeColor="#FFFFFFFF"
-                        auto:strokeWidth="20" />
+                        android:name="twoLines2"
+                        android:pathData="@string/twoLinePathData"
+                        android:fillColor="?android:attr/colorForeground"
+                        android:strokeColor="?android:attr/colorForeground"
+                        android:strokeWidth="20" />
                 </group>
             </group>
         </group>
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable25.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable25.xml
index 7a94ed6..7c9e771 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable25.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable25.xml
@@ -14,70 +14,69 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-        auto:height="64dp"
-        auto:width="64dp"
-        auto:viewportHeight="400"
-        auto:viewportWidth="400" >
+        android:height="64dp"
+        android:width="64dp"
+        android:viewportHeight="400"
+        android:viewportWidth="400" >
 
     <group
-        auto:name="FirstLevelGroup"
-        auto:translateX="100.0"
-        auto:translateY="0.0" >
+        android:name="FirstLevelGroup"
+        android:translateX="100.0"
+        android:translateY="0.0" >
         <group
-            auto:name="SecondLevelGroup1"
-            auto:translateX="-100.0"
-            auto:translateY="50.0" >
+            android:name="SecondLevelGroup1"
+            android:translateX="-100.0"
+            android:translateY="50.0" >
             <path
-                auto:fillColor="#FF00FF00"
-                auto:pathData="@string/rectangle200" />
+                android:fillColor="#FF00FF00"
+                android:pathData="@string/rectangle200" />
 
             <group
-                auto:name="ThridLevelGroup1"
-                auto:translateX="-100.0"
-                auto:translateY="50.0" >
+                android:name="ThridLevelGroup1"
+                android:translateX="-100.0"
+                android:translateY="50.0" >
                 <path
-                    auto:fillColor="#FF0000FF"
-                    auto:pathData="@string/rectangle200" />
+                    android:fillColor="#FF0000FF"
+                    android:pathData="@string/rectangle200" />
             </group>
             <group
-                auto:name="ThridLevelGroup2"
-                auto:translateX="100.0"
-                auto:translateY="50.0" >
+                android:name="ThridLevelGroup2"
+                android:translateX="100.0"
+                android:translateY="50.0" >
                 <path
-                    auto:fillColor="#FF000000"
-                    auto:pathData="@string/rectangle200" />
+                    android:fillColor="#FF000000"
+                    android:pathData="@string/rectangle200" />
             </group>
         </group>
         <group
-            auto:name="SecondLevelGroup2"
-            auto:translateX="100.0"
-            auto:translateY="50.0" >
+            android:name="SecondLevelGroup2"
+            android:translateX="100.0"
+            android:translateY="50.0" >
             <path
-                auto:fillColor="#FF0000FF"
-                auto:pathData="@string/rectangle200" />
+                android:fillColor="#FF0000FF"
+                android:pathData="@string/rectangle200" />
 
             <group
-                auto:name="ThridLevelGroup3"
-                auto:translateX="-100.0"
-                auto:translateY="50.0" >
+                android:name="ThridLevelGroup3"
+                android:translateX="-100.0"
+                android:translateY="50.0" >
                 <path
-                    auto:fillColor="#FFFF0000"
-                    auto:pathData="@string/rectangle200" />
+                    android:fillColor="#FFFF0000"
+                    android:pathData="@string/rectangle200" />
             </group>
             <group
-                auto:name="ThridLevelGroup4"
-                auto:translateX="100.0"
-                auto:translateY="50.0" >
+                android:name="ThridLevelGroup4"
+                android:translateX="100.0"
+                android:translateY="50.0" >
                 <path
-                    auto:fillColor="#FF00FF00"
-                    auto:pathData="@string/rectangle200" />
+                    android:fillColor="#FF00FF00"
+                    android:pathData="@string/rectangle200" />
             </group>
         </group>
 
         <path
-            auto:fillColor="#FFFF0000"
-            auto:pathData="@string/rectangle200" />
+            android:fillColor="#FFFF0000"
+            android:pathData="@string/rectangle200" />
     </group>
 
 </vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable26.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable26.xml
index b2dd4a3..eda06d8 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable26.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable26.xml
@@ -14,33 +14,32 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-    auto:height="64dp"
-    auto:viewportHeight="200"
-    auto:viewportWidth="200"
-    auto:width="64dp" >
+    android:height="64dp"
+    android:viewportHeight="200"
+    android:viewportWidth="200"
+    android:width="64dp" >
 
     <group>
         <path
-            auto:name="background1"
-            auto:fillColor="#FF000000"
-            auto:pathData="M 0,0 l 100,0 l 0, 100 l -100, 0 z" />
+            android:name="background1"
+            android:fillColor="#FF000000"
+            android:pathData="M 0,0 l 100,0 l 0, 100 l -100, 0 z" />
         <path
-            auto:name="background2"
-            auto:fillColor="#FF000000"
-            auto:pathData="M 100,100 l 100,0 l 0, 100 l -100, 0 z" />
+            android:name="background2"
+            android:fillColor="#FF000000"
+            android:pathData="M 100,100 l 100,0 l 0, 100 l -100, 0 z" />
     </group>
     <group
-        auto:translateX="50"
-        auto:translateY="50" >
+        android:translateX="50"
+        android:translateY="50" >
         <path
-            auto:name="twoLines"
-            auto:pathData="M 100,20 l 0 80 l -30 -80"
-            auto:strokeColor="#FF00FF00"
-            auto:strokeLineCap="butt"
-            auto:strokeLineJoin="miter"
-            auto:strokeMiterLimit="5"
-            auto:strokeWidth="20" />
+            android:name="twoLines"
+            android:pathData="M 100,20 l 0 80 l -30 -80"
+            android:strokeColor="#FF00FF00"
+            android:strokeLineCap="butt"
+            android:strokeLineJoin="miter"
+            android:strokeMiterLimit="5"
+            android:strokeWidth="20" />
     </group>
 
 </vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable27.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable27.xml
index b8f88ce..cd46dd9 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable27.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable27.xml
@@ -14,33 +14,32 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-    auto:height="64dp"
-    auto:viewportHeight="200"
-    auto:viewportWidth="200"
-    auto:width="64dp" >
+    android:height="64dp"
+    android:viewportHeight="200"
+    android:viewportWidth="200"
+    android:width="64dp" >
 
     <group>
         <path
-            auto:name="background1"
-            auto:fillColor="#FF000000"
-            auto:pathData="M 0,0 l 100,0 l 0, 100 l -100, 0 z" />
+            android:name="background1"
+            android:fillColor="#FF000000"
+            android:pathData="M 0,0 l 100,0 l 0, 100 l -100, 0 z" />
         <path
-            auto:name="background2"
-            auto:fillColor="#FF000000"
-            auto:pathData="M 100,100 l 100,0 l 0, 100 l -100, 0 z" />
+            android:name="background2"
+            android:fillColor="#FF000000"
+            android:pathData="M 100,100 l 100,0 l 0, 100 l -100, 0 z" />
     </group>
     <group
-        auto:translateX="50"
-        auto:translateY="50" >
+        android:translateX="50"
+        android:translateY="50" >
         <path
-            auto:name="twoLines"
-            auto:pathData="M 100,20 l 0 80 l -30 -80"
-            auto:strokeColor="#FF00FF00"
-            auto:strokeLineCap="round"
-            auto:strokeLineJoin="round"
-            auto:strokeMiterLimit="10"
-            auto:strokeWidth="20" />
+            android:name="twoLines"
+            android:pathData="M 100,20 l 0 80 l -30 -80"
+            android:strokeColor="#FF00FF00"
+            android:strokeLineCap="round"
+            android:strokeLineJoin="round"
+            android:strokeMiterLimit="10"
+            android:strokeWidth="20" />
     </group>
 
 </vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable28.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable28.xml
index 30c7fce..812af6b 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable28.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable28.xml
@@ -14,34 +14,33 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-    auto:height="64dp"
-    auto:viewportHeight="200"
-    auto:viewportWidth="200"
-    auto:width="64dp"
-    auto:autoMirrored="true" >
+    android:height="64dp"
+    android:viewportHeight="200"
+    android:viewportWidth="200"
+    android:width="64dp"
+    android:autoMirrored="true" >
 
     <group>
         <path
-            auto:name="background1"
-            auto:fillColor="#FF000000"
-            auto:pathData="M 0,0 l 100,0 l 0, 100 l -100, 0 z" />
+            android:name="background1"
+            android:fillColor="#FF000000"
+            android:pathData="M 0,0 l 100,0 l 0, 100 l -100, 0 z" />
         <path
-            auto:name="background2"
-            auto:fillColor="#FF000000"
-            auto:pathData="M 100,100 l 100,0 l 0, 100 l -100, 0 z" />
+            android:name="background2"
+            android:fillColor="#FF000000"
+            android:pathData="M 100,100 l 100,0 l 0, 100 l -100, 0 z" />
     </group>
     <group
-        auto:translateX="50"
-        auto:translateY="50" >
+        android:translateX="50"
+        android:translateY="50" >
         <path
-            auto:name="twoLines"
-            auto:pathData="M 100,20 l 0 80 l -30 -80"
-            auto:strokeColor="#FF00FF00"
-            auto:strokeLineCap="square"
-            auto:strokeLineJoin="bevel"
-            auto:strokeMiterLimit="10"
-            auto:strokeWidth="20" />
+            android:name="twoLines"
+            android:pathData="M 100,20 l 0 80 l -30 -80"
+            android:strokeColor="#FF00FF00"
+            android:strokeLineCap="square"
+            android:strokeLineJoin="bevel"
+            android:strokeMiterLimit="10"
+            android:strokeWidth="20" />
     </group>
 
 </vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable29.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable29.xml
index 2ac1d42..b24d31c 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable29.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable29.xml
@@ -14,16 +14,15 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-        auto:height="48dp"
-        auto:width="48dp"
-        auto:viewportHeight="1"
-        auto:viewportWidth="1" >
+        android:height="48dp"
+        android:width="48dp"
+        android:viewportHeight="1"
+        android:viewportWidth="1" >
 
     <group>
         <path
-            auto:name="box1"
-            auto:pathData="l0.0.0.5.0.0.5-0.5.0.0-.5z"
-            auto:fillColor="#ff00ff00"/>
+            android:name="box1"
+            android:pathData="l0.0.0.5.0.0.5-0.5.0.0-.5z"
+            android:fillColor="#ff00ff00"/>
     </group>
 </vector>
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable30.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable30.xml
index 6abb455..24f7372 100644
--- a/graphics/drawable/teststatic/res/drawable/vector_drawable30.xml
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable30.xml
@@ -14,16 +14,15 @@
      limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:auto="http://schemas.android.com/apk/res-auto"
-        auto:height="48dp"
-        auto:width="48dp"
-        auto:viewportHeight="48"
-        auto:viewportWidth="48" >
+        android:height="48dp"
+        android:width="48dp"
+        android:viewportHeight="48"
+        android:viewportWidth="48" >
 
     <group>
         <path
-            auto:name="plus1"
-            auto:pathData="M20 16h-4v8h-8v4h8v8h4v-8h8v-4h-8zm9-3.84v3.64l5-1v21.2h4v-26z"
-            auto:fillColor="#ff00ff00"/>
+            android:name="plus1"
+            android:pathData="M20 16h-4v8h-8v4h8v8h4v-8h8v-4h-8zm9-3.84v3.64l5-1v21.2h4v-26z"
+            android:fillColor="#ff00ff00"/>
     </group>
 </vector>
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable_scale0.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable_scale0.xml
new file mode 100644
index 0000000..828f0d9
--- /dev/null
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable_scale0.xml
@@ -0,0 +1,57 @@
+<!--
+ Copyright (C) 2015 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="64dp"
+    android:viewportHeight="200"
+    android:viewportWidth="200"
+    android:width="64dp" >
+
+    <group>
+        <path
+            android:name="background1"
+            android:fillColor="@color/color0"
+            android:pathData="M 0,0 l 100,0 l 0, 100 l -100, 0 z" />
+        <path
+            android:name="background2"
+            android:fillColor="@color/color2"
+            android:pathData="M 100,100 l 100,0 l 0, 100 l -100, 0 z" />
+    </group>
+    <group
+        android:pivotX="0"
+        android:pivotY="0"
+        android:rotation="90" >
+        <group
+            android:scaleX="1.5"
+            android:scaleY="1" >
+            <group
+                android:pivotX="0"
+                android:pivotY="0"
+                android:rotation="-90" >
+                <group
+                    android:scaleX="1.5"
+                    android:scaleY="1" >
+                    <path
+                        android:name="twoLines"
+                        android:fillColor="#FFFF0000"
+                        android:pathData="@string/triangle100"
+                        android:strokeColor="#FF00FF00"
+                        android:strokeWidth="10" />
+                </group>
+            </group>
+        </group>
+    </group>
+
+</vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable_scale1.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable_scale1.xml
new file mode 100644
index 0000000..530c73b
--- /dev/null
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable_scale1.xml
@@ -0,0 +1,52 @@
+<!--
+ Copyright (C) 2015 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="64dp"
+    android:viewportHeight="200"
+    android:viewportWidth="200"
+    android:width="64dp" >
+
+    <group>
+        <path
+            android:name="background1"
+            android:fillColor="#FF000000"
+            android:pathData="M 0,0 l 100,0 l 0, 100 l -100, 0 z" />
+        <path
+            android:name="background2"
+            android:fillColor="#FF000000"
+            android:pathData="M 100,100 l 100,0 l 0, 100 l -100, 0 z" />
+    </group>
+    <group
+        android:scaleX="-1"
+        android:scaleY="-1" >
+        <group
+            android:scaleX="-1"
+            android:scaleY="-1" >
+            <group
+                android:pivotX="100"
+                android:pivotY="100"
+                android:rotation="45" >
+                <path
+                    android:name="twoLines"
+                    android:fillColor="#FFFF0000"
+                    android:pathData="M 100, 0 l 0, 100, -100, 0 z"
+                    android:strokeColor="#FF00FF00"
+                    android:strokeWidth="10" />
+            </group>
+        </group>
+    </group>
+
+</vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable_scale2.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable_scale2.xml
new file mode 100644
index 0000000..200eb61
--- /dev/null
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable_scale2.xml
@@ -0,0 +1,48 @@
+<!--
+ Copyright (C) 2015 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="64dp"
+    android:viewportHeight="200"
+    android:viewportWidth="200"
+    android:width="64dp" >
+
+    <group>
+        <path
+            android:name="background1"
+            android:fillColor="#FF000000"
+            android:pathData="M 0,0 l 100,0 l 0, 100 l -100, 0 z" />
+        <path
+            android:name="background2"
+            android:fillColor="#FF000000"
+            android:pathData="M 100,100 l 100,0 l 0, 100 l -100, 0 z" />
+    </group>
+    <group
+        android:scaleX="2"
+        android:scaleY="0.5" >
+        <group
+            android:pivotX="100"
+            android:pivotY="100"
+            android:rotation="45" >
+            <path
+                android:name="twoLines"
+                android:fillColor="#FFFF0000"
+                android:pathData="M 100, 0 l 0, 100, -100, 0 z"
+                android:strokeColor="#FF00FF00"
+                android:strokeWidth="10" />
+        </group>
+    </group>
+
+</vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_drawable_scale3.xml b/graphics/drawable/teststatic/res/drawable/vector_drawable_scale3.xml
new file mode 100644
index 0000000..a40fc9c2
--- /dev/null
+++ b/graphics/drawable/teststatic/res/drawable/vector_drawable_scale3.xml
@@ -0,0 +1,62 @@
+<!--
+ Copyright (C) 2015 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="64dp"
+    android:viewportHeight="200"
+    android:viewportWidth="200"
+    android:width="64dp" >
+
+    <group>
+        <path
+            android:name="background1"
+            android:fillColor="#FF000000"
+            android:pathData="M 0,0 l 100,0 l 0, 100 l -100, 0 z" />
+        <path
+            android:name="background2"
+            android:fillColor="#FF000000"
+            android:pathData="M 100,100 l 100,0 l 0, 100 l -100, 0 z" />
+    </group>
+    <group
+        android:pivotX="0"
+        android:pivotY="0"
+        android:rotation="45" >
+        <group
+            android:pivotX="0"
+            android:pivotY="0"
+            android:rotation="90" >
+            <group
+                android:scaleX="1.5"
+                android:scaleY="1" >
+                <group
+                    android:pivotX="0"
+                    android:pivotY="0"
+                    android:rotation="-90" >
+                    <group
+                        android:scaleX="1.5"
+                        android:scaleY="1" >
+                        <path
+                            android:name="twoLines"
+                            android:fillColor="#FFFF0000"
+                            android:pathData="M 100, 0 l 0, 100, -100, 0 z"
+                            android:strokeColor="#FF00FF00"
+                            android:strokeWidth="10" />
+                    </group>
+                </group>
+            </group>
+        </group>
+    </group>
+
+</vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_test01.xml b/graphics/drawable/teststatic/res/drawable/vector_test01.xml
new file mode 100644
index 0000000..8b891d6
--- /dev/null
+++ b/graphics/drawable/teststatic/res/drawable/vector_test01.xml
@@ -0,0 +1,31 @@
+<!--
+ Copyright (C) 2015 The Android Open Source Project
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at"+
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:height="128dp"
+        android:width="128dp"
+        android:viewportHeight="512"
+        android:viewportWidth="512" >
+
+    <group>
+        <path
+            android:name="002b"
+            android:pathData="M100,200c0,-100 150,-100 150,0s150,100 150,0t-200,299"
+            android:strokeColor="#FF0000FF"
+            android:strokeWidth="4"
+            android:fillColor="#00000000" />
+    </group>
+
+</vector>
\ No newline at end of file
diff --git a/graphics/drawable/teststatic/res/drawable/vector_test02.xml b/graphics/drawable/teststatic/res/drawable/vector_test02.xml
new file mode 100644
index 0000000..e0af323
--- /dev/null
+++ b/graphics/drawable/teststatic/res/drawable/vector_test02.xml
@@ -0,0 +1,31 @@
+<!--
+ Copyright (C) 2015 The Android Open Source Project
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at"+
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:height="128dp"
+        android:width="128dp"
+        android:viewportHeight="512"
+        android:viewportWidth="512" >
+
+    <group>
+        <path
+            android:name="002b"
+            android:pathData="M100,200c0,-100 150,-100 150,0s150,100 150,0T-200,299"
+            android:strokeColor="#FF0000FF"
+            android:strokeWidth="4"
+            android:fillColor="#00000000" />
+    </group>
+
+</vector>
\ No newline at end of file
diff --git a/v17/leanback/res/animator/lb_guidedactions_item_checked.xml b/graphics/drawable/teststatic/res/values/colors.xml
similarity index 60%
rename from v17/leanback/res/animator/lb_guidedactions_item_checked.xml
rename to graphics/drawable/teststatic/res/values/colors.xml
index 463b9f7..6eb3036 100644
--- a/v17/leanback/res/animator/lb_guidedactions_item_checked.xml
+++ b/graphics/drawable/teststatic/res/values/colors.xml
@@ -1,6 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2015 The Android Open Source Project
+<!-- Copyright (C) 2015 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -14,9 +12,9 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
-    android:duration="@integer/lb_guidedactions_item_animation_duration"
-    android:propertyName="alpha"
-    android:valueFrom="0.0"
-    android:valueTo="1.0"
-    android:valueType="floatType" />
+<resources>
+    <color name="color0">#a6e4ea</color>
+    <color name="color1">#ff3838</color>
+    <color name="color2">#ffff51</color>
+    <color name="color3">#0ed300</color>
+</resources>
diff --git a/graphics/drawable/teststatic/res/values/strings.xml b/graphics/drawable/teststatic/res/values/strings.xml
index c5451c88..065e7d9 100644
--- a/graphics/drawable/teststatic/res/values/strings.xml
+++ b/graphics/drawable/teststatic/res/values/strings.xml
@@ -25,4 +25,5 @@
     <string name="round_box">"m2.10001,-6c-1.9551,0 -0.5,0.02499 -2.10001,0.02499c-1.575,0 0.0031,-0.02499 -1.95,-0.02499c-2.543,0 -4,2.2816 -4,4.85001c0,3.52929 0.25,6.25 5.95,6.25c5.7,0 6,-2.72071 6,-6.25c0,-2.56841 -1.35699,-4.85001 -3.89999,-4.85001"</string>
     <string name="heart">    "m4.5,-7c-1.95509,0 -3.83009,1.26759 -4.5,3c-0.66991,-1.73241 -2.54691,-3 -4.5,-3c-2.543,0 -4.5,1.93159 -4.5,4.5c0,3.5293 3.793,6.2578 9,11.5c5.207,-5.2422 9,-7.9707 9,-11.5c0,-2.56841 -1.957,-4.5 -4.5,-4.5"</string>
     <string name="rectangle200">"M 0,0 l 200,0 l 0, 200 l -200, 0 z"</string>
-</resources>
\ No newline at end of file
+    <string name="triangle100">"M 100, 0 l 0, 100, -100, 0 z"</string>
+</resources>
diff --git a/graphics/drawable/teststatic/src/android/support/test/vectordrawable/TestActivity.java b/graphics/drawable/teststatic/src/android/support/test/vectordrawable/TestActivity.java
index 8bb766e..c92ff47 100644
--- a/graphics/drawable/teststatic/src/android/support/test/vectordrawable/TestActivity.java
+++ b/graphics/drawable/teststatic/src/android/support/test/vectordrawable/TestActivity.java
@@ -34,6 +34,10 @@
 
     private static final String LOGCAT = "VectorDrawable1";
     protected int[] icon = {
+            R.drawable.vector_drawable_scale0,
+            R.drawable.vector_drawable_scale1,
+            R.drawable.vector_drawable_scale2,
+            R.drawable.vector_drawable_scale3,
             R.drawable.vector_drawable01,
             R.drawable.vector_drawable02,
             R.drawable.vector_drawable03,
@@ -64,6 +68,8 @@
             R.drawable.vector_drawable28,
             R.drawable.vector_drawable29,
             R.drawable.vector_drawable30,
+            R.drawable.vector_test01,
+            R.drawable.vector_test02
     };
 
     private static final int EXTRA_TESTS = 2;
@@ -85,8 +91,10 @@
         time =  android.os.SystemClock.currentThreadTimeMillis()-time;
 
         // Testing Tint on one particular case.
-        d[3].setTint(0x8000FF00);
-        d[3].setTintMode(Mode.MULTIPLY);
+        if (d.length > 3) {
+            d[3].setTint(0x8000FF00);
+            d[3].setTintMode(Mode.MULTIPLY);
+        }
 
         // Testing Constant State like operation by creating the first 2 icons
         // from the 3rd one's constant state.
diff --git a/graphics/drawable/util/src/android/support/graphics/drawable/AndroidResources.java b/graphics/drawable/util/src/android/support/graphics/drawable/AndroidResources.java
new file mode 100644
index 0000000..e6b2e14
--- /dev/null
+++ b/graphics/drawable/util/src/android/support/graphics/drawable/AndroidResources.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package android.support.graphics.drawable;
+
+public class AndroidResources {
+
+    // Resources ID generated in the latest R.java for framework.
+    static final int[] styleable_VectorDrawableTypeArray = {
+            android.R.attr.name, android.R.attr.tint, android.R.attr.height,
+            android.R.attr.width, android.R.attr.alpha, android.R.attr.autoMirrored,
+            android.R.attr.mode, android.R.attr.viewportWidth, android.R.attr.viewportHeight
+    };
+    static final int styleable_VectorDrawable_alpha = 4;
+    static final int styleable_VectorDrawable_autoMirrored = 5;
+    static final int styleable_VectorDrawable_height = 2;
+    static final int styleable_VectorDrawable_name = 0;
+    static final int styleable_VectorDrawable_tint = 1;
+    static final int styleable_VectorDrawable_Mode = 6;
+    static final int styleable_VectorDrawable_viewportHeight = 8;
+    static final int styleable_VectorDrawable_viewportWidth = 7;
+    static final int styleable_VectorDrawable_width = 3;
+    static final int[] styleable_VectorDrawableGroup = {
+            android.R.attr.name, android.R.attr.pivotX, android.R.attr.pivotY,
+            android.R.attr.scaleX, android.R.attr.scaleY, android.R.attr.rotation,
+            android.R.attr.translateX, android.R.attr.translateY
+    };
+    static final int styleable_VectorDrawableGroup_name = 0;
+    static final int styleable_VectorDrawableGroup_pivotX = 1;
+    static final int styleable_VectorDrawableGroup_pivotY = 2;
+    static final int styleable_VectorDrawableGroup_rotation = 5;
+    static final int styleable_VectorDrawableGroup_scaleX = 3;
+    static final int styleable_VectorDrawableGroup_scaleY = 4;
+    static final int styleable_VectorDrawableGroup_translateX = 6;
+    static final int styleable_VectorDrawableGroup_translateY = 7;
+    static final int[] styleable_VectorDrawablePath = {
+            android.R.attr.name, android.R.attr.fillColor, android.R.attr.pathData,
+            android.R.attr.strokeColor, android.R.attr.strokeWidth, android.R.attr.trimPathStart,
+            android.R.attr.trimPathEnd, android.R.attr.trimPathOffset, android.R.attr.strokeLineCap,
+            android.R.attr.strokeLineJoin, android.R.attr.strokeMiterLimit,
+            android.R.attr.strokeAlpha, android.R.attr.fillAlpha
+    };
+    static final int styleable_VectorDrawablePath_fillAlpha = 12;
+    static final int styleable_VectorDrawablePath_fillColor = 1;
+    static final int styleable_VectorDrawablePath_name = 0;
+    static final int styleable_VectorDrawablePath_pathData = 2;
+    static final int styleable_VectorDrawablePath_strokeAlpha = 11;
+    static final int styleable_VectorDrawablePath_strokeColor = 3;
+    static final int styleable_VectorDrawablePath_strokeLineCap = 8;
+    static final int styleable_VectorDrawablePath_strokeLineJoin = 9;
+    static final int styleable_VectorDrawablePath_strokeMiterLimit = 10;
+    static final int styleable_VectorDrawablePath_strokeWidth = 4;
+    static final int styleable_VectorDrawablePath_trimPathEnd = 6;
+    static final int styleable_VectorDrawablePath_trimPathOffset = 7;
+    static final int styleable_VectorDrawablePath_trimPathStart = 5;
+    static final int[] styleable_VectorDrawableClipPath = {
+            android.R.attr.name, android.R.attr.pathData
+    };
+    static final int styleable_VectorDrawableClipPath_name = 0;
+    static final int styleable_VectorDrawableClipPath_pathData = 1;
+
+    static final int[] styleable_AnimatedVectorDrawable = {
+            android.R.attr.drawable
+    };
+    static final int styleable_AnimatedVectorDrawable_drawable = 0;
+    static final int[] styleable_AnimatedVectorDrawableTarget = {
+            android.R.attr.name, android.R.attr.animation
+    };
+    static final int styleable_AnimatedVectorDrawableTarget_animation = 1;
+    static final int styleable_AnimatedVectorDrawableTarget_name = 0;
+}
diff --git a/graphics/drawable/util/src/android/support/graphics/drawable/TypedArrayUtils.java b/graphics/drawable/util/src/android/support/graphics/drawable/TypedArrayUtils.java
new file mode 100644
index 0000000..161eae6
--- /dev/null
+++ b/graphics/drawable/util/src/android/support/graphics/drawable/TypedArrayUtils.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package android.support.graphics.drawable;
+
+import android.content.res.TypedArray;
+import org.xmlpull.v1.XmlPullParser;
+
+
+public class TypedArrayUtils {
+    private static final String NAMESPACE = "http://schemas.android.com/apk/res/android";
+
+    public static boolean hasAttribute(XmlPullParser parser, String attrName) {
+        return parser.getAttributeValue(NAMESPACE, attrName) != null;
+    }
+
+    public static float getNamedFloat(TypedArray a, XmlPullParser parser, String attrName,
+                                      int resId, float defaultValue) {
+        final boolean hasAttr = hasAttribute(parser, attrName);
+        if (!hasAttr) {
+            return defaultValue;
+        } else {
+            return a.getFloat(resId, defaultValue);
+        }
+    }
+
+    public static boolean getNamedBoolean(TypedArray a, XmlPullParser parser, String attrName,
+                                      int resId, boolean defaultValue) {
+        final boolean hasAttr = hasAttribute(parser, attrName);
+        if (!hasAttr) {
+            return defaultValue;
+        } else {
+            return a.getBoolean(resId, defaultValue);
+        }
+    }
+
+    public static int getNamedInt(TypedArray a, XmlPullParser parser, String attrName,
+                                          int resId, int defaultValue) {
+        final boolean hasAttr = hasAttribute(parser, attrName);
+        if (!hasAttr) {
+            return defaultValue;
+        } else {
+            return a.getInt(resId, defaultValue);
+        }
+    }
+
+    public static int getNamedColor(TypedArray a, XmlPullParser parser, String attrName,
+                                        int resId, int defaultValue) {
+        final boolean hasAttr = hasAttribute(parser, attrName);
+        if (!hasAttr) {
+            return defaultValue;
+        } else {
+            return a.getColor(resId, defaultValue);
+        }
+    }
+}
diff --git a/v17/leanback/.classpath b/v17/leanback/.classpath
index 7bc01d9..f568681 100644
--- a/v17/leanback/.classpath
+++ b/v17/leanback/.classpath
@@ -1,9 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="src" path="gen"/>
 	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
 	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
 	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="api21"/>
+	<classpathentry kind="src" path="api23"/>
+	<classpathentry kind="src" path="jbmr2"/>
+	<classpathentry kind="src" path="common"/>
+	<classpathentry kind="src" path="kitkat"/>
+	<classpathentry kind="src" path="gen"/>
 	<classpathentry kind="output" path="bin/classes"/>
 </classpath>
diff --git a/v17/leanback/api/current.txt b/v17/leanback/api/current.txt
index 550e838..a4decd8 100644
--- a/v17/leanback/api/current.txt
+++ b/v17/leanback/api/current.txt
@@ -216,7 +216,6 @@
     method public java.util.List<android.support.v17.leanback.widget.GuidedAction> getActions();
     method public android.view.View getButtonActionItemView(int);
     method public java.util.List<android.support.v17.leanback.widget.GuidedAction> getButtonActions();
-    method protected int getContainerIdForBackground();
     method public static android.support.v17.leanback.app.GuidedStepFragment getCurrentGuidedStepFragment(android.app.FragmentManager);
     method public android.support.v17.leanback.widget.GuidanceStylist getGuidanceStylist();
     method public android.support.v17.leanback.widget.GuidedActionsStylist getGuidedActionsStylist();
@@ -232,6 +231,7 @@
     method protected void onAddSharedElementTransition(android.app.FragmentTransaction, android.support.v17.leanback.app.GuidedStepFragment);
     method public void onCreateActions(java.util.List<android.support.v17.leanback.widget.GuidedAction>, android.os.Bundle);
     method public android.support.v17.leanback.widget.GuidedActionsStylist onCreateActionsStylist();
+    method public android.view.View onCreateBackgroundView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle);
     method public void onCreateButtonActions(java.util.List<android.support.v17.leanback.widget.GuidedAction>, android.os.Bundle);
     method public android.support.v17.leanback.widget.GuidedActionsStylist onCreateButtonActionsStylist();
     method public android.support.v17.leanback.widget.GuidanceStylist.Guidance onCreateGuidance(android.os.Bundle);
@@ -240,7 +240,6 @@
     method public void onGuidedActionEdited(android.support.v17.leanback.widget.GuidedAction);
     method public long onGuidedActionEditedAndProceed(android.support.v17.leanback.widget.GuidedAction);
     method public void onGuidedActionFocused(android.support.v17.leanback.widget.GuidedAction);
-    method protected android.app.Fragment onProvideBackgroundFragment();
     method protected void onProvideFragmentTransitions();
     method public int onProvideTheme();
     method public void popBackStackToGuidedStepFragment(java.lang.Class, int);
@@ -251,13 +250,8 @@
     method public void setUiStyle(int);
     field public static final java.lang.String EXTRA_UI_STYLE = "uiStyle";
     field public static final int UI_STYLE_ACTIVITY_ROOT = 2; // 0x2
-    field public static final int UI_STYLE_DEFAULT = 0; // 0x0
     field public static final int UI_STYLE_ENTRANCE = 1; // 0x1
-  }
-
-  public static class GuidedStepFragment.GuidedStepBackgroundFragment extends android.app.Fragment {
-    ctor public GuidedStepFragment.GuidedStepBackgroundFragment();
-    method protected void onProvideFragmentTransitions();
+    field public static final int UI_STYLE_REPLACE = 0; // 0x0
   }
 
   public class GuidedStepSupportFragment extends android.support.v4.app.Fragment {
@@ -276,7 +270,6 @@
     method public java.util.List<android.support.v17.leanback.widget.GuidedAction> getActions();
     method public android.view.View getButtonActionItemView(int);
     method public java.util.List<android.support.v17.leanback.widget.GuidedAction> getButtonActions();
-    method protected int getContainerIdForBackground();
     method public static android.support.v17.leanback.app.GuidedStepSupportFragment getCurrentGuidedStepSupportFragment(android.support.v4.app.FragmentManager);
     method public android.support.v17.leanback.widget.GuidanceStylist getGuidanceStylist();
     method public android.support.v17.leanback.widget.GuidedActionsStylist getGuidedActionsStylist();
@@ -292,6 +285,7 @@
     method protected void onAddSharedElementTransition(android.support.v4.app.FragmentTransaction, android.support.v17.leanback.app.GuidedStepSupportFragment);
     method public void onCreateActions(java.util.List<android.support.v17.leanback.widget.GuidedAction>, android.os.Bundle);
     method public android.support.v17.leanback.widget.GuidedActionsStylist onCreateActionsStylist();
+    method public android.view.View onCreateBackgroundView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle);
     method public void onCreateButtonActions(java.util.List<android.support.v17.leanback.widget.GuidedAction>, android.os.Bundle);
     method public android.support.v17.leanback.widget.GuidedActionsStylist onCreateButtonActionsStylist();
     method public android.support.v17.leanback.widget.GuidanceStylist.Guidance onCreateGuidance(android.os.Bundle);
@@ -300,7 +294,6 @@
     method public void onGuidedActionEdited(android.support.v17.leanback.widget.GuidedAction);
     method public long onGuidedActionEditedAndProceed(android.support.v17.leanback.widget.GuidedAction);
     method public void onGuidedActionFocused(android.support.v17.leanback.widget.GuidedAction);
-    method protected android.support.v4.app.Fragment onProvideBackgroundSupportFragment();
     method protected void onProvideFragmentTransitions();
     method public int onProvideTheme();
     method public void popBackStackToGuidedStepSupportFragment(java.lang.Class, int);
@@ -311,13 +304,8 @@
     method public void setUiStyle(int);
     field public static final java.lang.String EXTRA_UI_STYLE = "uiStyle";
     field public static final int UI_STYLE_ACTIVITY_ROOT = 2; // 0x2
-    field public static final int UI_STYLE_DEFAULT = 0; // 0x0
     field public static final int UI_STYLE_ENTRANCE = 1; // 0x1
-  }
-
-  public static class GuidedStepSupportFragment.GuidedStepBackgroundSupportFragment extends android.support.v4.app.Fragment {
-    ctor public GuidedStepSupportFragment.GuidedStepBackgroundSupportFragment();
-    method protected void onProvideFragmentTransitions();
+    field public static final int UI_STYLE_REPLACE = 0; // 0x0
   }
 
   public class HeadersFragment extends android.support.v17.leanback.app.BaseRowFragment {
@@ -1040,6 +1028,7 @@
     field public static final long ACTION_ID_NO = -9L; // 0xfffffffffffffff7L
     field public static final long ACTION_ID_OK = -4L; // 0xfffffffffffffffcL
     field public static final long ACTION_ID_YES = -8L; // 0xfffffffffffffff8L
+    field public static final int CHECKBOX_CHECK_SET_ID = -1; // 0xffffffff
     field public static final int DEFAULT_CHECK_SET_ID = 1; // 0x1
     field public static final int NO_CHECK_SET = 0; // 0x0
   }
@@ -1093,6 +1082,8 @@
     method public void onAnimateItemFocused(android.support.v17.leanback.widget.GuidedActionsStylist.ViewHolder, boolean);
     method public void onAnimateItemPressed(android.support.v17.leanback.widget.GuidedActionsStylist.ViewHolder, boolean);
     method public void onAnimateItemPressedCancelled(android.support.v17.leanback.widget.GuidedActionsStylist.ViewHolder);
+    method public void onBindCheckMarkView(android.support.v17.leanback.widget.GuidedActionsStylist.ViewHolder, android.support.v17.leanback.widget.GuidedAction);
+    method public void onBindChevronView(android.support.v17.leanback.widget.GuidedActionsStylist.ViewHolder, android.support.v17.leanback.widget.GuidedAction);
     method public void onBindViewHolder(android.support.v17.leanback.widget.GuidedActionsStylist.ViewHolder, android.support.v17.leanback.widget.GuidedAction);
     method public android.view.View onCreateView(android.view.LayoutInflater, android.view.ViewGroup);
     method public android.support.v17.leanback.widget.GuidedActionsStylist.ViewHolder onCreateViewHolder(android.view.ViewGroup);
@@ -1106,6 +1097,7 @@
     method public int onProvideLayoutId();
     method public void setAsButtonActions();
     method public void setEditingMode(android.support.v17.leanback.widget.GuidedActionsStylist.ViewHolder, android.support.v17.leanback.widget.GuidedAction, boolean);
+    method protected void setupImeOptions(android.support.v17.leanback.widget.GuidedActionsStylist.ViewHolder, android.support.v17.leanback.widget.GuidedAction);
     field public static final int VIEW_TYPE_DEFAULT = 0; // 0x0
   }
 
diff --git a/v17/leanback/project.properties b/v17/leanback/project.properties
index 91d2b02..b2ef7dc 100644
--- a/v17/leanback/project.properties
+++ b/v17/leanback/project.properties
@@ -11,5 +11,5 @@
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 
 # Project target.
-target=android-19
+target=android-23
 android.library=true
diff --git a/v17/leanback/res/animator/lb_guidedactions_item_unchecked.xml b/v17/leanback/res/animator/lb_guidedactions_item_unchecked.xml
deleted file mode 100644
index 86525c8..0000000
--- a/v17/leanback/res/animator/lb_guidedactions_item_unchecked.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2015 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
-    android:duration="@integer/lb_guidedactions_item_animation_duration"
-    android:propertyName="alpha"
-    android:valueFrom="1.0"
-    android:valueTo="0.0"
-    android:valueType="floatType" />
diff --git a/v17/leanback/res/drawable/lb_guidedactions_item_checkmark.xml b/v17/leanback/res/drawable/lb_guidedactions_item_checkmark.xml
deleted file mode 100644
index ec7903b..0000000
--- a/v17/leanback/res/drawable/lb_guidedactions_item_checkmark.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2015 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
-    android:shape="oval" >
-
-    <size
-        android:height="@dimen/lb_guidedactions_item_checkmark_diameter"
-        android:width="@dimen/lb_guidedactions_item_checkmark_diameter" />
-
-    <solid android:color="@color/lb_tv_white" />
-
-</shape>
diff --git a/v17/leanback/res/layout/lb_guidedactions_item.xml b/v17/leanback/res/layout/lb_guidedactions_item.xml
index 8f5fcb7..831c355 100644
--- a/v17/leanback/res/layout/lb_guidedactions_item.xml
+++ b/v17/leanback/res/layout/lb_guidedactions_item.xml
@@ -20,7 +20,7 @@
     xmlns:tools="http://schemas.android.com/tools"
     style="?attr/guidedActionItemContainerStyle" >
 
-    <ImageView
+    <android.support.v17.leanback.widget.CheckableImageView
         android:id="@+id/guidedactions_item_checkmark"
         style="?attr/guidedActionItemCheckmarkStyle"
         tools:ignore="ContentDescription" />
diff --git a/v17/leanback/res/layout/lb_guidedstep_background.xml b/v17/leanback/res/layout/lb_guidedstep_background.xml
index 66b68c4..08ea47d 100644
--- a/v17/leanback/res/layout/lb_guidedstep_background.xml
+++ b/v17/leanback/res/layout/lb_guidedstep_background.xml
@@ -17,6 +17,7 @@
 <android.support.v17.leanback.widget.NonOverlappingView
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/guidedstep_background"
+    android:transitionName="guidedstep_background"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="?attr/guidedStepBackground" />
diff --git a/v17/leanback/res/layout/lb_guidedstep_fragment.xml b/v17/leanback/res/layout/lb_guidedstep_fragment.xml
index 31e2fee..ca6efc4 100644
--- a/v17/leanback/res/layout/lb_guidedstep_fragment.xml
+++ b/v17/leanback/res/layout/lb_guidedstep_fragment.xml
@@ -15,51 +15,57 @@
      limitations under the License.
 -->
 <!-- Layout for the frame of a 2 pane actions fragment. -->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/content_frame"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/guidedstep_root"
     android:orientation="horizontal"
     android:layout_width="match_parent"
     android:layout_height="match_parent" >
-
-    <android.support.v17.leanback.widget.NonOverlappingFrameLayout
-        android:id="@+id/content_fragment"
-        android:layout_toStartOf="@+id/action_fragment"
-        android:layout_width="0dp"
-        android:layout_weight="1"
-        android:layout_height="match_parent"
-        android:layout_alignParentStart="true" />
-
-    <android.support.v17.leanback.widget.NonOverlappingFrameLayout
-        android:id="@+id/action_fragment_root"
-        android:transitionName="action_fragment_root"
-        android:transitionGroup="false"
+    <LinearLayout
+        android:id="@+id/content_frame"
         android:orientation="horizontal"
-        android:clipToPadding="false"
-        android:clipChildren="false"
-        android:paddingStart="@dimen/lb_guidedactions_section_shadow_width"
-        android:layout_width="0dp"
-        android:layout_weight="?attr/guidedActionContentWidthWeight"
-        android:layout_height="match_parent"
-        android:layout_alignParentEnd="true">
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" >
 
-        <android.support.v17.leanback.widget.NonOverlappingView
-            android:id="@+id/action_fragment_background"
-            android:transitionName="action_fragment_background"
-            android:orientation="horizontal"
-            android:outlineProvider="paddedBounds"
-            android:layout_width="match_parent"
+        <android.support.v17.leanback.widget.NonOverlappingFrameLayout
+            android:id="@+id/content_fragment"
+            android:layout_toStartOf="@+id/action_fragment"
+            android:layout_width="0dp"
+            android:layout_weight="1"
             android:layout_height="match_parent"
-            android:background="?attr/guidedActionsBackground"
-            android:elevation="?attr/guidedActionsElevation" />
+            android:layout_alignParentStart="true" />
 
-        <android.support.v17.leanback.widget.NonOverlappingLinearLayout
-            android:id="@+id/action_fragment"
-            android:transitionName="action_fragment"
+        <android.support.v17.leanback.widget.NonOverlappingFrameLayout
+            android:id="@+id/action_fragment_root"
+            android:transitionName="action_fragment_root"
             android:transitionGroup="false"
             android:orientation="horizontal"
-            android:layout_width="match_parent"
+            android:clipToPadding="false"
+            android:clipChildren="false"
+            android:paddingStart="@dimen/lb_guidedactions_section_shadow_width"
+            android:layout_width="0dp"
+            android:layout_weight="?attr/guidedActionContentWidthWeight"
             android:layout_height="match_parent"
-            android:elevation="@dimen/lb_guidedactions_elevation" />
-    </android.support.v17.leanback.widget.NonOverlappingFrameLayout>
+            android:layout_alignParentEnd="true">
 
-</LinearLayout>
\ No newline at end of file
+            <android.support.v17.leanback.widget.NonOverlappingView
+                android:id="@+id/action_fragment_background"
+                android:transitionName="action_fragment_background"
+                android:orientation="horizontal"
+                android:outlineProvider="paddedBounds"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:background="?attr/guidedActionsBackground"
+                android:elevation="?attr/guidedActionsElevation" />
+
+            <android.support.v17.leanback.widget.NonOverlappingLinearLayout
+                android:id="@+id/action_fragment"
+                android:transitionName="action_fragment"
+                android:transitionGroup="false"
+                android:orientation="horizontal"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:elevation="@dimen/lb_guidedactions_elevation" />
+        </android.support.v17.leanback.widget.NonOverlappingFrameLayout>
+
+    </LinearLayout>
+</FrameLayout>
\ No newline at end of file
diff --git a/v17/leanback/res/transition-v21/lb_guidedstep_activity_enter.xml b/v17/leanback/res/transition-v21/lb_guidedstep_activity_enter.xml
index 7c4dfc3..ef14957 100644
--- a/v17/leanback/res/transition-v21/lb_guidedstep_activity_enter.xml
+++ b/v17/leanback/res/transition-v21/lb_guidedstep_activity_enter.xml
@@ -16,6 +16,13 @@
 -->
 
 <transitionSet xmlns:android="http://schemas.android.com/apk/res/android" >
+  <fade
+      android:interpolator="@android:interpolator/fast_out_linear_in"
+      android:duration="350">
+        <targets>
+            <target android:targetId="@id/guidedstep_background" />
+        </targets>
+  </fade>
   <slide
       android:interpolator="@android:interpolator/fast_out_linear_in"
       android:duration="350"
diff --git a/v17/leanback/res/values/attrs.xml b/v17/leanback/res/values/attrs.xml
index 9ce1094..cae72e5 100644
--- a/v17/leanback/res/values/attrs.xml
+++ b/v17/leanback/res/values/attrs.xml
@@ -398,14 +398,6 @@
         <attr name="guidedActionItemChevronStyle" format="reference" />
 
         <!-- Theme attribute for the animation used in a GuidedActionsPresenter when an action
-             is checked. Default is {@link
-             android.support.v17.leanback.R.animator#lb_guidedactions_item_checked}. -->
-        <attr name="guidedActionCheckedAnimation" format="reference" />
-        <!-- Theme attribute for the animation used in a GuidedActionsPresenter when an action
-             is unchecked. Default is {@link
-             android.support.v17.leanback.R.animator#lb_guidedactions_item_unchecked}. -->
-        <attr name="guidedActionUncheckedAnimation" format="reference" />
-        <!-- Theme attribute for the animation used in a GuidedActionsPresenter when an action
              is pressed. Default is {@link
              android.support.v17.leanback.R.animator#lb_guidedactions_item_pressed}. -->
         <attr name="guidedActionPressedAnimation" format="reference" />
diff --git a/v17/leanback/res/values/dimens.xml b/v17/leanback/res/values/dimens.xml
index f5f42f2..053c7e0 100644
--- a/v17/leanback/res/values/dimens.xml
+++ b/v17/leanback/res/values/dimens.xml
@@ -248,10 +248,10 @@
     <dimen name="lb_guidedactions_item_text_width">248dp</dimen>
     <dimen name="lb_guidedactions_item_text_width_no_icon">284dp</dimen>
     <dimen name="lb_guidedactions_item_min_height">64dp</dimen>
-    <dimen name="lb_guidedactions_item_start_padding">20dp</dimen>
+    <dimen name="lb_guidedactions_item_start_padding">28dp</dimen>
     <dimen name="lb_guidedactions_item_end_padding">28dp</dimen>
     <dimen name="lb_guidedactions_item_delimiter_padding">4dp</dimen>
-    <dimen name="lb_guidedactions_item_checkmark_diameter">8dp</dimen>
+    <dimen name="lb_guidedactions_item_checkmark_diameter">16dp</dimen>
     <dimen name="lb_guidedactions_item_icon_width">32dp</dimen>
     <dimen name="lb_guidedactions_item_icon_height">32dp</dimen>
     <dimen name="lb_guidedactions_item_title_font_size">18sp</dimen>
diff --git a/v17/leanback/res/values/styles.xml b/v17/leanback/res/values/styles.xml
index 0e5b0b6..094732d 100644
--- a/v17/leanback/res/values/styles.xml
+++ b/v17/leanback/res/values/styles.xml
@@ -456,9 +456,8 @@
         <item name="android:layout_height">@dimen/lb_guidedactions_item_checkmark_diameter</item>
         <item name="android:layout_gravity">center</item>
         <item name="android:layout_marginEnd">@dimen/lb_guidedactions_item_delimiter_padding</item>
-        <item name="android:scaleType">center</item>
-        <item name="android:src">@drawable/lb_guidedactions_item_checkmark</item>
-        <item name="android:visibility">invisible</item>
+        <item name="android:scaleType">centerInside</item>
+        <item name="android:visibility">gone</item>
     </style>
 
     <!-- Style for an action's icon in a GuidedActionsStylist's default item layout. -->
diff --git a/v17/leanback/res/values/themes.xml b/v17/leanback/res/values/themes.xml
index d00bc36..056ed1f 100644
--- a/v17/leanback/res/values/themes.xml
+++ b/v17/leanback/res/values/themes.xml
@@ -15,7 +15,7 @@
      limitations under the License.
 -->
 
-<resources>
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
 
     <!-- LeanbackBase may be overridden for specific api levels -->
     <style name="Theme.LeanbackBase" parent="android:Theme.Holo.NoActionBar">
@@ -118,7 +118,8 @@
 
         <item name="android:windowEnterTransition">@transition/lb_guidedstep_activity_enter</item>
 
-        <item name="guidedStepBackground">?android:attr/windowBackground</item>
+        <item name="guidedStepBackground">?android:attr/colorBackground</item>
+        <item name="android:windowBackground">@null</item>
 
         <item name="guidedStepImeAppearingAnimation">@animator/lb_guidedstep_slide_up</item>
         <item name="guidedStepImeDisappearingAnimation">@animator/lb_guidedstep_slide_down</item>
@@ -145,8 +146,6 @@
         <item name="guidedActionItemDescriptionStyle">@style/Widget.Leanback.GuidedActionItemDescriptionStyle</item>
         <item name="guidedActionItemChevronStyle">@style/Widget.Leanback.GuidedActionItemChevronStyle</item>
 
-        <item name="guidedActionCheckedAnimation">@animator/lb_guidedactions_item_checked</item>
-        <item name="guidedActionUncheckedAnimation">@animator/lb_guidedactions_item_unchecked</item>
         <item name="guidedActionPressedAnimation">@animator/lb_guidedactions_item_pressed</item>
         <item name="guidedActionUnpressedAnimation">@animator/lb_guidedactions_item_unpressed</item>
         <item name="guidedActionEnabledChevronAlpha">@string/lb_guidedactions_item_enabled_chevron_alpha</item>
diff --git a/v17/leanback/src/android/support/v17/leanback/app/GuidedActionAdapter.java b/v17/leanback/src/android/support/v17/leanback/app/GuidedActionAdapter.java
index 6a89e30..142e971 100644
--- a/v17/leanback/src/android/support/v17/leanback/app/GuidedActionAdapter.java
+++ b/v17/leanback/src/android/support/v17/leanback/app/GuidedActionAdapter.java
@@ -292,15 +292,6 @@
         GuidedAction action = mActions.get(position);
         avh.setAction(action);
         mStylist.onBindViewHolder(avh.mStylistViewHolder, action);
-
-        setupNextImeOptions(avh.mStylistViewHolder.getEditableTitleView());
-        setupNextImeOptions(avh.mStylistViewHolder.getEditableDescriptionView());
-    }
-
-    private void setupNextImeOptions(EditText edit) {
-        if (edit != null) {
-            edit.setImeOptions(EditorInfo.IME_ACTION_NEXT);
-        }
     }
 
     /**
@@ -383,15 +374,17 @@
         if (getRecyclerView() != null && actionCheckSetId != GuidedAction.NO_CHECK_SET) {
             // Find any actions that are checked and are in the same group
             // as the selected action. Fade their checkmarks out.
-            for (int i = 0, size = mActions.size(); i < size; i++) {
-                GuidedAction a = mActions.get(i);
-                if (a != action && a.getCheckSetId() == actionCheckSetId && a.isChecked()) {
-                    a.setChecked(false);
-                    ViewHolder vh = getRecyclerView().findViewHolderForPosition(i);
-                    if (vh != null) {
-                        GuidedActionsStylist.ViewHolder subViewHolder =
-                                ((ActionViewHolder)vh).mStylistViewHolder;
-                        mStylist.onAnimateItemChecked(subViewHolder, false);
+            if (actionCheckSetId != GuidedAction.CHECKBOX_CHECK_SET_ID) {
+                for (int i = 0, size = mActions.size(); i < size; i++) {
+                    GuidedAction a = mActions.get(i);
+                    if (a != action && a.getCheckSetId() == actionCheckSetId && a.isChecked()) {
+                        a.setChecked(false);
+                        ViewHolder vh = getRecyclerView().findViewHolderForPosition(i);
+                        if (vh != null) {
+                            GuidedActionsStylist.ViewHolder subViewHolder =
+                                    ((ActionViewHolder)vh).mStylistViewHolder;
+                            mStylist.onAnimateItemChecked(subViewHolder, false);
+                        }
                     }
                 }
             }
@@ -400,6 +393,11 @@
             if (!action.isChecked()) {
                 action.setChecked(true);
                 mStylist.onAnimateItemChecked(avh.mStylistViewHolder, true);
+            } else {
+                if (actionCheckSetId == GuidedAction.CHECKBOX_CHECK_SET_ID) {
+                    action.setChecked(false);
+                    mStylist.onAnimateItemChecked(avh.mStylistViewHolder, false);
+                }
             }
         }
     }
diff --git a/v17/leanback/src/android/support/v17/leanback/app/GuidedStepFragment.java b/v17/leanback/src/android/support/v17/leanback/app/GuidedStepFragment.java
index aca6231..cb6859d 100644
--- a/v17/leanback/src/android/support/v17/leanback/app/GuidedStepFragment.java
+++ b/v17/leanback/src/android/support/v17/leanback/app/GuidedStepFragment.java
@@ -74,6 +74,11 @@
  * <li>{@link #add(FragmentManager, GuidedStepFragment)} or {@link #add(FragmentManager,
  * GuidedStepFragment, int)}, to add GuidedStepFragment on top of existing Fragments or
  * replacing existing GuidedStepFragment when moving forward to next step.</li>
+ * <li>{@link #finishGuidedStepFragments()} can either finish the activity or pop all
+ * GuidedStepFragment from stack.
+ * <li>If app chooses not to use the helper function, it is the app's responsibility to call
+ * {@link #setUiStyle(int)} to select fragment transition and remember the stack entry where it
+ * need pops to.
  * </ul>
  * <h3>Theming and Stylists</h3>
  * <p>
@@ -139,15 +144,13 @@
     private static final String TAG_LEAN_BACK_ACTIONS_FRAGMENT = "leanBackGuidedStepFragment";
     private static final String EXTRA_ACTION_SELECTED_INDEX = "selectedIndex";
 
-    private static final String ENTRY_NAME_DEFAULT = "GuidedStepDefault";
+    private static final String ENTRY_NAME_REPLACE = "GuidedStepDefault";
 
     private static final String ENTRY_NAME_ENTRANCE = "GuidedStepEntrance";
 
-    private static final boolean IS_FRAMEWORK_FRAGMENT = true;
-
     /**
      * Fragment argument name for UI style.  The argument value is persisted in fragment state.
-     * The value is initially {@link #UI_STYLE_DEFAULT} and might be changed in one of the three
+     * The value is initially {@link #UI_STYLE_ENTRANCE} and might be changed in one of the three
      * helper functions:
      * <ul>
      * <li>{@link #addAsRoot(Activity, GuidedStepFragment, int)}</li>
@@ -157,7 +160,7 @@
      * <p>
      * Argument value can be either:
      * <ul>
-     * <li>{@link #UI_STYLE_DEFAULT}</li>
+     * <li>{@link #UI_STYLE_REPLACE}</li>
      * <li>{@link #UI_STYLE_ENTRANCE}</li>
      * <li>{@link #UI_STYLE_ACTIVITY_ROOT}</li>
      * </ul>
@@ -165,42 +168,37 @@
     public static final String EXTRA_UI_STYLE = "uiStyle";
 
     /**
-     * Default value for argument {@link #EXTRA_UI_STYLE}.  The default value is assigned
-     * in GuidedStepFragment constructor.  This is the case that we use GuidedStepFragment to
-     * replace another existing GuidedStepFragment when moving forward to next step. Default
-     * behavior of this style is:
+     * This is the case that we use GuidedStepFragment to replace another existing
+     * GuidedStepFragment when moving forward to next step. Default behavior of this style is:
      * <ul>
-     * <li> Enter transition slides in from END(right), exit transition slide out to START(left).
+     * <li>Enter transition slides in from END(right), exit transition same as
+     * {@link #UI_STYLE_ENTRANCE}.
      * </li>
-     * <li> No background, see {@link #onProvideBackgroundFragment()}.</li>
      * </ul>
      */
-    public static final int UI_STYLE_DEFAULT = 0;
+    public static final int UI_STYLE_REPLACE = 0;
 
     /**
-     * One possible value of argument {@link #EXTRA_UI_STYLE}.  This is the case that we show
-     * GuidedStepFragment on top of other content.  The default behavior of this style:
+     * Default value for argument {@link #EXTRA_UI_STYLE}. The default value is assigned in
+     * GuidedStepFragment constructor. This is the case that we show GuidedStepFragment on top of
+     * other content. The default behavior of this style:
      * <ul>
-     * <li>Enter transition slides in from two sides, exit transition is inherited from
-     * {@link #UI_STYLE_DEFAULT}.  Note: Changing exit transition by UI style is not working because
-     * fragment transition asks for exit transition before UI style is restored in Fragment
+     * <li>Enter transition slides in from two sides, exit transition slide out to START(left).
+     * Background will be faded in. Note: Changing exit transition by UI style is not working
+     * because fragment transition asks for exit transition before UI style is restored in Fragment
      * .onCreate().</li>
-     * <li> {@link #onProvideBackgroundFragment()} will create {@link GuidedStepBackgroundFragment}
-     * to covering underneath content. The activity must provide a container to host background
-     * fragment and override {@link #getContainerIdForBackground()}</li>
      * </ul>
      */
     public static final int UI_STYLE_ENTRANCE = 1;
 
     /**
-     * One possible value of argument {@link #EXTRA_UI_STYLE}.  This is the case that we show first
-     * GuidedStepFragment in a separate activity.  The default behavior of this style:
+     * One possible value of argument {@link #EXTRA_UI_STYLE}. This is the case that we show first
+     * GuidedStepFragment in a separate activity. The default behavior of this style:
      * <ul>
-     * <li> Enter transition is assigned null (will rely on activity transition), exit transition is
-     * same as {@link #UI_STYLE_DEFAULT}.  Note: Changing exit transition by UI style is not working
+     * <li>Enter transition is assigned null (will rely on activity transition), exit transition is
+     * same as {@link #UI_STYLE_ENTRANCE}. Note: Changing exit transition by UI style is not working
      * because fragment transition asks for exit transition before UI style is restored in
      * Fragment.onCreate().</li>
-     * <li> No background, see {@link #onProvideBackgroundFragment()}.
      * </ul>
      */
     public static final int UI_STYLE_ACTIVITY_ROOT = 2;
@@ -342,7 +340,7 @@
      * GuidedStepFragments in the stack, and configuring the fragment-to-fragment custom
      * transitions.  A backstack entry is added, so the fragment will be dismissed when BACK key
      * is pressed.
-     * <li>If current fragment on stack is GuidedStepFragment: assign {@link #UI_STYLE_DEFAULT}
+     * <li>If current fragment on stack is GuidedStepFragment: assign {@link #UI_STYLE_REPLACE}
      * <li>If current fragment on stack is not GuidedStepFragment: assign {@link #UI_STYLE_ENTRANCE}
      * <p>
      * Note: currently fragments added using this method must be created programmatically rather
@@ -360,7 +358,7 @@
      * GuidedStepFragments in the stack, and configuring the fragment-to-fragment custom
      * transitions.  A backstack entry is added, so the fragment will be dismissed when BACK key
      * is pressed.
-     * <li>If current fragment on stack is GuidedStepFragment: assign {@link #UI_STYLE_DEFAULT} and
+     * <li>If current fragment on stack is GuidedStepFragment: assign {@link #UI_STYLE_REPLACE} and
      * {@link #onAddSharedElementTransition(FragmentTransaction, GuidedStepFragment)} will be called
      * to perform shared element transition between GuidedStepFragments.
      * <li>If current fragment on stack is not GuidedStepFragment: assign {@link #UI_STYLE_ENTRANCE}
@@ -375,32 +373,24 @@
     public static int add(FragmentManager fragmentManager, GuidedStepFragment fragment, int id) {
         GuidedStepFragment current = getCurrentGuidedStepFragment(fragmentManager);
         boolean inGuidedStep = current != null;
-        if (IS_FRAMEWORK_FRAGMENT && Build.VERSION.SDK_INT >= 21 && Build.VERSION.SDK_INT < 23
-                && !inGuidedStep && fragment.getContainerIdForBackground() != View.NO_ID) {
-            // workaround b/22631964 for framework fragment
-            fragmentManager.beginTransaction()
-                .replace(id, new DummyFragment(), TAG_LEAN_BACK_ACTIONS_FRAGMENT)
-                .replace(fragment.getContainerIdForBackground(), new DummyFragment())
-                .commit();
-        }
         FragmentTransaction ft = fragmentManager.beginTransaction();
 
-        fragment.setUiStyle(inGuidedStep ? UI_STYLE_DEFAULT : UI_STYLE_ENTRANCE);
+        fragment.setUiStyle(inGuidedStep ? UI_STYLE_REPLACE : UI_STYLE_ENTRANCE);
         ft.addToBackStack(fragment.generateStackEntryName());
         if (current != null) {
             fragment.onAddSharedElementTransition(ft, current);
         }
-        initialBackground(fragment, id, ft);
         return ft.replace(id, fragment, TAG_LEAN_BACK_ACTIONS_FRAGMENT).commit();
     }
 
     /**
-     * Called when this fragment is added to FragmentTransaction with {@link #UI_STYLE_DEFAULT} (aka
-     * when the GuidedStepFragment replacing an existing GuidedStepFragment).
-     * Default implementation establishes connections between background views to morph background
-     * bounds change from disappearing GuidedStepFragment into this GuidedStepFragment.  The default
+     * Called when this fragment is added to FragmentTransaction with {@link #UI_STYLE_REPLACE} (aka
+     * when the GuidedStepFragment replacing an existing GuidedStepFragment). Default implementation
+     * establishes connections between action background views to morph action background bounds
+     * change from disappearing GuidedStepFragment into this GuidedStepFragment. The default
      * implementation heavily relies on {@link GuidedActionsStylist}'s layout, app may override this
      * method when modifying the default layout of {@link GuidedActionsStylist}.
+     *
      * @see GuidedActionsStylist
      * @see #onProvideFragmentTransitions()
      * @param ft The FragmentTransaction to add shared element.
@@ -442,7 +432,7 @@
     /**
      * Generates BackStackEntry name for GuidedStepFragment class or empty String if no entry is
      * associated.  Note {@link #UI_STYLE_ACTIVITY_ROOT} is not allowed and returns empty String.
-     * @param uiStyle {@link #UI_STYLE_DEFAULT} or {@link #UI_STYLE_ENTRANCE}
+     * @param uiStyle {@link #UI_STYLE_REPLACE} or {@link #UI_STYLE_ENTRANCE}
      * @return BackStackEntry name for the GuidedStepFragment or empty String if no entry is
      * associated.
      */
@@ -451,8 +441,8 @@
             return "";
         }
         switch (uiStyle) {
-        case UI_STYLE_DEFAULT:
-            return ENTRY_NAME_DEFAULT + guidedStepFragmentClass.getName();
+        case UI_STYLE_REPLACE:
+            return ENTRY_NAME_REPLACE + guidedStepFragmentClass.getName();
         case UI_STYLE_ENTRANCE:
             return ENTRY_NAME_ENTRANCE + guidedStepFragmentClass.getName();
         case UI_STYLE_ACTIVITY_ROOT:
@@ -473,14 +463,14 @@
     }
 
     /**
-     * Returns true if the backstack represents GuidedStepFragment with {@link #UI_STYLE_DEFAULT};
+     * Returns true if the backstack represents GuidedStepFragment with {@link #UI_STYLE_REPLACE};
      * false otherwise.
      * @param backStackEntryName Name of BackStackEntry.
-     * @return True if the backstack represents GuidedStepFragment with {@link #UI_STYLE_DEFAULT};
+     * @return True if the backstack represents GuidedStepFragment with {@link #UI_STYLE_REPLACE};
      * false otherwise.
      */
     public static boolean isUiStyleDefault(String backStackEntryName) {
-        return backStackEntryName != null && backStackEntryName.startsWith(ENTRY_NAME_DEFAULT);
+        return backStackEntryName != null && backStackEntryName.startsWith(ENTRY_NAME_REPLACE);
     }
 
     /**
@@ -489,8 +479,8 @@
      * @return Class name of GuidedStepFragment.
      */
     public static String getGuidedStepFragmentClassName(String backStackEntryName) {
-        if (backStackEntryName.startsWith(ENTRY_NAME_DEFAULT)) {
-            return backStackEntryName.substring(ENTRY_NAME_DEFAULT.length());
+        if (backStackEntryName.startsWith(ENTRY_NAME_REPLACE)) {
+            return backStackEntryName.substring(ENTRY_NAME_REPLACE.length());
         } else if (backStackEntryName.startsWith(ENTRY_NAME_ENTRANCE)) {
             return backStackEntryName.substring(ENTRY_NAME_ENTRANCE.length());
         } else {
@@ -517,19 +507,9 @@
         FragmentManager fragmentManager = activity.getFragmentManager();
         FragmentTransaction ft = fragmentManager.beginTransaction();
         fragment.setUiStyle(UI_STYLE_ACTIVITY_ROOT);
-        initialBackground(fragment, id, ft);
         return ft.replace(id, fragment, TAG_LEAN_BACK_ACTIONS_FRAGMENT).commit();
     }
 
-    static void initialBackground(GuidedStepFragment fragment, int id, FragmentTransaction ft) {
-        if (fragment.getContainerIdForBackground() != View.NO_ID) {
-            Fragment backgroundFragment = fragment.onProvideBackgroundFragment();
-            if (backgroundFragment != null) {
-                ft.replace(fragment.getContainerIdForBackground(), backgroundFragment);
-            }
-        }
-    }
-
     /**
      * Returns the current GuidedStepFragment on the fragment transaction stack.
      * @return The current GuidedStepFragment, if any, on the fragment transaction stack.
@@ -543,20 +523,6 @@
     }
 
     /**
-     * @hide
-     */
-    public static class DummyFragment extends Fragment {
-
-        @Override
-        public View onCreateView(LayoutInflater inflater, ViewGroup container,
-                Bundle savedInstanceState) {
-            final View v = new View(inflater.getContext());
-            v.setVisibility(View.GONE);
-            return v;
-        }
-    }
-
-    /**
      * Returns the GuidanceStylist that displays guidance information for the user.
      * @return The GuidanceStylist for this fragment.
      */
@@ -754,12 +720,12 @@
      * Called by Constructor to provide fragment transitions.  The default implementation assigns
      * transitions based on {@link #getUiStyle()}:
      * <ul>
-     * <li> {@link #UI_STYLE_DEFAULT} Slide from/to end(right) for enter transition, slide from/to
+     * <li> {@link #UI_STYLE_REPLACE} Slide from/to end(right) for enter transition, slide from/to
      * start(left) for exit transition, shared element enter transition is set to ChangeBounds.
      * <li> {@link #UI_STYLE_ENTRANCE} Enter transition is set to slide from both sides, exit
-     * transition is same as {@link #UI_STYLE_DEFAULT}, no shared element enter transition.
+     * transition is same as {@link #UI_STYLE_REPLACE}, no shared element enter transition.
      * <li> {@link #UI_STYLE_ACTIVITY_ROOT} Enter transition is set to null and app should rely on
-     * activity transition, exit transition is same as {@link #UI_STYLE_DEFAULT}, no shared element
+     * activity transition, exit transition is same as {@link #UI_STYLE_REPLACE}, no shared element
      * enter transition.
      * </ul>
      * <p>
@@ -774,7 +740,8 @@
      */
     protected void onProvideFragmentTransitions() {
         if (Build.VERSION.SDK_INT >= 21) {
-            if (getUiStyle() == UI_STYLE_DEFAULT) {
+            final int uiStyle = getUiStyle();
+            if (uiStyle == UI_STYLE_REPLACE) {
                 Object enterTransition = TransitionHelper.createFadeAndShortSlide(Gravity.END);
                 TransitionHelper.exclude(enterTransition, R.id.action_fragment_background, true);
                 TransitionHelper.exclude(enterTransition, R.id.guided_button_actions_background,
@@ -782,7 +749,32 @@
                 TransitionHelper.exclude(enterTransition, R.id.guided_button_actions_background2,
                         true);
                 TransitionHelper.exclude(enterTransition, R.id.guidedactions_selector, true);
+                TransitionHelper.exclude(enterTransition, R.id.guidedstep_background, true);
                 TransitionHelper.setEnterTransition(this, enterTransition);
+
+                // exit transition is unchanged, same as default UI_STYLE_ENTRANCE
+
+                Object changeBounds = TransitionHelper.createChangeBounds(false);
+                TransitionHelper.setSharedElementEnterTransition(this, changeBounds);
+            } else if (uiStyle == UI_STYLE_ENTRANCE) {
+                Object fade = TransitionHelper.createFadeTransition(TransitionHelper.FADE_IN |
+                        TransitionHelper.FADE_OUT);
+                TransitionHelper.include(fade, R.id.guidedstep_background);
+                Object slide = TransitionHelper.createFadeAndShortSlide(Gravity.END |
+                        Gravity.START);
+                TransitionHelper.include(slide, R.id.content_fragment);
+                TransitionHelper.include(slide, R.id.action_fragment_background);
+                TransitionHelper.include(slide, R.id.guided_button_actions_background);
+                TransitionHelper.include(slide, R.id.guidedactions_selector);
+                TransitionHelper.include(slide, R.id.guidedactions_list);
+                TransitionHelper.include(slide, R.id.guided_button_actions_background2);
+                TransitionHelper.include(slide, R.id.guidedactions_selector2);
+                TransitionHelper.include(slide, R.id.guidedactions_list2);
+                Object enterTransition = TransitionHelper.createTransitionSet(false);
+                TransitionHelper.addTransition(enterTransition, fade);
+                TransitionHelper.addTransition(enterTransition, slide);
+                TransitionHelper.setEnterTransition(this, enterTransition);
+
                 Object exitTransition = TransitionHelper.createFadeAndShortSlide(Gravity.START);
                 TransitionHelper.exclude(exitTransition, R.id.action_fragment_background, true);
                 TransitionHelper.exclude(exitTransition, R.id.guided_button_actions_background,
@@ -791,118 +783,47 @@
                 TransitionHelper.exclude(exitTransition, R.id.guided_button_actions_background2,
                         true);
                 TransitionHelper.exclude(exitTransition, R.id.guidedactions_selector2, true);
+                TransitionHelper.exclude(exitTransition, R.id.guidedstep_background, true);
                 TransitionHelper.setExitTransition(this, exitTransition);
-
-                Object changeBounds = TransitionHelper.createChangeBounds(false);
-                TransitionHelper.setSharedElementEnterTransition(this, changeBounds);
-            } else if (getUiStyle() == UI_STYLE_ENTRANCE) {
-                Object enterTransition = TransitionHelper.createFadeAndShortSlide(Gravity.END |
-                        Gravity.START);
-                TransitionHelper.include(enterTransition, R.id.content_fragment);
-                TransitionHelper.include(enterTransition, R.id.action_fragment_background);
-                TransitionHelper.include(enterTransition, R.id.guided_button_actions_background);
-                TransitionHelper.include(enterTransition, R.id.guidedactions_selector);
-                TransitionHelper.include(enterTransition, R.id.guidedactions_list);
-                TransitionHelper.include(enterTransition, R.id.guided_button_actions_background2);
-                TransitionHelper.include(enterTransition, R.id.guidedactions_selector2);
-                TransitionHelper.include(enterTransition, R.id.guidedactions_list2);
-                TransitionHelper.setEnterTransition(this, enterTransition);
-                // exit transition is unchanged, same as UI_STYLE_DEFAULT
                 // No shared element transition
                 TransitionHelper.setSharedElementEnterTransition(this, null);
-            } else if (getUiStyle() == UI_STYLE_ACTIVITY_ROOT) {
+            } else if (uiStyle == UI_STYLE_ACTIVITY_ROOT) {
                 // for Activity root, we dont need enter transition, use activity transition
                 TransitionHelper.setEnterTransition(this, null);
-                // exit transition is unchanged, same as UI_STYLE_DEFAULT
+                // exit transition is unchanged, same as UI_STYLE_ENTRANCE
                 // No shared element transition
                 TransitionHelper.setSharedElementEnterTransition(this, null);
+            } else {
+                return;
             }
         }
     }
 
     /**
-     * Default implementation of background for covering content below GuidedStepFragment.
-     * It uses current theme attribute guidedStepBackground which by default is read from
-     * android:windowBackground.
+     * Called by onCreateView to inflate background view.  Default implementation loads view
+     * from {@link R.layout#lb_guidedstep_background} which holds a reference to
+     * guidedStepBackground.
+     * @param inflater LayoutInflater to load background view.
+     * @param container Parent view of background view.
+     * @param savedInstanceState
+     * @return Created background view or null if no background.
      */
-    public static class GuidedStepBackgroundFragment extends Fragment {
-        public GuidedStepBackgroundFragment() {
-            onProvideFragmentTransitions();
-        }
-
-        /**
-         * Sets fragment transitions for GuidedStepBackgroundFragment.  Can be overridden.
-         */
-        protected void onProvideFragmentTransitions() {
-            if (Build.VERSION.SDK_INT >= 21) {
-                Object enterTransition = TransitionHelper.createFadeTransition(
-                        TransitionHelper.FADE_IN|TransitionHelper.FADE_OUT);
-                TransitionHelper.setEnterTransition(this, enterTransition);
-            }
-        }
-
-        @Override
-        public View onCreateView(LayoutInflater inflater, ViewGroup container,
-                Bundle savedInstanceState) {
-            Activity activity = getActivity();
-            Context themedContext = null;
-            if (!isGuidedStepTheme(activity)) {
-                // Look up the guidedStepTheme in the activity's currently specified theme.  If it
-                // exists, replace the theme with its value.
-                int resId = R.attr.guidedStepTheme;
-                TypedValue typedValue = new TypedValue();
-                boolean found = activity.getTheme().resolveAttribute(resId, typedValue, true);
-                if (DEBUG) Log.v(TAG, "Found guided step theme reference? " + found);
-                if (found) {
-                    ContextThemeWrapper themeWrapper =
-                            new ContextThemeWrapper(activity, typedValue.resourceId);
-                    if (isGuidedStepTheme(themeWrapper)) {
-                        themedContext = themeWrapper;
-                    }
-                }
-                if (!found) {
-                    Log.e(TAG, "GuidedStepFragment does not have an appropriate theme set.");
-                }
-            }
-
-            if (themedContext != null) {
-                inflater = inflater.cloneInContext(themedContext);
-            }
-
-            return inflater.inflate(R.layout.lb_guidedstep_background, container, false);
-        }
+    public View onCreateBackgroundView(LayoutInflater inflater, ViewGroup container,
+            Bundle savedInstanceState) {
+        return inflater.inflate(R.layout.lb_guidedstep_background, container, false);
     }
 
     /**
-     * Creates a background fragment for {@link #UI_STYLE_ENTRANCE}, returns null for other cases.
-     * Subclass may override the default behavior, e.g. provide different backgrounds
-     * for {@link #UI_STYLE_DEFAULT}.  Background fragment will be inserted in {@link
-     * #getContainerIdForBackground()}.
+     * Set UI style to fragment arguments. Default value is {@link #UI_STYLE_ENTRANCE} when fragment
+     * is first initialized. UI style is used to choose different fragment transition animations and
+     * determine if this is the first GuidedStepFragment on backstack. In most cases app does not
+     * directly call this method, app calls helper function
+     * {@link #add(FragmentManager, GuidedStepFragment, int)}. However if the app creates Fragment
+     * transaction and controls backstack by itself, it would need call setUiStyle() to select the
+     * fragment transition to use.
      *
-     * @return fragment that will be inserted below GuidedStepFragment.
-     */
-    protected Fragment onProvideBackgroundFragment() {
-        if (getUiStyle() == UI_STYLE_ENTRANCE) {
-            return new GuidedStepBackgroundFragment();
-        }
-        return null;
-    }
-
-    /**
-     * Returns container id for inserting {@link #onProvideBackgroundFragment()}.  The id should be
-     * different than container id for inserting GuidedStepFragment.
-     * Default value is {@link View#NO_ID}.  Subclass must override to host background fragment.
-     * @return container id for inserting {@link #onProvideBackgroundFragment()}
-     */
-    protected int getContainerIdForBackground() {
-        return View.NO_ID;
-    }
-
-
-    /**
-     * Set UI style to fragment arguments,  UI style cannot be changed after initialization.
-     * @param style {@link #UI_STYLE_ACTIVITY_ROOT} {@link #UI_STYLE_DEFAULT} or
-     * {@link #UI_STYLE_ENTRANCE}.
+     * @param style {@link #UI_STYLE_ACTIVITY_ROOT} {@link #UI_STYLE_REPLACE} or
+     *        {@link #UI_STYLE_ENTRANCE}.
      */
     public void setUiStyle(int style) {
         int oldStyle = getUiStyle();
@@ -923,15 +844,18 @@
     }
 
     /**
-     * Read UI style from fragment arguments.
+     * Read UI style from fragment arguments.  Default value is {@link #UI_STYLE_ENTRANCE} when
+     * fragment is first initialized.  UI style is used to choose different fragment transition
+     * animations and determine if this is the first GuidedStepFragment on backstack.
      *
-     * @return {@link #UI_STYLE_ACTIVITY_ROOT} {@link #UI_STYLE_DEFAULT} or
+     * @return {@link #UI_STYLE_ACTIVITY_ROOT} {@link #UI_STYLE_REPLACE} or
      * {@link #UI_STYLE_ENTRANCE}.
+     * @see #onProvideFragmentTransitions()
      */
     public int getUiStyle() {
         Bundle b = getArguments();
-        if (b == null) return UI_STYLE_DEFAULT;
-        return b.getInt(EXTRA_UI_STYLE, UI_STYLE_DEFAULT);
+        if (b == null) return UI_STYLE_ENTRANCE;
+        return b.getInt(EXTRA_UI_STYLE, UI_STYLE_ENTRANCE);
     }
 
     /**
@@ -982,9 +906,10 @@
         resolveTheme();
         inflater = getThemeInflater(inflater);
 
-        View v = inflater.inflate(R.layout.lb_guidedstep_fragment, container, false);
-        ViewGroup guidanceContainer = (ViewGroup) v.findViewById(R.id.content_fragment);
-        ViewGroup actionContainer = (ViewGroup) v.findViewById(R.id.action_fragment);
+        ViewGroup root = (ViewGroup) inflater.inflate(R.layout.lb_guidedstep_fragment,
+                container, false);
+        ViewGroup guidanceContainer = (ViewGroup) root.findViewById(R.id.content_fragment);
+        ViewGroup actionContainer = (ViewGroup) root.findViewById(R.id.action_fragment);
 
         Guidance guidance = onCreateGuidance(savedInstanceState);
         View guidanceView = mGuidanceStylist.onCreateView(inflater, guidanceContainer, guidance);
@@ -1038,7 +963,7 @@
             TypedValue typedValue = new TypedValue();
             if (ctx.getTheme().resolveAttribute(R.attr.guidedActionContentWidthWeightTwoPanels,
                     typedValue, true)) {
-                View actionsRoot = v.findViewById(R.id.action_fragment_root);
+                View actionsRoot = root.findViewById(R.id.action_fragment_root);
                 float weight = typedValue.getFloat();
                 LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) actionsRoot
                         .getLayoutParams();
@@ -1053,7 +978,11 @@
 
         setSelectedButtonActionPosition(0);
 
-        return v;
+        View backgroundView = onCreateBackgroundView(inflater, root, savedInstanceState);
+        if (backgroundView != null) {
+            root.addView(backgroundView, 0);
+        }
+        return root;
     }
 
     @Override
@@ -1085,6 +1014,8 @@
      * Convenient method to close GuidedStepFragments on top of other content or finish Activity if
      * GuidedStepFragments were started in a separate activity.  Pops all stack entries including
      * {@link #UI_STYLE_ENTRANCE}; if {@link #UI_STYLE_ENTRANCE} is not found, finish the activity.
+     * Note that this method must be paired with {@link #add(FragmentManager, GuidedStepFragment,
+     * int)} which sets up the stack entry name for finding which fragment we need to pop back to.
      */
     public void finishGuidedStepFragments() {
         final FragmentManager fragmentManager = getFragmentManager();
diff --git a/v17/leanback/src/android/support/v17/leanback/app/GuidedStepSupportFragment.java b/v17/leanback/src/android/support/v17/leanback/app/GuidedStepSupportFragment.java
index ca50a37..fae8c50 100644
--- a/v17/leanback/src/android/support/v17/leanback/app/GuidedStepSupportFragment.java
+++ b/v17/leanback/src/android/support/v17/leanback/app/GuidedStepSupportFragment.java
@@ -76,6 +76,11 @@
  * <li>{@link #add(FragmentManager, GuidedStepSupportFragment)} or {@link #add(FragmentManager,
  * GuidedStepSupportFragment, int)}, to add GuidedStepSupportFragment on top of existing Fragments or
  * replacing existing GuidedStepSupportFragment when moving forward to next step.</li>
+ * <li>{@link #finishGuidedStepSupportFragments()} can either finish the activity or pop all
+ * GuidedStepSupportFragment from stack.
+ * <li>If app chooses not to use the helper function, it is the app's responsibility to call
+ * {@link #setUiStyle(int)} to select fragment transition and remember the stack entry where it
+ * need pops to.
  * </ul>
  * <h3>Theming and Stylists</h3>
  * <p>
@@ -141,15 +146,13 @@
     private static final String TAG_LEAN_BACK_ACTIONS_FRAGMENT = "leanBackGuidedStepSupportFragment";
     private static final String EXTRA_ACTION_SELECTED_INDEX = "selectedIndex";
 
-    private static final String ENTRY_NAME_DEFAULT = "GuidedStepDefault";
+    private static final String ENTRY_NAME_REPLACE = "GuidedStepDefault";
 
     private static final String ENTRY_NAME_ENTRANCE = "GuidedStepEntrance";
 
-    private static final boolean IS_FRAMEWORK_FRAGMENT = false;
-
     /**
      * Fragment argument name for UI style.  The argument value is persisted in fragment state.
-     * The value is initially {@link #UI_STYLE_DEFAULT} and might be changed in one of the three
+     * The value is initially {@link #UI_STYLE_ENTRANCE} and might be changed in one of the three
      * helper functions:
      * <ul>
      * <li>{@link #addAsRoot(FragmentActivity, GuidedStepSupportFragment, int)}</li>
@@ -159,7 +162,7 @@
      * <p>
      * Argument value can be either:
      * <ul>
-     * <li>{@link #UI_STYLE_DEFAULT}</li>
+     * <li>{@link #UI_STYLE_REPLACE}</li>
      * <li>{@link #UI_STYLE_ENTRANCE}</li>
      * <li>{@link #UI_STYLE_ACTIVITY_ROOT}</li>
      * </ul>
@@ -167,42 +170,37 @@
     public static final String EXTRA_UI_STYLE = "uiStyle";
 
     /**
-     * Default value for argument {@link #EXTRA_UI_STYLE}.  The default value is assigned
-     * in GuidedStepSupportFragment constructor.  This is the case that we use GuidedStepSupportFragment to
-     * replace another existing GuidedStepSupportFragment when moving forward to next step. Default
-     * behavior of this style is:
+     * This is the case that we use GuidedStepSupportFragment to replace another existing
+     * GuidedStepSupportFragment when moving forward to next step. Default behavior of this style is:
      * <ul>
-     * <li> Enter transition slides in from END(right), exit transition slide out to START(left).
+     * <li>Enter transition slides in from END(right), exit transition same as
+     * {@link #UI_STYLE_ENTRANCE}.
      * </li>
-     * <li> No background, see {@link #onProvideBackgroundSupportFragment()}.</li>
      * </ul>
      */
-    public static final int UI_STYLE_DEFAULT = 0;
+    public static final int UI_STYLE_REPLACE = 0;
 
     /**
-     * One possible value of argument {@link #EXTRA_UI_STYLE}.  This is the case that we show
-     * GuidedStepSupportFragment on top of other content.  The default behavior of this style:
+     * Default value for argument {@link #EXTRA_UI_STYLE}. The default value is assigned in
+     * GuidedStepSupportFragment constructor. This is the case that we show GuidedStepSupportFragment on top of
+     * other content. The default behavior of this style:
      * <ul>
-     * <li>Enter transition slides in from two sides, exit transition is inherited from
-     * {@link #UI_STYLE_DEFAULT}.  Note: Changing exit transition by UI style is not working because
-     * fragment transition asks for exit transition before UI style is restored in Fragment
+     * <li>Enter transition slides in from two sides, exit transition slide out to START(left).
+     * Background will be faded in. Note: Changing exit transition by UI style is not working
+     * because fragment transition asks for exit transition before UI style is restored in Fragment
      * .onCreate().</li>
-     * <li> {@link #onProvideBackgroundSupportFragment()} will create {@link GuidedStepBackgroundSupportFragment}
-     * to covering underneath content. The activity must provide a container to host background
-     * fragment and override {@link #getContainerIdForBackground()}</li>
      * </ul>
      */
     public static final int UI_STYLE_ENTRANCE = 1;
 
     /**
-     * One possible value of argument {@link #EXTRA_UI_STYLE}.  This is the case that we show first
-     * GuidedStepSupportFragment in a separate activity.  The default behavior of this style:
+     * One possible value of argument {@link #EXTRA_UI_STYLE}. This is the case that we show first
+     * GuidedStepSupportFragment in a separate activity. The default behavior of this style:
      * <ul>
-     * <li> Enter transition is assigned null (will rely on activity transition), exit transition is
-     * same as {@link #UI_STYLE_DEFAULT}.  Note: Changing exit transition by UI style is not working
+     * <li>Enter transition is assigned null (will rely on activity transition), exit transition is
+     * same as {@link #UI_STYLE_ENTRANCE}. Note: Changing exit transition by UI style is not working
      * because fragment transition asks for exit transition before UI style is restored in
      * Fragment.onCreate().</li>
-     * <li> No background, see {@link #onProvideBackgroundSupportFragment()}.
      * </ul>
      */
     public static final int UI_STYLE_ACTIVITY_ROOT = 2;
@@ -344,7 +342,7 @@
      * GuidedStepSupportFragments in the stack, and configuring the fragment-to-fragment custom
      * transitions.  A backstack entry is added, so the fragment will be dismissed when BACK key
      * is pressed.
-     * <li>If current fragment on stack is GuidedStepSupportFragment: assign {@link #UI_STYLE_DEFAULT}
+     * <li>If current fragment on stack is GuidedStepSupportFragment: assign {@link #UI_STYLE_REPLACE}
      * <li>If current fragment on stack is not GuidedStepSupportFragment: assign {@link #UI_STYLE_ENTRANCE}
      * <p>
      * Note: currently fragments added using this method must be created programmatically rather
@@ -362,7 +360,7 @@
      * GuidedStepSupportFragments in the stack, and configuring the fragment-to-fragment custom
      * transitions.  A backstack entry is added, so the fragment will be dismissed when BACK key
      * is pressed.
-     * <li>If current fragment on stack is GuidedStepSupportFragment: assign {@link #UI_STYLE_DEFAULT} and
+     * <li>If current fragment on stack is GuidedStepSupportFragment: assign {@link #UI_STYLE_REPLACE} and
      * {@link #onAddSharedElementTransition(FragmentTransaction, GuidedStepSupportFragment)} will be called
      * to perform shared element transition between GuidedStepSupportFragments.
      * <li>If current fragment on stack is not GuidedStepSupportFragment: assign {@link #UI_STYLE_ENTRANCE}
@@ -377,32 +375,24 @@
     public static int add(FragmentManager fragmentManager, GuidedStepSupportFragment fragment, int id) {
         GuidedStepSupportFragment current = getCurrentGuidedStepSupportFragment(fragmentManager);
         boolean inGuidedStep = current != null;
-        if (IS_FRAMEWORK_FRAGMENT && Build.VERSION.SDK_INT >= 21 && Build.VERSION.SDK_INT < 23
-                && !inGuidedStep && fragment.getContainerIdForBackground() != View.NO_ID) {
-            // workaround b/22631964 for framework fragment
-            fragmentManager.beginTransaction()
-                .replace(id, new DummyFragment(), TAG_LEAN_BACK_ACTIONS_FRAGMENT)
-                .replace(fragment.getContainerIdForBackground(), new DummyFragment())
-                .commit();
-        }
         FragmentTransaction ft = fragmentManager.beginTransaction();
 
-        fragment.setUiStyle(inGuidedStep ? UI_STYLE_DEFAULT : UI_STYLE_ENTRANCE);
+        fragment.setUiStyle(inGuidedStep ? UI_STYLE_REPLACE : UI_STYLE_ENTRANCE);
         ft.addToBackStack(fragment.generateStackEntryName());
         if (current != null) {
             fragment.onAddSharedElementTransition(ft, current);
         }
-        initialBackground(fragment, id, ft);
         return ft.replace(id, fragment, TAG_LEAN_BACK_ACTIONS_FRAGMENT).commit();
     }
 
     /**
-     * Called when this fragment is added to FragmentTransaction with {@link #UI_STYLE_DEFAULT} (aka
-     * when the GuidedStepSupportFragment replacing an existing GuidedStepSupportFragment).
-     * Default implementation establishes connections between background views to morph background
-     * bounds change from disappearing GuidedStepSupportFragment into this GuidedStepSupportFragment.  The default
+     * Called when this fragment is added to FragmentTransaction with {@link #UI_STYLE_REPLACE} (aka
+     * when the GuidedStepSupportFragment replacing an existing GuidedStepSupportFragment). Default implementation
+     * establishes connections between action background views to morph action background bounds
+     * change from disappearing GuidedStepSupportFragment into this GuidedStepSupportFragment. The default
      * implementation heavily relies on {@link GuidedActionsStylist}'s layout, app may override this
      * method when modifying the default layout of {@link GuidedActionsStylist}.
+     *
      * @see GuidedActionsStylist
      * @see #onProvideFragmentTransitions()
      * @param ft The FragmentTransaction to add shared element.
@@ -444,7 +434,7 @@
     /**
      * Generates BackStackEntry name for GuidedStepSupportFragment class or empty String if no entry is
      * associated.  Note {@link #UI_STYLE_ACTIVITY_ROOT} is not allowed and returns empty String.
-     * @param uiStyle {@link #UI_STYLE_DEFAULT} or {@link #UI_STYLE_ENTRANCE}
+     * @param uiStyle {@link #UI_STYLE_REPLACE} or {@link #UI_STYLE_ENTRANCE}
      * @return BackStackEntry name for the GuidedStepSupportFragment or empty String if no entry is
      * associated.
      */
@@ -453,8 +443,8 @@
             return "";
         }
         switch (uiStyle) {
-        case UI_STYLE_DEFAULT:
-            return ENTRY_NAME_DEFAULT + guidedStepFragmentClass.getName();
+        case UI_STYLE_REPLACE:
+            return ENTRY_NAME_REPLACE + guidedStepFragmentClass.getName();
         case UI_STYLE_ENTRANCE:
             return ENTRY_NAME_ENTRANCE + guidedStepFragmentClass.getName();
         case UI_STYLE_ACTIVITY_ROOT:
@@ -475,14 +465,14 @@
     }
 
     /**
-     * Returns true if the backstack represents GuidedStepSupportFragment with {@link #UI_STYLE_DEFAULT};
+     * Returns true if the backstack represents GuidedStepSupportFragment with {@link #UI_STYLE_REPLACE};
      * false otherwise.
      * @param backStackEntryName Name of BackStackEntry.
-     * @return True if the backstack represents GuidedStepSupportFragment with {@link #UI_STYLE_DEFAULT};
+     * @return True if the backstack represents GuidedStepSupportFragment with {@link #UI_STYLE_REPLACE};
      * false otherwise.
      */
     public static boolean isUiStyleDefault(String backStackEntryName) {
-        return backStackEntryName != null && backStackEntryName.startsWith(ENTRY_NAME_DEFAULT);
+        return backStackEntryName != null && backStackEntryName.startsWith(ENTRY_NAME_REPLACE);
     }
 
     /**
@@ -491,8 +481,8 @@
      * @return Class name of GuidedStepSupportFragment.
      */
     public static String getGuidedStepSupportFragmentClassName(String backStackEntryName) {
-        if (backStackEntryName.startsWith(ENTRY_NAME_DEFAULT)) {
-            return backStackEntryName.substring(ENTRY_NAME_DEFAULT.length());
+        if (backStackEntryName.startsWith(ENTRY_NAME_REPLACE)) {
+            return backStackEntryName.substring(ENTRY_NAME_REPLACE.length());
         } else if (backStackEntryName.startsWith(ENTRY_NAME_ENTRANCE)) {
             return backStackEntryName.substring(ENTRY_NAME_ENTRANCE.length());
         } else {
@@ -519,19 +509,9 @@
         FragmentManager fragmentManager = activity.getSupportFragmentManager();
         FragmentTransaction ft = fragmentManager.beginTransaction();
         fragment.setUiStyle(UI_STYLE_ACTIVITY_ROOT);
-        initialBackground(fragment, id, ft);
         return ft.replace(id, fragment, TAG_LEAN_BACK_ACTIONS_FRAGMENT).commit();
     }
 
-    static void initialBackground(GuidedStepSupportFragment fragment, int id, FragmentTransaction ft) {
-        if (fragment.getContainerIdForBackground() != View.NO_ID) {
-            Fragment backgroundFragment = fragment.onProvideBackgroundSupportFragment();
-            if (backgroundFragment != null) {
-                ft.replace(fragment.getContainerIdForBackground(), backgroundFragment);
-            }
-        }
-    }
-
     /**
      * Returns the current GuidedStepSupportFragment on the fragment transaction stack.
      * @return The current GuidedStepSupportFragment, if any, on the fragment transaction stack.
@@ -545,20 +525,6 @@
     }
 
     /**
-     * @hide
-     */
-    public static class DummyFragment extends Fragment {
-
-        @Override
-        public View onCreateView(LayoutInflater inflater, ViewGroup container,
-                Bundle savedInstanceState) {
-            final View v = new View(inflater.getContext());
-            v.setVisibility(View.GONE);
-            return v;
-        }
-    }
-
-    /**
      * Returns the GuidanceStylist that displays guidance information for the user.
      * @return The GuidanceStylist for this fragment.
      */
@@ -756,12 +722,12 @@
      * Called by Constructor to provide fragment transitions.  The default implementation assigns
      * transitions based on {@link #getUiStyle()}:
      * <ul>
-     * <li> {@link #UI_STYLE_DEFAULT} Slide from/to end(right) for enter transition, slide from/to
+     * <li> {@link #UI_STYLE_REPLACE} Slide from/to end(right) for enter transition, slide from/to
      * start(left) for exit transition, shared element enter transition is set to ChangeBounds.
      * <li> {@link #UI_STYLE_ENTRANCE} Enter transition is set to slide from both sides, exit
-     * transition is same as {@link #UI_STYLE_DEFAULT}, no shared element enter transition.
+     * transition is same as {@link #UI_STYLE_REPLACE}, no shared element enter transition.
      * <li> {@link #UI_STYLE_ACTIVITY_ROOT} Enter transition is set to null and app should rely on
-     * activity transition, exit transition is same as {@link #UI_STYLE_DEFAULT}, no shared element
+     * activity transition, exit transition is same as {@link #UI_STYLE_REPLACE}, no shared element
      * enter transition.
      * </ul>
      * <p>
@@ -776,7 +742,8 @@
      */
     protected void onProvideFragmentTransitions() {
         if (Build.VERSION.SDK_INT >= 21) {
-            if (getUiStyle() == UI_STYLE_DEFAULT) {
+            final int uiStyle = getUiStyle();
+            if (uiStyle == UI_STYLE_REPLACE) {
                 Object enterTransition = TransitionHelper.createFadeAndShortSlide(Gravity.END);
                 TransitionHelper.exclude(enterTransition, R.id.action_fragment_background, true);
                 TransitionHelper.exclude(enterTransition, R.id.guided_button_actions_background,
@@ -784,7 +751,32 @@
                 TransitionHelper.exclude(enterTransition, R.id.guided_button_actions_background2,
                         true);
                 TransitionHelper.exclude(enterTransition, R.id.guidedactions_selector, true);
+                TransitionHelper.exclude(enterTransition, R.id.guidedstep_background, true);
                 TransitionHelper.setEnterTransition(this, enterTransition);
+
+                // exit transition is unchanged, same as default UI_STYLE_ENTRANCE
+
+                Object changeBounds = TransitionHelper.createChangeBounds(false);
+                TransitionHelper.setSharedElementEnterTransition(this, changeBounds);
+            } else if (uiStyle == UI_STYLE_ENTRANCE) {
+                Object fade = TransitionHelper.createFadeTransition(TransitionHelper.FADE_IN |
+                        TransitionHelper.FADE_OUT);
+                TransitionHelper.include(fade, R.id.guidedstep_background);
+                Object slide = TransitionHelper.createFadeAndShortSlide(Gravity.END |
+                        Gravity.START);
+                TransitionHelper.include(slide, R.id.content_fragment);
+                TransitionHelper.include(slide, R.id.action_fragment_background);
+                TransitionHelper.include(slide, R.id.guided_button_actions_background);
+                TransitionHelper.include(slide, R.id.guidedactions_selector);
+                TransitionHelper.include(slide, R.id.guidedactions_list);
+                TransitionHelper.include(slide, R.id.guided_button_actions_background2);
+                TransitionHelper.include(slide, R.id.guidedactions_selector2);
+                TransitionHelper.include(slide, R.id.guidedactions_list2);
+                Object enterTransition = TransitionHelper.createTransitionSet(false);
+                TransitionHelper.addTransition(enterTransition, fade);
+                TransitionHelper.addTransition(enterTransition, slide);
+                TransitionHelper.setEnterTransition(this, enterTransition);
+
                 Object exitTransition = TransitionHelper.createFadeAndShortSlide(Gravity.START);
                 TransitionHelper.exclude(exitTransition, R.id.action_fragment_background, true);
                 TransitionHelper.exclude(exitTransition, R.id.guided_button_actions_background,
@@ -793,118 +785,47 @@
                 TransitionHelper.exclude(exitTransition, R.id.guided_button_actions_background2,
                         true);
                 TransitionHelper.exclude(exitTransition, R.id.guidedactions_selector2, true);
+                TransitionHelper.exclude(exitTransition, R.id.guidedstep_background, true);
                 TransitionHelper.setExitTransition(this, exitTransition);
-
-                Object changeBounds = TransitionHelper.createChangeBounds(false);
-                TransitionHelper.setSharedElementEnterTransition(this, changeBounds);
-            } else if (getUiStyle() == UI_STYLE_ENTRANCE) {
-                Object enterTransition = TransitionHelper.createFadeAndShortSlide(Gravity.END |
-                        Gravity.START);
-                TransitionHelper.include(enterTransition, R.id.content_fragment);
-                TransitionHelper.include(enterTransition, R.id.action_fragment_background);
-                TransitionHelper.include(enterTransition, R.id.guided_button_actions_background);
-                TransitionHelper.include(enterTransition, R.id.guidedactions_selector);
-                TransitionHelper.include(enterTransition, R.id.guidedactions_list);
-                TransitionHelper.include(enterTransition, R.id.guided_button_actions_background2);
-                TransitionHelper.include(enterTransition, R.id.guidedactions_selector2);
-                TransitionHelper.include(enterTransition, R.id.guidedactions_list2);
-                TransitionHelper.setEnterTransition(this, enterTransition);
-                // exit transition is unchanged, same as UI_STYLE_DEFAULT
                 // No shared element transition
                 TransitionHelper.setSharedElementEnterTransition(this, null);
-            } else if (getUiStyle() == UI_STYLE_ACTIVITY_ROOT) {
+            } else if (uiStyle == UI_STYLE_ACTIVITY_ROOT) {
                 // for Activity root, we dont need enter transition, use activity transition
                 TransitionHelper.setEnterTransition(this, null);
-                // exit transition is unchanged, same as UI_STYLE_DEFAULT
+                // exit transition is unchanged, same as UI_STYLE_ENTRANCE
                 // No shared element transition
                 TransitionHelper.setSharedElementEnterTransition(this, null);
+            } else {
+                return;
             }
         }
     }
 
     /**
-     * Default implementation of background for covering content below GuidedStepSupportFragment.
-     * It uses current theme attribute guidedStepBackground which by default is read from
-     * android:windowBackground.
+     * Called by onCreateView to inflate background view.  Default implementation loads view
+     * from {@link R.layout#lb_guidedstep_background} which holds a reference to
+     * guidedStepBackground.
+     * @param inflater LayoutInflater to load background view.
+     * @param container Parent view of background view.
+     * @param savedInstanceState
+     * @return Created background view or null if no background.
      */
-    public static class GuidedStepBackgroundSupportFragment extends Fragment {
-        public GuidedStepBackgroundSupportFragment() {
-            onProvideFragmentTransitions();
-        }
-
-        /**
-         * Sets fragment transitions for GuidedStepBackgroundSupportFragment.  Can be overridden.
-         */
-        protected void onProvideFragmentTransitions() {
-            if (Build.VERSION.SDK_INT >= 21) {
-                Object enterTransition = TransitionHelper.createFadeTransition(
-                        TransitionHelper.FADE_IN|TransitionHelper.FADE_OUT);
-                TransitionHelper.setEnterTransition(this, enterTransition);
-            }
-        }
-
-        @Override
-        public View onCreateView(LayoutInflater inflater, ViewGroup container,
-                Bundle savedInstanceState) {
-            FragmentActivity activity = getActivity();
-            Context themedContext = null;
-            if (!isGuidedStepTheme(activity)) {
-                // Look up the guidedStepTheme in the activity's currently specified theme.  If it
-                // exists, replace the theme with its value.
-                int resId = R.attr.guidedStepTheme;
-                TypedValue typedValue = new TypedValue();
-                boolean found = activity.getTheme().resolveAttribute(resId, typedValue, true);
-                if (DEBUG) Log.v(TAG, "Found guided step theme reference? " + found);
-                if (found) {
-                    ContextThemeWrapper themeWrapper =
-                            new ContextThemeWrapper(activity, typedValue.resourceId);
-                    if (isGuidedStepTheme(themeWrapper)) {
-                        themedContext = themeWrapper;
-                    }
-                }
-                if (!found) {
-                    Log.e(TAG, "GuidedStepSupportFragment does not have an appropriate theme set.");
-                }
-            }
-
-            if (themedContext != null) {
-                inflater = inflater.cloneInContext(themedContext);
-            }
-
-            return inflater.inflate(R.layout.lb_guidedstep_background, container, false);
-        }
+    public View onCreateBackgroundView(LayoutInflater inflater, ViewGroup container,
+            Bundle savedInstanceState) {
+        return inflater.inflate(R.layout.lb_guidedstep_background, container, false);
     }
 
     /**
-     * Creates a background fragment for {@link #UI_STYLE_ENTRANCE}, returns null for other cases.
-     * Subclass may override the default behavior, e.g. provide different backgrounds
-     * for {@link #UI_STYLE_DEFAULT}.  Background fragment will be inserted in {@link
-     * #getContainerIdForBackground()}.
+     * Set UI style to fragment arguments. Default value is {@link #UI_STYLE_ENTRANCE} when fragment
+     * is first initialized. UI style is used to choose different fragment transition animations and
+     * determine if this is the first GuidedStepSupportFragment on backstack. In most cases app does not
+     * directly call this method, app calls helper function
+     * {@link #add(FragmentManager, GuidedStepSupportFragment, int)}. However if the app creates Fragment
+     * transaction and controls backstack by itself, it would need call setUiStyle() to select the
+     * fragment transition to use.
      *
-     * @return fragment that will be inserted below GuidedStepSupportFragment.
-     */
-    protected Fragment onProvideBackgroundSupportFragment() {
-        if (getUiStyle() == UI_STYLE_ENTRANCE) {
-            return new GuidedStepBackgroundSupportFragment();
-        }
-        return null;
-    }
-
-    /**
-     * Returns container id for inserting {@link #onProvideBackgroundSupportFragment()}.  The id should be
-     * different than container id for inserting GuidedStepSupportFragment.
-     * Default value is {@link View#NO_ID}.  Subclass must override to host background fragment.
-     * @return container id for inserting {@link #onProvideBackgroundSupportFragment()}
-     */
-    protected int getContainerIdForBackground() {
-        return View.NO_ID;
-    }
-
-
-    /**
-     * Set UI style to fragment arguments,  UI style cannot be changed after initialization.
-     * @param style {@link #UI_STYLE_ACTIVITY_ROOT} {@link #UI_STYLE_DEFAULT} or
-     * {@link #UI_STYLE_ENTRANCE}.
+     * @param style {@link #UI_STYLE_ACTIVITY_ROOT} {@link #UI_STYLE_REPLACE} or
+     *        {@link #UI_STYLE_ENTRANCE}.
      */
     public void setUiStyle(int style) {
         int oldStyle = getUiStyle();
@@ -925,15 +846,18 @@
     }
 
     /**
-     * Read UI style from fragment arguments.
+     * Read UI style from fragment arguments.  Default value is {@link #UI_STYLE_ENTRANCE} when
+     * fragment is first initialized.  UI style is used to choose different fragment transition
+     * animations and determine if this is the first GuidedStepSupportFragment on backstack.
      *
-     * @return {@link #UI_STYLE_ACTIVITY_ROOT} {@link #UI_STYLE_DEFAULT} or
+     * @return {@link #UI_STYLE_ACTIVITY_ROOT} {@link #UI_STYLE_REPLACE} or
      * {@link #UI_STYLE_ENTRANCE}.
+     * @see #onProvideFragmentTransitions()
      */
     public int getUiStyle() {
         Bundle b = getArguments();
-        if (b == null) return UI_STYLE_DEFAULT;
-        return b.getInt(EXTRA_UI_STYLE, UI_STYLE_DEFAULT);
+        if (b == null) return UI_STYLE_ENTRANCE;
+        return b.getInt(EXTRA_UI_STYLE, UI_STYLE_ENTRANCE);
     }
 
     /**
@@ -984,9 +908,10 @@
         resolveTheme();
         inflater = getThemeInflater(inflater);
 
-        View v = inflater.inflate(R.layout.lb_guidedstep_fragment, container, false);
-        ViewGroup guidanceContainer = (ViewGroup) v.findViewById(R.id.content_fragment);
-        ViewGroup actionContainer = (ViewGroup) v.findViewById(R.id.action_fragment);
+        ViewGroup root = (ViewGroup) inflater.inflate(R.layout.lb_guidedstep_fragment,
+                container, false);
+        ViewGroup guidanceContainer = (ViewGroup) root.findViewById(R.id.content_fragment);
+        ViewGroup actionContainer = (ViewGroup) root.findViewById(R.id.action_fragment);
 
         Guidance guidance = onCreateGuidance(savedInstanceState);
         View guidanceView = mGuidanceStylist.onCreateView(inflater, guidanceContainer, guidance);
@@ -1040,7 +965,7 @@
             TypedValue typedValue = new TypedValue();
             if (ctx.getTheme().resolveAttribute(R.attr.guidedActionContentWidthWeightTwoPanels,
                     typedValue, true)) {
-                View actionsRoot = v.findViewById(R.id.action_fragment_root);
+                View actionsRoot = root.findViewById(R.id.action_fragment_root);
                 float weight = typedValue.getFloat();
                 LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) actionsRoot
                         .getLayoutParams();
@@ -1055,7 +980,11 @@
 
         setSelectedButtonActionPosition(0);
 
-        return v;
+        View backgroundView = onCreateBackgroundView(inflater, root, savedInstanceState);
+        if (backgroundView != null) {
+            root.addView(backgroundView, 0);
+        }
+        return root;
     }
 
     @Override
@@ -1087,6 +1016,8 @@
      * Convenient method to close GuidedStepSupportFragments on top of other content or finish Activity if
      * GuidedStepSupportFragments were started in a separate activity.  Pops all stack entries including
      * {@link #UI_STYLE_ENTRANCE}; if {@link #UI_STYLE_ENTRANCE} is not found, finish the activity.
+     * Note that this method must be paired with {@link #add(FragmentManager, GuidedStepSupportFragment,
+     * int)} which sets up the stack entry name for finding which fragment we need to pop back to.
      */
     public void finishGuidedStepSupportFragments() {
         final FragmentManager fragmentManager = getFragmentManager();
diff --git a/v17/leanback/src/android/support/v17/leanback/widget/CheckableImageView.java b/v17/leanback/src/android/support/v17/leanback/widget/CheckableImageView.java
new file mode 100644
index 0000000..627bbd4
--- /dev/null
+++ b/v17/leanback/src/android/support/v17/leanback/widget/CheckableImageView.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package android.support.v17.leanback.widget;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.widget.Checkable;
+import android.widget.ImageView;
+
+/**
+ * ImageView that supports Checkable states.
+ */
+class CheckableImageView extends ImageView implements Checkable {
+
+    private boolean mChecked;
+
+    private static final int[] CHECKED_STATE_SET = { android.R.attr.state_checked };
+
+    public CheckableImageView(Context context) {
+        this(context, null);
+    }
+
+    public CheckableImageView(Context context, AttributeSet attrs) {
+        this(context, attrs, 0);
+    }
+
+    public CheckableImageView(Context context, AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+    }
+
+    @Override
+    public int[] onCreateDrawableState(final int extraSpace) {
+        final int[] drawableState = super.onCreateDrawableState(extraSpace + 1);
+        if (isChecked()) {
+            mergeDrawableStates(drawableState, CHECKED_STATE_SET);
+        }
+        return drawableState;
+    }
+
+    @Override
+    public void toggle() {
+        setChecked(!mChecked);
+    }
+
+    @Override
+    public boolean isChecked() {
+        return mChecked;
+    }
+
+    @Override
+    public void setChecked(final boolean checked) {
+        if (mChecked != checked) {
+            mChecked = checked;
+            refreshDrawableState();
+        }
+    }
+
+}
diff --git a/v17/leanback/src/android/support/v17/leanback/widget/GuidedAction.java b/v17/leanback/src/android/support/v17/leanback/widget/GuidedAction.java
index 4031677..21986d5 100644
--- a/v17/leanback/src/android/support/v17/leanback/widget/GuidedAction.java
+++ b/v17/leanback/src/android/support/v17/leanback/widget/GuidedAction.java
@@ -37,8 +37,18 @@
 
     private static final String TAG = "GuidedAction";
 
+    /**
+     * Special check set Id that is neither checkbox nor radio.
+     */
     public static final int NO_CHECK_SET = 0;
+    /**
+     * Default checkset Id for radio.
+     */
     public static final int DEFAULT_CHECK_SET_ID = 1;
+    /**
+     * Checkset Id for checkbox.
+     */
+    public static final int CHECKBOX_CHECK_SET_ID = -1;
 
     /**
      * When finishing editing, goes to next action.
@@ -371,10 +381,11 @@
         }
 
         /**
-         * Indicates whether this action is part of a single-select group similar to radio buttons.
-         * When one item in a check set is checked, all others with the same check set ID will be
-         * unchecked automatically.
-         * @param checkSetId The check set ID, or {@link #NO_CHECK_SET) to indicate no check set.
+         * Indicates whether this action is part of a single-select group similar to radio buttons
+         * or this action is a checkbox. When one item in a check set is checked, all others with
+         * the same check set ID will be nchecked automatically.
+         * @param checkSetId The check set ID, or {@link GuidedAction#NO_CHECK_SET} to indicate not
+         * radio or checkbox, or {@link GuidedAction#CHECKBOX_CHECK_SET_ID} to indicate a checkbox.
          */
         public Builder checkSetId(int checkSetId) {
             mCheckSetId = checkSetId;
@@ -604,13 +615,13 @@
     }
 
     /**
-     * Returns the check set id this action is a part of. All actions in the
-     * same list with the same check set id are considered linked. When one
-     * of the actions within that set is selected, that action becomes
-     * checked, while all the other actions become unchecked.
+     * Returns the check set id this action is a part of. All actions in the same list with the same
+     * check set id are considered linked. When one of the actions within that set is selected, that
+     * action becomes checked, while all the other actions become unchecked.
      *
      * @return an integer representing the check set this action is a part of, or
-     *         {@link #NO_CHECK_SET} if this action isn't a part of a check set.
+     *         {@link #CHECKBOX_CHECK_SET_ID} if this is a checkbox, or {@link #NO_CHECK_SET} if
+     *         this action is not a checkbox or radiobutton.
      */
     public int getCheckSetId() {
         return mCheckSetId;
diff --git a/v17/leanback/src/android/support/v17/leanback/widget/GuidedActionsStylist.java b/v17/leanback/src/android/support/v17/leanback/widget/GuidedActionsStylist.java
index 89ccc1e..8cdcdc8 100644
--- a/v17/leanback/src/android/support/v17/leanback/widget/GuidedActionsStylist.java
+++ b/v17/leanback/src/android/support/v17/leanback/widget/GuidedActionsStylist.java
@@ -27,6 +27,7 @@
 import android.support.annotation.NonNull;
 import android.support.v17.leanback.R;
 import android.support.v17.leanback.widget.VerticalGridView;
+import android.support.v4.content.ContextCompat;
 import android.support.v4.view.ViewCompat;
 import android.support.v7.widget.RecyclerView;
 import android.support.v7.widget.RecyclerView.ViewHolder;
@@ -34,6 +35,7 @@
 import android.util.Log;
 import android.util.TypedValue;
 import android.view.animation.DecelerateInterpolator;
+import android.view.inputmethod.EditorInfo;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -41,6 +43,7 @@
 import android.view.ViewPropertyAnimator;
 import android.view.ViewTreeObserver;
 import android.view.WindowManager;
+import android.widget.Checkable;
 import android.widget.EditText;
 import android.widget.ImageView;
 import android.widget.TextView;
@@ -101,8 +104,6 @@
  * @attr ref android.support.v17.leanback.R.styleable#LeanbackGuidedStepTheme_guidedActionItemTitleStyle
  * @attr ref android.support.v17.leanback.R.styleable#LeanbackGuidedStepTheme_guidedActionItemDescriptionStyle
  * @attr ref android.support.v17.leanback.R.styleable#LeanbackGuidedStepTheme_guidedActionItemChevronStyle
- * @attr ref android.support.v17.leanback.R.styleable#LeanbackGuidedStepTheme_guidedActionCheckedAnimation
- * @attr ref android.support.v17.leanback.R.styleable#LeanbackGuidedStepTheme_guidedActionUncheckedAnimation
  * @attr ref android.support.v17.leanback.R.styleable#LeanbackGuidedStepTheme_guidedActionPressedAnimation
  * @attr ref android.support.v17.leanback.R.styleable#LeanbackGuidedStepTheme_guidedActionUnpressedAnimation
  * @attr ref android.support.v17.leanback.R.styleable#LeanbackGuidedStepTheme_guidedActionEnabledChevronAlpha
@@ -111,6 +112,8 @@
  * @attr ref android.support.v17.leanback.R.styleable#LeanbackGuidedStepTheme_guidedActionTitleMaxLines
  * @attr ref android.support.v17.leanback.R.styleable#LeanbackGuidedStepTheme_guidedActionDescriptionMinLines
  * @attr ref android.support.v17.leanback.R.styleable#LeanbackGuidedStepTheme_guidedActionVerticalPadding
+ * @see android.R.styleable#Theme_listChoiceIndicatorSingle
+ * @see android.R.styleable#Theme_listChoiceIndicatorMultiple
  * @see android.support.v17.leanback.app.GuidedStepFragment
  * @see GuidedAction
  */
@@ -519,14 +522,12 @@
             vh.mDescriptionView.setFocusable(action.isDescriptionEditable());
         }
         // Clients might want the check mark view to be gone entirely, in which case, ignore it.
-        if (vh.mCheckmarkView != null && vh.mCheckmarkView.getVisibility() != View.GONE) {
-            vh.mCheckmarkView.setVisibility(action.isChecked() ? View.VISIBLE : View.INVISIBLE);
+        if (vh.mCheckmarkView != null) {
+            onBindCheckMarkView(vh, action);
         }
 
         if (vh.mChevronView != null) {
-            vh.mChevronView.setVisibility(action.hasNext() ? View.VISIBLE : View.GONE);
-            vh.mChevronView.setAlpha(action.isEnabled() ? mEnabledChevronAlpha :
-                    mDisabledChevronAlpha);
+            onBindChevronView(vh, action);
         }
 
         if (action.hasMultilineDescription()) {
@@ -557,6 +558,24 @@
                 ((ViewGroup) vh.view).setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
             }
         }
+        setupImeOptions(vh, action);
+    }
+
+    /**
+     * Called by {@link #onBindViewHolder(ViewHolder, GuidedAction)} to setup IME options.  Default
+     * implementation assigns {@link EditorInfo#IME_ACTION_DONE}.  Subclass may override.
+     * @param vh The view holder to be associated with the given action.
+     * @param action The guided action to be displayed by the view holder's view.
+     */
+    protected void setupImeOptions(ViewHolder vh, GuidedAction action) {
+        setupNextImeOptions(vh.getEditableTitleView());
+        setupNextImeOptions(vh.getEditableDescriptionView());
+    }
+
+    private void setupNextImeOptions(EditText edit) {
+        if (edit != null) {
+            edit.setImeOptions(EditorInfo.IME_ACTION_NEXT);
+        }
     }
 
     public void setEditingMode(ViewHolder vh, GuidedAction action, boolean editing) {
@@ -644,31 +663,69 @@
     }
 
     /**
-     * Animates the view holder's view (or subviews thereof) when the action has had its check
-     * state changed.
+     * Animates the view holder's view (or subviews thereof) when the action has had its check state
+     * changed. Default implementation calls setChecked() if {@link ViewHolder#getCheckmarkView()}
+     * is instance of {@link Checkable}.
+     *
      * @param vh The view holder associated with the relevant action.
      * @param checked True if the action has become checked, false if it has become unchecked.
+     * @see #onBindCheckMarkView(ViewHolder, GuidedAction)
      */
     public void onAnimateItemChecked(ViewHolder vh, boolean checked) {
-        final View checkView = vh.mCheckmarkView;
-        if (checkView != null) {
-            if (checked) {
-                checkView.setVisibility(View.VISIBLE);
-                createAnimator(checkView, R.attr.guidedActionCheckedAnimation).start();
-            } else {
-                Animator animator = createAnimator(checkView,
-                        R.attr.guidedActionUncheckedAnimation);
-                animator.addListener(new AnimatorListenerAdapter() {
-                    @Override
-                    public void onAnimationEnd(Animator animation) {
-                        checkView.setVisibility(View.INVISIBLE);
-                    }
-                });
-                animator.start();
-            }
+        if (vh.mCheckmarkView instanceof Checkable) {
+            ((Checkable) vh.mCheckmarkView).setChecked(checked);
         }
     }
 
+    /**
+     * Sets states of check mark view, called by {@link #onBindViewHolder(ViewHolder, GuidedAction)}
+     * when action's checkset Id is other than {@link GuidedAction#NO_CHECK_SET}. Default
+     * implementation assigns drawable loaded from theme attribute
+     * {@link android.R.attr#listChoiceIndicatorMultiple} for checkbox or
+     * {@link android.R.attr#listChoiceIndicatorSingle} for radio button. Subclass rarely needs
+     * override the method, instead app can provide its own drawable that supports transition
+     * animations, change theme attributes {@link android.R.attr#listChoiceIndicatorMultiple} and
+     * {@link android.R.attr#listChoiceIndicatorSingle} in {android.support.v17.leanback.R.
+     * styleable#LeanbackGuidedStepTheme}.
+     *
+     * @param vh The view holder associated with the relevant action.
+     * @param action The GuidedAction object to bind to.
+     * @see #onAnimateItemChecked(ViewHolder, boolean)
+     */
+    public void onBindCheckMarkView(ViewHolder vh, GuidedAction action) {
+        if (action.getCheckSetId() != GuidedAction.NO_CHECK_SET) {
+            vh.mCheckmarkView.setVisibility(View.VISIBLE);
+            int attrId = action.getCheckSetId() == GuidedAction.CHECKBOX_CHECK_SET_ID ?
+                    android.R.attr.listChoiceIndicatorMultiple :
+                    android.R.attr.listChoiceIndicatorSingle;
+            final Context context = vh.mCheckmarkView.getContext();
+            Drawable drawable = null;
+            TypedValue typedValue = new TypedValue();
+            if (context.getTheme().resolveAttribute(attrId, typedValue, true)) {
+                drawable = ContextCompat.getDrawable(context, typedValue.resourceId);
+            }
+            vh.mCheckmarkView.setImageDrawable(drawable);
+            if (vh.mCheckmarkView instanceof Checkable) {
+                ((Checkable) vh.mCheckmarkView).setChecked(action.isChecked());
+            }
+        } else {
+            vh.mCheckmarkView.setVisibility(View.GONE);
+        }
+    }
+
+    /**
+     * Sets states of chevron view, called by {@link #onBindViewHolder(ViewHolder, GuidedAction)}.
+     * Subclass may override.
+     *
+     * @param vh The view holder associated with the relevant action.
+     * @param action The GuidedAction object to bind to.
+     */
+    public void onBindChevronView(ViewHolder vh, GuidedAction action) {
+        vh.mChevronView.setVisibility(action.hasNext() ? View.VISIBLE : View.GONE);
+        vh.mChevronView.setAlpha(action.isEnabled() ? mEnabledChevronAlpha :
+                mDisabledChevronAlpha);
+    }
+
     /*
      * ==========================================
      * FragmentAnimationProvider overrides
diff --git a/v4/api21/android/support/v4/media/MediaBrowserCompatApi21.java b/v4/api21/android/support/v4/media/MediaBrowserCompatApi21.java
index b285296..c6ccb14 100644
--- a/v4/api21/android/support/v4/media/MediaBrowserCompatApi21.java
+++ b/v4/api21/android/support/v4/media/MediaBrowserCompatApi21.java
@@ -27,6 +27,8 @@
 import java.util.List;
 
 class MediaBrowserCompatApi21 {
+    static final String NULL_MEDIA_ITEM_ID =
+            "android.support.v4.media.MediaBrowserCompat.NULL_MEDIA_ITEM";
 
     public static Object createConnectionCallback(ConnectionCallback callback) {
         return new ConnectionCallbackProxy<>(callback);
@@ -112,7 +114,7 @@
     }
 
     interface SubscriptionCallback {
-        void onChildrenLoaded(@NonNull String parentId, @NonNull List<Parcel> children);
+        void onChildrenLoaded(@NonNull String parentId, List<Parcel> children);
         void onError(@NonNull String parentId);
     }
 
@@ -126,8 +128,12 @@
 
         @Override
         public void onChildrenLoaded(@NonNull String parentId,
-                @NonNull List<MediaBrowser.MediaItem> children) {
+                List<MediaBrowser.MediaItem> children) {
             List<Parcel> parcelList = null;
+            if (children != null && children.size() == 1
+                    && children.get(0).getMediaId().equals(NULL_MEDIA_ITEM_ID)) {
+                children = null;
+            }
             if (children != null) {
                 parcelList = new ArrayList<>();
                 for (MediaBrowser.MediaItem item : children) {
diff --git a/v4/api21/android/support/v4/media/MediaBrowserServiceCompatApi21.java b/v4/api21/android/support/v4/media/MediaBrowserServiceCompatApi21.java
index 1baa14c..a1506d3 100644
--- a/v4/api21/android/support/v4/media/MediaBrowserServiceCompatApi21.java
+++ b/v4/api21/android/support/v4/media/MediaBrowserServiceCompatApi21.java
@@ -18,8 +18,10 @@
 
 import android.content.Intent;
 import android.content.pm.ParceledListSlice;
+import android.media.MediaDescription;
 import android.media.browse.MediaBrowser;
 import android.media.session.MediaSession;
+import android.os.Build;
 import android.os.Bundle;
 import android.os.IBinder;
 import android.os.Parcel;
@@ -61,6 +63,16 @@
     }
 
     public static class ServiceCallbacksApi21 implements ServiceCallbacks {
+        private static final ParceledListSlice sNullParceledListSlice;
+        static {
+            MediaDescription nullDescription = new MediaDescription.Builder().setMediaId(
+                    MediaBrowserCompatApi21.NULL_MEDIA_ITEM_ID).build();
+            MediaBrowser.MediaItem nullMediaItem = new MediaBrowser.MediaItem(nullDescription, 0);
+            List<MediaBrowser.MediaItem> nullMediaItemList = new ArrayList<>();
+            nullMediaItemList.add(nullMediaItem);
+            sNullParceledListSlice = new ParceledListSlice(nullMediaItemList);
+        }
+
         private final IMediaBrowserServiceCallbacks mCallbacks;
 
         ServiceCallbacksApi21(IMediaBrowserServiceCallbacks callbacks) {
@@ -89,7 +101,12 @@
                     parcel.recycle();
                 }
             }
-            final ParceledListSlice<MediaBrowser.MediaItem> pls = new ParceledListSlice(itemList);
+            ParceledListSlice<MediaBrowser.MediaItem> pls;
+            if (Build.VERSION.SDK_INT > 23) {
+                pls = itemList == null ? null : new ParceledListSlice(itemList);
+            } else {
+                pls = itemList == null ? sNullParceledListSlice : new ParceledListSlice(itemList);
+            }
             mCallbacks.onLoadChildren(mediaId, pls);
         }
     }
diff --git a/v4/java/android/support/v4/media/MediaBrowserCompat.java b/v4/java/android/support/v4/media/MediaBrowserCompat.java
index 18da6d5..dcce7f5 100644
--- a/v4/java/android/support/v4/media/MediaBrowserCompat.java
+++ b/v4/java/android/support/v4/media/MediaBrowserCompat.java
@@ -42,7 +42,6 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 
 import static android.support.v4.media.MediaBrowserProtocol.*;
@@ -394,10 +393,9 @@
          * Called when the list of children is loaded or updated.
          *
          * @param parentId The media id of the parent media item.
-         * @param children The children which were loaded.
+         * @param children The children which were loaded, or null if the id is invalid.
          */
-        public void onChildrenLoaded(@NonNull String parentId,
-                                     @NonNull List<MediaItem> children) {
+        public void onChildrenLoaded(@NonNull String parentId, List<MediaItem> children) {
         }
 
         /**
@@ -862,9 +860,6 @@
             if (DBG) {
                 Log.d(TAG, "onLoadChildren for " + mServiceComponent + " id=" + parentId);
             }
-            if (data == null) {
-                data = Collections.emptyList();
-            }
 
             // Check that the subscription is still subscribed.
             final Subscription subscription = mSubscriptions.get(parentId);
diff --git a/v4/java/android/support/v4/media/MediaBrowserServiceCompat.java b/v4/java/android/support/v4/media/MediaBrowserServiceCompat.java
index e2363cd..205e789 100644
--- a/v4/java/android/support/v4/media/MediaBrowserServiceCompat.java
+++ b/v4/java/android/support/v4/media/MediaBrowserServiceCompat.java
@@ -470,9 +470,12 @@
 
         public void onLoadChildren(String mediaId, List<MediaBrowserCompat.MediaItem> list)
                 throws RemoteException {
-            Bundle data = new Bundle();
-            data.putParcelableArrayList(SERVICE_DATA_MEDIA_ITEM_LIST,
-                    list instanceof ArrayList ? (ArrayList) list : new ArrayList<>(list));
+            Bundle data = null;
+            if (list != null) {
+                data = new Bundle();
+                data.putParcelableArrayList(SERVICE_DATA_MEDIA_ITEM_LIST,
+                        list instanceof ArrayList ? (ArrayList) list : new ArrayList<>(list));
+            }
             sendRequest(SERVICE_MSG_ON_LOAD_CHILDREN, mediaId, data);
         }
 
@@ -716,10 +719,6 @@
                 = new Result<List<MediaBrowserCompat.MediaItem>>(parentId) {
             @Override
             void onResultSent(List<MediaBrowserCompat.MediaItem> list) {
-                if (list == null) {
-                    throw new IllegalStateException("onLoadChildren sent null list for id "
-                            + parentId);
-                }
                 if (mConnections.get(connection.callbacks.asBinder()) != connection) {
                     if (DBG) {
                         Log.d(TAG, "Not sending onLoadChildren result for connection that has"