Refactor and generalize SpringAnimationHandler.

SpringAnimationHandler is only responsible for motion tracking and
updating the list of springs it is handling.

Spring initialization and updates are handled by the AnimationFactory
interface.

This is done in preparation for future CLs where SpringAnimationHandler
will be used in more cases.

Bug: 38349031
Change-Id: I5ebce710cc05e4e88b708ceea5d2cfefbd0eb3d0
This commit is contained in:
Jon Miranda committed 2017-06-07 15:45:45 -07:00
1 parent 3a5b835297
commit 5c83e7cdc5
4 files changed
+212 -130

No files matched your search

@@ -91,9 +91,8 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
mLauncher = Launcher.getLauncher(context);
mApps = new AlphabeticalAppsList(context);
mSpringAnimationHandler = new SpringAnimationHandler(SpringAnimationHandler.Y_DIRECTION);
mAdapter = new AllAppsGridAdapter(mLauncher, mApps, mLauncher, this,
mSpringAnimationHandler);
mAdapter = new AllAppsGridAdapter(mLauncher, mApps, mLauncher, this);
mSpringAnimationHandler = mAdapter.getSpringAnimationHandler();
mApps.setAdapter(mAdapter);
mLayoutManager = mAdapter.getLayoutManager();
mSearchQueryBuilder = new SpannableStringBuilder();