History log of /frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/ParallaxTarget.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/src/android/support/v17/leanback/widget/ParallaxTarget.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/src/android/support/v17/leanback/widget/ParallaxTarget.java
fe4317c9f0492c67e2ee48e3d135f649f5f1fc5c 29-Nov-2016 Dake Gu <dake@google.com> leanback: hide embedded video, parallax, CompositeDrawable

Hide the new classes/methods before finalizing APIs.

Change-Id: I3b6660a60457821f9e5e7aa40b5e98f16fb0baff
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/ParallaxTarget.java
46ae6eb27de10f019258fe197c794cf2234abe5d 27-Jul-2016 susnata <susnata@google.com> Fix bug with non-linear update in ParallaxTarget.

By default ObjectAnimator uses accelerateDeccelerate interpolator,
which causes issues with our parallax behavior. This fix sets
LinearInterpolator as the default interpolator in ObjectAnimator.

Change-Id: I747df4616b6c453f2dec2412b51b6654270a7efa
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/ParallaxTarget.java
05de4b68e45fc22c867d49ab88e2bdfd599bf7cc 30-Jun-2016 Dake Gu <dake@google.com> Add Parallax support

Parallax includes three parts:
1. ParallaxSource which tracks a list of changing Variable values
typically retrieved from position of foreground UI elements.
2. ParallaxTarget which performs a update(float) operation on
another target (e.g. background view)
3. ParallaxEffect includes a list of KeyValues used to compute
the fraction from current Variable values in ParallaxSource.
Then it will call update() on target.

ParallaxSource is the abstract class to be implemented. For example
app can define a ParallaxRecyclerViewSource to tracking child view's
positions on screen.

ParallaxTarget is backed by PropertyValuesHolder, it supports
arbitrary Property of different types: float, int, Rect, etc.

Change-Id: Iaa0c2354619ae6d2ddc6bfd0a1929714dd991fde
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/ParallaxTarget.java