Sliding Drawer Text
I would like the "Top Text" to move with the slider handle similar to how
the "Bottom Text" does and be pushed off screen when the slider reaches
the top. Is this possible? I don't necessarily need to use the
SlidingDrawer, I just need the behavior is provides. It would be nice if
the answer was xml only.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView android:id="@+id/textViewTop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Top Text" />
<SlidingDrawer android:id="@+id/SlidingDrawer"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:content="@+id/contentLayout"
android:handle="@+id/slideHandleButton" >
<Button android:id="@+id/slideHandleButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Slider" >
</Button>
<LinearLayout android:layout_width="wrap_content"
android:id="@+id/contentLayout"
android:layout_height="wrap_content">
<TextView android:id="@+id/textViewBottom"
android:text="Bottom Text"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</SlidingDrawer>
</RelativeLayout>
No comments:
Post a Comment