0

How do I make it so that the androidSlideUpPanel here only slides up to 50% of the total screen height?

I tried to set the layout_weight=1

<com.sothree.slidinguppanel.SlidingUpPanelLayout
    xmlns:sothree="http://schemas.android.com/apk/res-auto"
    android:id="@+id/sliding_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="bottom"
    sothree:umanoPanelHeight="68dp"
    sothree:umanoShadowHeight="4dp">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:text="Main Content"
        android:layout_weight="1"
        android:textSize="16sp" />

    <TextView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center|top"
        android:text="The Awesome Sliding Up Panel"
        android:layout_weight="1"
        android:textSize="16sp" />
</com.sothree.slidinguppanel.SlidingUpPanelLayout>

But it doesn't seems to do the trick?

Zhen Liu
  • 7,550
  • 14
  • 53
  • 96
  • try this one : https://stackoverflow.com/questions/18285872/positioning-androidslidinguppanel-to-a-specific-height – aborocz Jul 05 '17 at 07:27
  • You can still drag it upwards to fill the screen past the anchor point. It doesn't really work @aborocz. I guess this makes my question a duplicate.. – Zhen Liu Jul 05 '17 at 13:57
  • Possible duplicate of [Positioning AndroidSlidingUpPanel to a specific height](https://stackoverflow.com/questions/18285872/positioning-androidslidinguppanel-to-a-specific-height) – Zhen Liu Jul 05 '17 at 13:58

0 Answers0