You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-6Lines changed: 12 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,13 +9,16 @@ As seen in Umano ([http://umanoapp.com](http://umanoapp.com)):
9
9
10
10
### Usage
11
11
12
-
To use the layout, simply include `com.sothree.slidinguppanel.SlidingUpPanelLayout` as the Root element in your activity Layout. Layout must have `gravity` set to either `top` or `bottom`. Make sure that it has two children. The first child is your main layout. The second child is your layout for the sliding up panel. Both children should have width and height set to `match_parent`. For more information, please refer to the sample code.
12
+
To use the layout, simply include `com.sothree.slidinguppanel.SlidingUpPanelLayout` as the Root element in your activity Layout. Layout must have `gravity` set to either `top` or `bottom`. Make sure that it has two children. The first child is your main layout. The second child is your layout for the sliding up panel. The main layout should have the width and the height set to `match_parent`. The sliding layout should have the width set to `match_parent` and the height set to either `match_parent` or the max desireable height. For more information, please refer to the sample code.
However, in this case you would likely want to add a top margin to your main layout of `?android:attr/actionBarSize`.
40
44
```
41
-
### Additional Features
45
+
### Additional Features and Customization
42
46
43
-
You can restrict the drag area of the sliding panel to a specific view by using the `setDragView` method. Otherwise, the whole panel will be slideable and it will intercept all clicks.
47
+
You can restrict the drag area of the sliding panel to a specific view by using the `setDragView` method or `dragView` attribute. Otherwise, the whole panel will be slideable and it will intercept all clicks.
44
48
45
-
You can change the panel height by using the `setPanelHeight` method.
49
+
You can change the panel height by using the `setPanelHeight` method or `panelHeight` attribute.
46
50
47
-
You can change the panel shadow by using the `setShadowDrawable` method. No shadow is displayed by default.
51
+
If you would like to hide the shadow above the sliding panel, set `shadowHeight` attribute to 0.
48
52
49
53
You can disable sliding by using `setSlidingEnabled` method. This can be useful if you want to show\hide panel only from the code. By default sliding is enabled.
50
54
@@ -54,6 +58,8 @@ You can set a `PanelSlideListener` to monitor events about sliding panes.
54
58
55
59
You can also make the panel slide from the top by changing the `layout_gravity` attribute of the layout to `top`.
56
60
61
+
By default, the panel pushes up the main content. You can make it overlay the main content by using `setOverlayed` method or `overlay` attribute. This is useful if you would like to make the sliding layout semi-transparent.
62
+
57
63
### Implementation
58
64
59
65
This code is heavily based on the opened-sourced [SlidingPaneLayout](http://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout.html) component from the r13 of the Android Support Library. Thanks Android team!
0 commit comments