Removing unnecessary layout pass happening due when chaning gradientView visibility
Change-Id: I0d8f0c2c995885143156a27536b0a2185d5eb0b8
This commit is contained in:
parent
326403e958
commit
d66e3b6a65
|
@ -20,5 +20,4 @@
|
||||||
android:id="@+id/gradient_bg"
|
android:id="@+id/gradient_bg"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:visibility="gone"
|
|
||||||
launcher:layout_ignoreInsets="true" />
|
launcher:layout_ignoreInsets="true" />
|
|
@ -301,8 +301,7 @@ public class AllAppsTransitionController implements TouchController, SwipeDetect
|
||||||
private void updateAllAppsBg(float progress) {
|
private void updateAllAppsBg(float progress) {
|
||||||
// gradient
|
// gradient
|
||||||
if (mGradientView == null) {
|
if (mGradientView == null) {
|
||||||
mGradientView = (GradientView) mLauncher.findViewById(R.id.gradient_bg);
|
mGradientView = mLauncher.findViewById(R.id.gradient_bg);
|
||||||
mGradientView.setVisibility(View.VISIBLE);
|
|
||||||
}
|
}
|
||||||
mGradientView.setProgress(progress);
|
mGradientView.setProgress(progress);
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,6 @@ public class WidgetsBottomSheet extends AbstractFloatingView implements Insettab
|
||||||
onWidgetsBound();
|
onWidgetsBound();
|
||||||
|
|
||||||
mLauncher.getDragLayer().addView(mGradientBackground);
|
mLauncher.getDragLayer().addView(mGradientBackground);
|
||||||
mGradientBackground.setVisibility(VISIBLE);
|
|
||||||
mLauncher.getDragLayer().addView(this);
|
mLauncher.getDragLayer().addView(this);
|
||||||
measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED);
|
measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED);
|
||||||
setTranslationY(mTranslationYClosed);
|
setTranslationY(mTranslationYClosed);
|
||||||
|
|
Loading…
Reference in New Issue