1

SOLVED:

Apparently the source has been updated to add this functionality. Before that happened I forked the source to do this and to have a flag to close on orientation change. My fork is at github.com/Style87/AndroidSlidingUpPanel. I don't think my changes were pulled into the main branch and I'm not going to keep it up to date.

Original problem: I am using the umano AndroidSlidingUpPanel library. My main content view is a Google Map fragment and the sliding panel is a LinearLayout with dynamic content from Marker clicks. When a Marker is clicked the sliding panel opens to the anchor point. When the sliding panel has stopped I would like to re-size the main content to fill in the remaining space such that the bottom of the map is aligned with the top of the sliding panel. How can I re-size the main content to the remaining space once the slide has stopped?

Feel free to use modify the demo to explain.

RogerSmith
  • 204
  • 4
  • 11
  • Did you manage to do this? I need the similar feature and another one describe in [this question of me](http://stackoverflow.com/questions/21905562/how-to-stop-main-content-re-sizing-of-umano-androidslidinguppanel-when-panel-is). Sorry for adding this comment here. But this is the only question I found in SO with **umano AndroidSlidingUpPanel**. Please share your solution if you already accomplished. – AnujAroshA Feb 21 '14 at 06:12
  • Apparently the source has been updated to add this functionality. Before that happened I also updated the source to do this and to have a flag to close on orientation change. My fork is at https://github.com/Style87/AndroidSlidingUpPanel. I don't think my changes were pulled into the main branch and I'm not going to keep it up to date. – RogerSmith Apr 09 '14 at 19:04
  • Hey I tried with the new 3.0.0 version of the slider but this setOverlay property is not adjusting the height of main content at all. Do you have any idea ? – Kumar Rajput Apr 15 '15 at 18:09
  • @RogerSmith I am facing similar issue here- http://stackoverflow.com/questions/36985119/resizing-main-content-in-slidinguppanel – Android Developer May 02 '16 at 14:40
  • There is a lot of issues with this library. It is not up-to-date. I suggest this alternative: https://github.com/drxeno02/androidprojects-book2-slidingdrawer – portfoliobuilder Jan 31 '18 at 22:25

3 Answers3

1

The library has been updated to support your usecase by setting overlay attribute to true.

tokudu
  • 2,250
  • 23
  • 22
0

If you are Okay with editing the library, here is a solution. Instead of 495th line of SlidingUpPanelLayout.java, which is;

height -= panelHeight;

use following code

int tempHeight = height;

if(isAnchored()){
    // "x" is the height of sliding panel when it is Anchored
    height = x;
}else{
    height -= panelHeight;
}

Assume you are capable of calculating x value.

AnujAroshA
  • 4,623
  • 8
  • 56
  • 99
0

By default, the panel pushes up the main content. You can make it overlay the main content by using setOverlayed method or umanoOverlay attribute. This is useful if you would like to make the sliding layout semi-transparent. You can also set umanoClipPanel to false to make the panel transparent in non-overlay mode.

see Umano github wiki

set sothree:umanoOverlay value to false. example

`sothree:umanoOverlay="false"`
Amol Desai
  • 872
  • 1
  • 9
  • 17