Adding listener support for color extraction changes

Changing the apps-search layout to use theme attribute instead of hard
coded layout id

Bug: 37616877
Change-Id: Iae601758303f83a2774635f0d88f74d99fc643c3
This commit is contained in:
Sunny Goyal
2017-05-09 12:40:11 -07:00
parent 161f96bc77
commit 60820d796f
10 changed files with 46 additions and 22 deletions

View File

@@ -42,7 +42,7 @@ import com.android.launcher3.util.TouchController;
* closer to top or closer to the page indicator.
*/
public class AllAppsTransitionController implements TouchController, VerticalPullDetector.Listener,
View.OnLayoutChangeListener {
View.OnLayoutChangeListener, ExtractedColors.OnChangeListener {
private static final String TAG = "AllAppsTrans";
private static final boolean DBG = false;
@@ -107,6 +107,7 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
mEvaluator = new ArgbEvaluator();
mAllAppsBackgroundColor = Themes.getAttrColor(l, android.R.attr.colorPrimary);
mLauncher.getExtractedColors().addOnChangeListener(this);
}
@Override
@@ -288,6 +289,7 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
mScrimView.setProgress(progress);
}
@Override
public void onExtractedColorsChanged() {
if (FeatureFlags.LAUNCHER3_GRADIENT_ALL_APPS) {
if (mGradientView != null) {