Skip to content

Instantly share code, notes, and snippets.

@esteluk
Created August 5, 2011 17:42
Show Gist options
  • Save esteluk/1128072 to your computer and use it in GitHub Desktop.
Save esteluk/1128072 to your computer and use it in GitHub Desktop.
Example XML file using ModifiedScrollView
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout android:id="@+id/topLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView android:id="@+id/backgroundImage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/bkgd" />
<ImageView android:id="@+id/gravitywell_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:src="@drawable/logo"
android:scaleType="centerInside" />
</RelativeLayout>
<com.gravitywell.examples.ModifiedScrollView android:id="@+id/scroller"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fadingEdge="none">
<LinearLayout android:id="@+id/scroller_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="false"
android:paddingTop="330dp">
<LinearLayout android:id="@+id/scroller_content"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:orientation="vertical"
android:background="@drawable/scroller_bkgd">
<!-- Content for upper layer goes here -->
</LinearLayout>
</LinearLayout>
</com.gravitywell.examples.ModifiedScrollView>
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment