@@ -48,6 +48,7 @@ public class MultiPaneChallengeLayout extends ViewGroup implements ChallengeLayo
4848 private OnBouncerStateChangedListener mBouncerListener ;
4949
5050 private final Rect mTempRect = new Rect ();
51+ private final Rect mZeroPadding = new Rect ();
5152
5253 private final DisplayMetrics mDisplayMetrics ;
5354
@@ -187,6 +188,8 @@ private int getVirtualHeight(LayoutParams lp, int height, int heightUsed) {
187188 // on the window. We want to avoid resizing widgets when possible as it can
188189 // be ugly/expensive. This lets us simply clip them instead.
189190 return virtualHeight - heightUsed ;
191+ } else if (lp .childType == LayoutParams .CHILD_TYPE_PAGE_DELETE_DROP_TARGET ) {
192+ return height ;
190193 }
191194 return Math .min (virtualHeight - heightUsed , height );
192195 }
@@ -330,13 +333,17 @@ protected void onLayout(boolean changed, int l, int t, int r, int b) {
330333 final int count = getChildCount ();
331334 for (int i = 0 ; i < count ; i ++) {
332335 final View child = getChildAt (i );
336+ LayoutParams lp = (LayoutParams ) child .getLayoutParams ();
333337
334338 // We did the user switcher above if we have one.
335339 if (child == mUserSwitcherView || child .getVisibility () == GONE ) continue ;
336340
337341 if (child == mScrimView ) {
338342 child .layout (0 , 0 , width , height );
339343 continue ;
344+ } else if (lp .childType == LayoutParams .CHILD_TYPE_PAGE_DELETE_DROP_TARGET ) {
345+ layoutWithGravity (width , height , child , mZeroPadding , false );
346+ continue ;
340347 }
341348
342349 layoutWithGravity (width , height , child , padding , false );
@@ -467,6 +474,7 @@ public static class LayoutParams extends MarginLayoutParams {
467474 public static final int CHILD_TYPE_CHALLENGE = 2 ;
468475 public static final int CHILD_TYPE_USER_SWITCHER = 3 ;
469476 public static final int CHILD_TYPE_SCRIM = 4 ;
477+ public static final int CHILD_TYPE_PAGE_DELETE_DROP_TARGET = 7 ;
470478
471479 public int gravity = Gravity .NO_GRAVITY ;
472480
0 commit comments