OSDN Git Service

Use floating-point value for Drawable level
authorAlan Viverette <alanv@google.com>
Wed, 2 Sep 2015 17:33:58 +0000 (13:33 -0400)
committerAlan Viverette <alanv@google.com>
Wed, 2 Sep 2015 17:33:58 +0000 (13:33 -0400)
commit3da32b768899e7dabe3a16333edf5eca2b9ebe93
treefe6702158566934b6fa920983beede3803944a0c
parent3d21421a440bb86dcd80bad8bc85fb1e859cd0d8
Use floating-point value for Drawable level

This allows us to run fine-grained level animations.

Backwards compatibility:
Another CL will add DrawableCompat.setLevel(float) to forward calls to
the existing integer-based method. For callbacks, developers can override
onLevelChanged(int) and use DrawableCompat.getLevelFloat() to obtain the
floating-point level. Overriding onLevelChanged(float) will only work on
current API.

Bug: 23566299
Change-Id: I431fe6f3679c8f23f9cf3c2bb1f92a4059ee68e3
12 files changed:
api/current.txt
api/system-current.txt
graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
graphics/java/android/graphics/drawable/ClipDrawable.java
graphics/java/android/graphics/drawable/Drawable.java
graphics/java/android/graphics/drawable/DrawableContainer.java
graphics/java/android/graphics/drawable/DrawableWrapper.java
graphics/java/android/graphics/drawable/GradientDrawable.java
graphics/java/android/graphics/drawable/LayerDrawable.java
graphics/java/android/graphics/drawable/LevelListDrawable.java
graphics/java/android/graphics/drawable/RotateDrawable.java
graphics/java/android/graphics/drawable/ScaleDrawable.java