Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix to not lose space below when the panel is expanded. If a view had…
… alignParentBottom="true", we were missing "notificationbarheight" pixels. Now it aligns correctly.
  • Loading branch information
Alberto Manzano Torregrosa authored and alberto.manzano committed May 20, 2016
commit 14f6d42ac18ca498f06c71c5016ac753af2547eb
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ public void setExpandedPanelOffScreen(View slidingUpPanelLayout) {
final int screenWidth = size.x;

SlidingUpPanelLayout.LayoutParams params;
params = new SlidingUpPanelLayout.LayoutParams(screenWidth, screenHeight + mPanelHeight);
params = new SlidingUpPanelLayout.LayoutParams(screenWidth, screenHeight + mPanelHeight - getNotificationBarHeight());

slidingUpPanelLayout.setLayoutParams(params);
} else {
Expand Down Expand Up @@ -839,14 +839,7 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {

child.measure(childWidthSpec, childHeightSpec);

if (mPanelOffScreen) {
// In order to place the panel off the screen,
// the sliding distance will be the height of the entire sliding view
// minus the panel height and the notification bar
mSlideRange = mSlideableView.getMeasuredHeight() - mPanelHeight - getNotificationBarHeight();
} else {
mSlideRange = mSlideableView.getMeasuredHeight() - mPanelHeight;
}
mSlideRange = mSlideableView.getMeasuredHeight() - mPanelHeight;
}

setMeasuredDimension(widthSize, heightSize);
Expand Down