I have had this problem for some time now.I really wanted the reativelayout with id "relate" to fill the available parent screen (no matter the screen size) and when scrooled up the relaytive layout with id "rel" should become visible too.but dont know how to achieve that. Here is my xml
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scrollbars="none" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="fill_parent"
android:id="@id/relat"
android:layout_height="362dp"
android:background="@drawable/brown" >
<TextView android:id="@+id/title1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Move Slowly and Observe keenly"
android:gravity="center"
android:textSize="50sp"
android:typeface="serif"
android:textColor="#364B66"
android:layout_marginTop="5dp" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/title1"
android:gravity="center"
android:text="FET all the way"
android:textColor="#364B66"
android:textSize="30sp"
android:textStyle="bold|italic"
android:typeface="serif" />
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="98dp"
android:id="@id/rel"
android:background="#996e66" >
<Button
android:id="@+id/gobutton"
android:layout_width="fill_parent"
android:layout_height="53dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="100sp"
android:layout_marginRight="100sp"
android:layout_marginTop="17dp"
android:text="@string/go"
android:textSize="35sp" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
0 comments:
Post a Comment