1

I'd like to implement an activity that I can drag horizontally using platform-standard scrolling physics like so: https://i.stack.imgur.com/LLvkx.png (it follows finger movements). Also, the activity must call finish() with a custom animation (probably done by calling overridePendingTransition() after finish() ) after dragging past a certain x-axis point https://i.stack.imgur.com/eum6k.png and lifting the finger.

Edit: To clarify, I don't want a navigation drawer. I need to be able to drag the activity's root view horizontally. Here's the activity's layout:

<LinearLayout 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"
android:orientation="vertical">

    <include layout="@layout/my_toolbar" />

    <fragment
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:name="com.package.appname.ContentFragment"
        android:id="@+id/fragment_content" />

</LinearLayout>

The fragment's layout consists of a vertically scrolling listview.

ubercharge_ready
  • 229
  • 2
  • 10

0 Answers0