I'm trying to use a Sliding Panel from the link here and I'm facing the problem shown in the image:
My idea is to have custom content when the user swipes the bottom menu up, and have the possibility to scroll this content. But when the panel goes to anchored state, it seems like the content height is not set correctly, because some piece of the content doesn`t show up.
I downloaded the sample in the link above, and the problem already occurs. i made a minor change, adding the scrollview
.
Am I missing something? any help would be much appreciated.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".DemoActivity" >
<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:collapsedHeight="68dp"
sothree:dragView="@+id/name"
sothree:shadowHeight="4dp" >
<TextView
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:focusable="false"
android:focusableInTouchMode="true"
android:gravity="center"
android:text="Main Content"
android:textSize="16sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#eee"
android:clickable="true"
android:focusable="false"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="68dp"
android:orientation="horizontal" >
<TextView
android:id="@+id/name"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingLeft="10dp"
android:textSize="14sp" />
<Button
android:id="@+id/follow"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical|right"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:textSize="14sp" />
</LinearLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:id="@+id/slide_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/graphic" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="teste" />
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/graphic" />
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/graphic" />
</LinearLayout>
</ScrollView>
</LinearLayout>
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
</RelativeLayout>