bf4318c67254bc11307796601b9fb4a8bbfe67b2 |
|
21-Feb-2017 |
Dake Gu <dake@google.com> |
Parallax: API factorying and add direct mapping Remove six classes from api file: Parallax.IntParallax, Parallax.FloatParallax Parallax.IntPropertyMarkerValue, Parallax.FloatPropertyMarkerValue, ParallaxEffect.IntEffect parallaxEffect.FloatEffect. Remove methods Parallax.verifyProperties ParallaxTarget.getFraction from API file The standard parallax mapping converts value of source into 0~1 fraction then convert it back to target value. This is not only inefficient but also causing rounding errors. Added a concept of ParallaxTarget.isDirectMapping(). When true, ParallaxEffect bypass the fraction calcuation and directly passes value from source Property to ParallaxTarget.updateValue(Number). Now DetailsFragment uses direct mapping for changing child drawable's bound. Fix the bug that ValuesRule's type is unmodifiable. Bug: 35933446 Bug: 32022097 Bug: 35632609 Test: DetailsFragmentTest.parallaxTest ParallaxIntEffectTest.testDirectMapping CompositeDrawableTest Change-Id: Ibd89ba6621fc0804ea24cba099b6d2e6bf3fccc9
/frameworks/support/v17/leanback/tests/java/android/support/v17/leanback/graphics/CompositeDrawableTest.java
|
e1cde4d4ac42a6e9e16aad2b4df970c7c7d0771c |
|
21-Dec-2016 |
Dake Gu <dake@google.com> |
Leanback: parallax and details video API refactoring There are too many new concpets introduced when we create multiple building blocks around parallax. This CL tries to get rid of some classes. 1. Remove class ParallaxSource, integrated into Parallax. So there is no more setSource()/getSource(). 2. Replace DetailsParallaxManager with DetailsParallax. It is no longer a manager pattern but DetailsParallax is a direct subclass of Parallax. 3. Replace DetailsBackgroundParallaxHelper with DetailsParallaxDrawable which is a direct subclass of CompositeDrawble. No more helper concept. 4. remove the glue creation API from DetailsFragment, those are not necessary and app can do it on the side. The summary of new classes: 1. Parallax, tracks multiple UI events and perform multiple ParallaxEffects on ParallaxTargets. RecyclerViewParallax is a subclass of Parallax that monitors RecyclerView child positions. 2. DetailsParallax is a subclass of RecyclerViewParallax, DetailsFragment holds the DetailsParallax object and is responsible to attach it to VerticalGridView and sync with Transition animation. DetailsParallax is shared by both background bitmap and video. 3. Created a DetailsFragmentBackgroundController class responsible for parallax background and embedded video playing. Bug: 33750080 Bug: 33751156 Test: all existing leanback tests Change-Id: Iec81a444d5d4fbeb675f16222b09b407acf007a2
/frameworks/support/v17/leanback/tests/java/android/support/v17/leanback/graphics/CompositeDrawableTest.java
|
450fe7ab2d8a911ecdc335d55c60dfbae70f2407 |
|
07-Oct-2016 |
susnata <susnata@google.com> |
Fixing the bug (cloning) with CompositeDrawable. We were not copying the boundsrule while cloning child drawables inside CompositeDrawable. Test: CompositeDrawableTest Change-Id: Idd320792473509050b9da2fc6443b446cffc2fe7
/frameworks/support/v17/leanback/tests/java/android/support/v17/leanback/graphics/CompositeDrawableTest.java
|