Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ AndroidSlidingDownPanel
=======================
SlidingDownPanel provides a vertical, multi-pane layout for user at the top level of a UI, just like the usage in [Aviate](http://getaviate.com/).

![Panel up](http://i.imgur.com/yvvTYnvl.png "Panel up")
![Panel down](http://i.imgur.com/SvrCw7nl.png "Panel slided down")

Usage
=====
The layout could be usage as [SlidingPaneLayout]( http://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout.html). To use of the layout, simply include `com.argonware.slidingdownpanel.SlidingDownPanelLayout` as the root element for your multi pane layout. Add two children view. The first child is your main layout. The second child is your layout for the sliding down panel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,8 @@ protected void onLayout(boolean changed, int l, int t, int r, int b) {

if (lp.slideable) {
final int margin = lp.leftMargin + lp.rightMargin;
final int range = Math.min(nextYStart,
height - paddingBottom - mOverhangSize - yStart - margin);
final int range = Math.max(0, Math.min(nextYStart,
height - paddingBottom - mOverhangSize - yStart - margin - lp.topMargin));
mSlideRange = range;
lp.dimWhenOffset = yStart + lp.topMargin + range + childHeight / 2 >
height - paddingBottom;
Expand Down