mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Fixing same drawable instance being used with 2 views
Drawable contain a reference to the view which is used to invalidate the view. If the same drawable is used with two views, only once view will get invalidated. Bug: 32575647 Change-Id: Ia22310a6bda55ce0a591712761ec8ab1cdbaccdf
This commit is contained in:
@@ -16,7 +16,10 @@
|
||||
package com.android.launcher3.allapps;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.InsetDrawable;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.Selection;
|
||||
import android.text.Spannable;
|
||||
@@ -100,6 +103,24 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
|
||||
Selection.setSelection(mSearchQueryBuilder, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateBackground(
|
||||
int paddingLeft, int paddingTop, int paddingRight, int paddingBottom) {
|
||||
if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP) {
|
||||
if (mLauncher.getDeviceProfile().isVerticalBarLayout()) {
|
||||
getRevealView().setBackground(new InsetDrawable(mBaseDrawable,
|
||||
paddingLeft, paddingTop, paddingRight, paddingBottom));
|
||||
getContentView().setBackground(
|
||||
new InsetDrawable(new ColorDrawable(Color.TRANSPARENT),
|
||||
paddingLeft, paddingTop, paddingRight, paddingBottom));
|
||||
} else {
|
||||
getRevealView().setBackground(mBaseDrawable);
|
||||
}
|
||||
} else {
|
||||
super.updateBackground(paddingLeft, paddingTop, paddingRight, paddingBottom);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the current set of predicted apps.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user