diff --git a/lawnchair/src/app/lawnchair/ui/AllAppsStretchLayout.kt b/lawnchair/src/app/lawnchair/ui/StretchRecyclerViewContainer.kt similarity index 92% rename from lawnchair/src/app/lawnchair/ui/AllAppsStretchLayout.kt rename to lawnchair/src/app/lawnchair/ui/StretchRecyclerViewContainer.kt index a60f165a3f..a92711b80c 100644 --- a/lawnchair/src/app/lawnchair/ui/AllAppsStretchLayout.kt +++ b/lawnchair/src/app/lawnchair/ui/StretchRecyclerViewContainer.kt @@ -9,14 +9,14 @@ import androidx.recyclerview.widget.RecyclerView import com.android.launcher3.R import com.android.launcher3.Utilities -open class AllAppsStretchLayout @JvmOverloads constructor( +open class StretchRecyclerViewContainer @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 ) : StretchRelativeLayout(context, attrs, defStyleAttr) { private val childEffect = StretchEdgeEffect(context, { invalidate() }, { postInvalidateOnAnimation() }) override fun drawChild(canvas: Canvas, child: View, drawingTime: Long): Boolean { - if (Utilities.ATLEAST_S || child.id != R.id.apps_list_view) { + if (Utilities.ATLEAST_S || child !is RecyclerView) { return super.drawChild(canvas, child, drawingTime) } diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java index 01a82471be..34013cc4ce 100644 --- a/src/com/android/launcher3/allapps/AllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java @@ -75,17 +75,15 @@ import com.android.launcher3.util.ItemInfoMatcher; import com.android.launcher3.util.Themes; import com.android.launcher3.views.RecyclerViewFastScroller; import com.android.launcher3.views.ScrimView; -import com.android.launcher3.views.SpringRelativeLayout; import com.android.launcher3.workprofile.PersonalWorkSlidingTabStrip.OnActivePageChangedListener; -import com.google.android.material.math.MathUtils; import app.lawnchair.allapps.LawnchairAlphabeticalAppsList; -import app.lawnchair.ui.AllAppsStretchLayout; +import app.lawnchair.ui.StretchRecyclerViewContainer; /** * The all apps view container. */ -public class AllAppsContainerView extends AllAppsStretchLayout implements DragSource, +public class AllAppsContainerView extends StretchRecyclerViewContainer implements DragSource, Insettable, OnDeviceProfileChangeListener, OnActivePageChangedListener, ScrimView.ScrimDrawingController { diff --git a/src/com/android/launcher3/views/TopRoundedCornerView.java b/src/com/android/launcher3/views/TopRoundedCornerView.java index 4c94a8a6b7..617f6c9a26 100644 --- a/src/com/android/launcher3/views/TopRoundedCornerView.java +++ b/src/com/android/launcher3/views/TopRoundedCornerView.java @@ -23,12 +23,12 @@ import android.util.AttributeSet; import com.android.launcher3.util.Themes; -import app.lawnchair.ui.StretchRelativeLayout; +import app.lawnchair.ui.StretchRecyclerViewContainer; /** * View with top rounded corners. */ -public class TopRoundedCornerView extends StretchRelativeLayout { +public class TopRoundedCornerView extends StretchRecyclerViewContainer { private final RectF mRect = new RectF(); private final Path mClipPath = new Path();