umano / AndroidSlidingUpPanel

This library provides a simple way to add a draggable sliding up panel (popularized by Google Music and Google Maps) to your Android application. Brought to you by Umano.
http://umano.me
Apache License 2.0
9.5k stars 2.26k forks source link

Set expand height half of the main layout #976

Open NurAlif opened 4 years ago

NurAlif commented 4 years ago

I need the slider to only expand maximum at 0.4% of the screen. The anchor feature doesn't work as i want because it still can be expanded higher. Set layout_height also not what i want since it will also set the height of the main layout. Putting the main layout behind of SlidingUpPanel also doesn't work because even when SlidingUpPanel collapsed the area for SlidingUpPanel is always blocking the touch of the main layout.

Is there any feature that capable for this? It would be nice if this library has easy feature to fix this problem

mbohnearschi commented 4 years ago

Try setting this to the second view (which is the sliding panel)

android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.4"

Assuming that by "0.4%" you mean 40% of the screen :)