Buggy code:
@ Override public void onPanelCollapsed ( View panel ) { } @ Override public void onPanelExpanded ( View panel ) { } @ Override public void onPanelAnchored ( View panel ) { } @ Override public void onPanelHidden ( View panel ) { } } public SlidingUpPanelLayout ( Context context ) { } public SlidingUpPanelLayout ( Context context , AttributeSet attrs ) { } public SlidingUpPanelLayout ( Context context , AttributeSet attrs , int defStyle ) { } @ Override protected void onFinishInflate ( ) { } public void setCoveredFadeColor ( int color ) { } public int getCoveredFadeColor ( ) { } public void setTouchEnabled ( boolean enabled ) { } public boolean isTouchEnabled ( ) { } public void setPanelHeight ( int val ) { } public int getPanelHeight ( ) { } public int getCurrentParalaxOffset ( ) { } public void setParalaxOffset ( int val ) { } public void setPanelSlideListener ( SlidingUpPanelLayout . PanelSlideListener listener ) { } public void setDragView ( View dragView ) { } public void setAnchorPoint ( float anchorPoint ) { } public float getAnchorPoint ( ) { } public void setOverlayed ( boolean overlayed ) { } public boolean isOverlayed ( ) { } void dispatchOnPanelSlide ( View panel ) { } void dispatchOnPanelExpanded ( View panel ) { } void dispatchOnPanelCollapsed ( View panel ) { } void dispatchOnPanelAnchored ( View panel ) { } void dispatchOnPanelHidden ( View panel ) { } void updateObscuredViewVisibility ( ) { } void setAllChildrenVisible ( ) { } private static boolean hasOpaqueBackground ( View v ) { } @ Override protected void onAttachedToWindow ( ) { } @ Override protected void onDetachedFromWindow ( ) { } @ Override protected void onMeasure ( int widthMeasureSpec , int heightMeasureSpec ) { } @ Override protected void onLayout ( boolean changed , int l , int t , int r , int b ) { } @ Override protected void onSizeChanged ( int w , int h , int oldw , int oldh ) { } public void setEnableDragViewTouchEvents ( boolean enabled ) { } @ Override public boolean onInterceptTouchEvent ( MotionEvent ev ) { } @ Override public boolean onTouchEvent ( MotionEvent ev ) { } private boolean isDragViewUnder ( int x , int y ) { } private int computePanelTopPosition ( float slideOffset ) { } private float computeSlideOffset ( int topPosition ) { } public SlidingUpPanelLayout . PanelState getPanelState ( ) { } public void setPanelState ( SlidingUpPanelLayout . PanelState state ) { } @ SuppressLint ( "NewApi" ) private void onPanelDragged ( int newTop ) { mSlideState = SlidingUpPanelLayout . PanelState . DRAGGING ; mSlideOffset = computeSlideOffset ( newTop ) ; if ( ( ( mParallaxOffset ) > 0 ) && ( ( mSlideOffset ) >= 0 ) ) { int mainViewOffset = getCurrentParalaxOffset ( ) ; if ( ( VERSION . SDK_INT ) >= ( VERSION_CODES . HONEYCOMB ) ) { mMainView . setTranslationY ( mainViewOffset ) ; } else { AnimatorProxy . wrap ( mMainView ) . setTranslationY ( mainViewOffset ) ; } } dispatchOnPanelSlide ( mSlideableView ) ; SlidingUpPanelLayout . LayoutParams lp = ( ( SlidingUpPanelLayout . LayoutParams ) ( mMainView . getLayoutParams ( ) ) ) ; int defaultHeight = ( ( ( getHeight ( ) ) - ( getPaddingBottom ( ) ) ) - ( getPaddingTop ( ) ) ) - ( mPanelHeight ) ; if ( ( ( mSlideOffset ) <= 0 ) && ( ! ( mOverlayContent ) ) ) { lp . height = ( mIsSlidingUp ) ? newTop - ( getPaddingBottom ( ) ) : ( ( ( getHeight ( ) ) - ( getPaddingBottom ( ) ) ) - ( mSlideableView . getMeasuredHeight ( ) ) ) - newTop ; mMainView . requestLayout ( ) ; } else <START_BUG> if ( ( lp . height ) != defaultHeight ) { <END_BUG> lp . height = defaultHeight ; mMainView . requestLayout ( ) ; } } @ Override protected boolean drawChild ( Canvas canvas , View child , long drawingTime ) { } boolean smoothSlideTo ( float slideOffset , int velocity ) { } @ Override public void computeScroll ( ) { } @ Override public void draw ( Canvas c ) { } protected boolean canScroll ( View v , boolean checkV , int dx , int x , int y ) { } @ Override protected ViewGroup . LayoutParams generateDefaultLayoutParams ( ) { } @ Override protected ViewGroup . LayoutParams generateLayoutParams ( ViewGroup . LayoutParams p ) { } @ Override protected boolean checkLayoutParams ( ViewGroup . LayoutParams p ) { } @ Override public ViewGroup . LayoutParams generateLayoutParams ( AttributeSet attrs ) { } @ Override public Parcelable onSaveInstanceState ( ) { } @ Override public void onRestoreInstanceState ( Parcelable state ) { } private class DragHelperCallback extends ViewDragHelper . Callback { @ Override public boolean tryCaptureView ( View child , int pointerId ) { } @ Override public void onViewDragStateChanged ( int state ) { } @ Override public void onViewCaptured ( View capturedChild , int activePointerId ) { } @ Override public void onViewPositionChanged ( View changedView , int left , int top , int dx , int dy ) { } @ Override public void onViewReleased ( View releasedChild , float xvel , float yvel ) { } @ Override public int getViewVerticalDragRange ( View child ) { } @ Override public int clampViewPositionVertical ( View child , int top , int dy ) { } } public static class LayoutParams extends ViewGroup . MarginLayoutParams { private static final int [ ] ATTRS = new int [ ] { attr . layout_weight } ; public LayoutParams ( ) { } public LayoutParams ( int width , int height ) { } public LayoutParams ( ViewGroup . LayoutParams source ) { } public LayoutParams ( MarginLayoutParams source ) { }

Fix:
if ( ( ( lp . height ) != defaultHeight ) && ( ! ( mOverlayContent ) ) ) {