Merge "Bound overscroll shift amount to avoid content from drawing on top (Y-val) of the QSB." into ub-launcher3-edmonton

This commit is contained in:
android-build-team Robot
2018-05-01 21:07:59 +00:00
committed by Android (Google) Code Review
2 changed files with 9 additions and 1 deletions

View File

@@ -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) {