I'm using Sliding Up Panel Library for Android by Umano Team. My requirement is a vertical swipe to a second view, without "previewing" the panel on the first, basically a vertical swipe on a drag point (an ImageView).
<com.sothree.slidinguppanel.SlidingUpPanelLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:sothree="http://schemas.android.com/apk/res-auto"
android:id="@+id/sliding_panel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom"
sothree:panelHeight="0dp"
sothree:shadowHeight="0dp" >
<!------ First view ------>
<RelativeLayout
android:id="@+id/relative_first"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<!------ Bottom drag point ------>
<ImageView
android:id="@+id/drag_first_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:background="@drawable/ic_launcher"
android:gravity="center|bottom" >
</ImageView>
</RelativeLayout>
<!------ Second view ------>
<RelativeLayout
android:id="@+id/relative_second"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<!------ Top drag point ------>
<ImageView
android:id="@+id/drag_second_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:background="@drawable/ic_launcher"
android:gravity="center|top" >
</ImageView>
</RelativeLayout>
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
The panel has attribute sothree:panelHeight="0dp" so is completely hidden. Initial state has the drag on first view. I've setup a listener to change it on expanded or collapsed:
slidingUpPanelLayout.setPanelSlideListener(new SimplePanelSlideListener() {
@Override
public void onPanelCollapsed(View panel) {
slidingUpPanelLayout.setDragView(dragFirstView);
}
@Override
public void onPanelExpanded(View panel) {
slidingUpPanelLayout.setDragView(dragSecondView);
}
});
The problem is I've lost the progressive "dragging" effect, besides swiping up and going over (on y axis) the drag imageview (on first view) results in no transition (I think that the first view intercept the ontouch event). Can you please give me any hints to proceed, or suggest others ways to do that? I really like the library, and I feel to be near the aim. Forgot to say I'm inside a view pager =).