Loading graphics/java/android/graphics/drawable/InsetDrawable.java +7 −1 Original line number Original line Diff line number Diff line Loading @@ -203,6 +203,12 @@ public class InsetDrawable extends Drawable implements Drawable.Callback mInsetState.mDrawable.setColorFilter(cf); mInsetState.mDrawable.setColorFilter(cf); } } /** {@hide} */ @Override public void setLayoutDirection(int layoutDirection) { mInsetState.mDrawable.setLayoutDirection(layoutDirection); } @Override @Override public int getOpacity() { public int getOpacity() { return mInsetState.mDrawable.getOpacity(); return mInsetState.mDrawable.getOpacity(); Loading graphics/java/android/graphics/drawable/NinePatchDrawable.java +18 −6 Original line number Original line Diff line number Diff line Loading @@ -219,16 +219,15 @@ public class NinePatchDrawable extends Drawable { @Override @Override public void draw(Canvas canvas) { public void draw(Canvas canvas) { final Rect bounds = getBounds(); final Rect bounds = getBounds(); final boolean needMirroring = isAutoMirrored() && final boolean needsMirroring = needsMirroring(); getLayoutDirection() == LayoutDirection.RTL; if (needsMirroring) { if (needMirroring) { canvas.save(); canvas.save(); // Mirror the 9patch // Mirror the 9patch canvas.translate(bounds.right - bounds.left, 0); canvas.translate(bounds.right - bounds.left, 0); canvas.scale(-1.0f, 1.0f); canvas.scale(-1.0f, 1.0f); } } mNinePatch.draw(canvas, bounds, mPaint); mNinePatch.draw(canvas, bounds, mPaint); if (needMirroring) { if (needsMirroring) { canvas.restore(); canvas.restore(); } } } } Loading @@ -240,7 +239,11 @@ public class NinePatchDrawable extends Drawable { @Override @Override public boolean getPadding(Rect padding) { public boolean getPadding(Rect padding) { if (needsMirroring()) { padding.set(mPadding.right, mPadding.top, mPadding.left, mPadding.bottom); } else { padding.set(mPadding); padding.set(mPadding); } return true; return true; } } Loading @@ -249,8 +252,13 @@ public class NinePatchDrawable extends Drawable { */ */ @Override @Override public Insets getOpticalInsets() { public Insets getOpticalInsets() { if (needsMirroring()) { return Insets.of(mOpticalInsets.right, mOpticalInsets.top, mOpticalInsets.right, mOpticalInsets.bottom); } else { return mOpticalInsets; return mOpticalInsets; } } } @Override @Override public void setAlpha(int alpha) { public void setAlpha(int alpha) { Loading Loading @@ -297,6 +305,10 @@ public class NinePatchDrawable extends Drawable { mNinePatchState.mAutoMirrored = mirrored; mNinePatchState.mAutoMirrored = mirrored; } } private boolean needsMirroring() { return isAutoMirrored() && getLayoutDirection() == LayoutDirection.RTL; } @Override @Override public boolean isAutoMirrored() { public boolean isAutoMirrored() { return mNinePatchState.mAutoMirrored; return mNinePatchState.mAutoMirrored; Loading packages/DocumentsUI/res/animator-ldrtl/dir_down.xml 0 → 100644 +22 −0 Original line number Original line Diff line number Diff line <!-- Copyright (C) 2013 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:valueFrom="-1" android:valueTo="0" android:propertyName="position" android:valueType="floatType" android:duration="@android:integer/config_mediumAnimTime" android:interpolator="@android:interpolator/decelerate_quad" /> packages/DocumentsUI/res/animator-ldrtl/dir_up.xml 0 → 100644 +22 −0 Original line number Original line Diff line number Diff line <!-- Copyright (C) 2013 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:valueFrom="0" android:valueTo="-1" android:propertyName="position" android:valueType="floatType" android:duration="@android:integer/config_mediumAnimTime" android:interpolator="@android:interpolator/accelerate_quad" /> packages/DocumentsUI/res/drawable-hdpi/ic_dir_shadow.9.png→packages/DocumentsUI/res/drawable-hdpi/ic_dir_shadow_am.9.png (184 B) File moved. View file Loading
graphics/java/android/graphics/drawable/InsetDrawable.java +7 −1 Original line number Original line Diff line number Diff line Loading @@ -203,6 +203,12 @@ public class InsetDrawable extends Drawable implements Drawable.Callback mInsetState.mDrawable.setColorFilter(cf); mInsetState.mDrawable.setColorFilter(cf); } } /** {@hide} */ @Override public void setLayoutDirection(int layoutDirection) { mInsetState.mDrawable.setLayoutDirection(layoutDirection); } @Override @Override public int getOpacity() { public int getOpacity() { return mInsetState.mDrawable.getOpacity(); return mInsetState.mDrawable.getOpacity(); Loading
graphics/java/android/graphics/drawable/NinePatchDrawable.java +18 −6 Original line number Original line Diff line number Diff line Loading @@ -219,16 +219,15 @@ public class NinePatchDrawable extends Drawable { @Override @Override public void draw(Canvas canvas) { public void draw(Canvas canvas) { final Rect bounds = getBounds(); final Rect bounds = getBounds(); final boolean needMirroring = isAutoMirrored() && final boolean needsMirroring = needsMirroring(); getLayoutDirection() == LayoutDirection.RTL; if (needsMirroring) { if (needMirroring) { canvas.save(); canvas.save(); // Mirror the 9patch // Mirror the 9patch canvas.translate(bounds.right - bounds.left, 0); canvas.translate(bounds.right - bounds.left, 0); canvas.scale(-1.0f, 1.0f); canvas.scale(-1.0f, 1.0f); } } mNinePatch.draw(canvas, bounds, mPaint); mNinePatch.draw(canvas, bounds, mPaint); if (needMirroring) { if (needsMirroring) { canvas.restore(); canvas.restore(); } } } } Loading @@ -240,7 +239,11 @@ public class NinePatchDrawable extends Drawable { @Override @Override public boolean getPadding(Rect padding) { public boolean getPadding(Rect padding) { if (needsMirroring()) { padding.set(mPadding.right, mPadding.top, mPadding.left, mPadding.bottom); } else { padding.set(mPadding); padding.set(mPadding); } return true; return true; } } Loading @@ -249,8 +252,13 @@ public class NinePatchDrawable extends Drawable { */ */ @Override @Override public Insets getOpticalInsets() { public Insets getOpticalInsets() { if (needsMirroring()) { return Insets.of(mOpticalInsets.right, mOpticalInsets.top, mOpticalInsets.right, mOpticalInsets.bottom); } else { return mOpticalInsets; return mOpticalInsets; } } } @Override @Override public void setAlpha(int alpha) { public void setAlpha(int alpha) { Loading Loading @@ -297,6 +305,10 @@ public class NinePatchDrawable extends Drawable { mNinePatchState.mAutoMirrored = mirrored; mNinePatchState.mAutoMirrored = mirrored; } } private boolean needsMirroring() { return isAutoMirrored() && getLayoutDirection() == LayoutDirection.RTL; } @Override @Override public boolean isAutoMirrored() { public boolean isAutoMirrored() { return mNinePatchState.mAutoMirrored; return mNinePatchState.mAutoMirrored; Loading
packages/DocumentsUI/res/animator-ldrtl/dir_down.xml 0 → 100644 +22 −0 Original line number Original line Diff line number Diff line <!-- Copyright (C) 2013 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:valueFrom="-1" android:valueTo="0" android:propertyName="position" android:valueType="floatType" android:duration="@android:integer/config_mediumAnimTime" android:interpolator="@android:interpolator/decelerate_quad" />
packages/DocumentsUI/res/animator-ldrtl/dir_up.xml 0 → 100644 +22 −0 Original line number Original line Diff line number Diff line <!-- Copyright (C) 2013 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:valueFrom="0" android:valueTo="-1" android:propertyName="position" android:valueType="floatType" android:duration="@android:integer/config_mediumAnimTime" android:interpolator="@android:interpolator/accelerate_quad" />
packages/DocumentsUI/res/drawable-hdpi/ic_dir_shadow.9.png→packages/DocumentsUI/res/drawable-hdpi/ic_dir_shadow_am.9.png (184 B) File moved. View file