Merge changes from topic "am-85c4a06c-b495-4e8b-9fa0-1fa07db12132" into ub-launcher3-master
* changes:
[automerger] Bound overscroll shift amount to avoid content from drawing on top (Y-val) of the QSB. am: 5916709219
Bound overscroll shift amount to avoid content from drawing on top (Y-val) of the QSB.
This commit is contained in:
committed by
Android (Google) Code Review
commit
42bed6baca
@@ -45,6 +45,7 @@ import com.android.launcher3.InsettableFrameLayout;
|
||||
import com.android.launcher3.ItemInfo;
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.uioverrides.AllAppsScrim;
|
||||
import com.android.launcher3.keyboard.FocusedItemDecorator;
|
||||
@@ -121,6 +122,13 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
return mAllAppsStore;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setDampedScrollShift(float shift) {
|
||||
// Bound the shift amount to avoid content from drawing on top (Y-val) of the QSB.
|
||||
float maxShift = getSearchView().getHeight() / 2f;
|
||||
super.setDampedScrollShift(Utilities.boundToRange(shift, -maxShift, maxShift));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeviceProfileChanged(DeviceProfile dp) {
|
||||
for (AdapterHolder holder : mAH) {
|
||||
|
||||
@@ -97,7 +97,7 @@ public class SpringRelativeLayout extends RelativeLayout {
|
||||
mActiveEdge = edge;
|
||||
}
|
||||
|
||||
private void setDampedScrollShift(float shift) {
|
||||
protected void setDampedScrollShift(float shift) {
|
||||
if (shift != mDampedScrollShift) {
|
||||
mDampedScrollShift = shift;
|
||||
invalidate();
|
||||
|
||||
Reference in New Issue
Block a user