Skip to content

Instantly share code, notes, and snippets.

@gatlingxyz
Created June 28, 2014 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gatlingxyz/21960b1c9a0ce45e5a79 to your computer and use it in GitHub Desktop.
Save gatlingxyz/21960b1c9a0ce45e5a79 to your computer and use it in GitHub Desktop.
How to use QuickReturnScrollView
<?xml version="1.0" encoding="utf-8"?>
<org.example.text.QuickReturnScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:gravity="center"
android:id="@+id/root_scroll"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/new_search_container"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/what_is_behind_what_will_return"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content">
<!-- This is what I like to call a FakeListView -->
<View
android:id="@+id/placeholder"
android:layout_width="match_parent"
android:layout_height="130dp">
<!-- Make this the exact same size as what_will_return -->
</View>
</LinearLayout>
<LinearLayout
android:id="@+id/what_will_return"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content"
>
<!-- Code this however you want. This is what will scroll and then reappear. -->
</LinearLayout>
</FrameLayout>
</org.example.text.QuickReturnScrollView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment