I am trying to make a scroll view that has a nested relativeLayout view. The
realative layout has a background image. When the realativeLayout is the
only layout the background image is the size I want it to be.

When I add scroll view it makes the image bigger and I am not sure why and
what properties I need to set to fix it.

      <?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">
        <RelativeLayout android:id="@+id/mainLayout"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/background2"
                xmlns:android="http://schemas.android.com/apk/res/android";>
            <TextView android:id="@+id/txtApplicationTitle"
                      android:text="My Application"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                     
android:textAppearance="?android:attr/textAppearanceMedium"
                      android:layout_marginTop="5dp"
                      android:textSize="15dp"
                      android:layout_alignParentTop="true"
                      android:layout_alignLeft="@+id/txtAbout" />
            <TextView android:id="@+id/txtPrivacyHeader"
                      android:layout_width="wrap_content"
                      android:text="@string/PrivacyHeader"
                     
android:textAppearance="?android:attr/textAppearanceMedium"
                      android:layout_height="wrap_content"
                      android:layout_alignParentTop="true"
                      android:layout_alignParentLeft="true"
                      android:layout_marginLeft="21dp"
                      android:layout_marginTop="94dp" />
            <TextView android:id="@+id/Privacy"
                      android:layout_width="wrap_content"
                     
android:textAppearance="?android:attr/textAppearanceMedium"
                      android:text="@string/Privacy"
                      android:layout_height="wrap_content"
                      android:layout_alignParentBottom="true"
                      android:layout_alignParentRight="true"
                      android:layout_below="@+id/txtPrivacyHeader"
                      />
        </RelativeLayout>
    </ScrollView>

// this is what I get (you can't tell but it is scrollable)

http://gyazo.com/eab982b9d1832983d72197488438cb48.png 

// this how I want the SrcollView to look(this is the exact same code as
above just without the ScrollView wrapping it)

http://gyazo.com/b57ff76d74b57f7fdc047df57e7d2d41.png 

See how the top part has all of sudden grown so much.


--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/ScrollView-Makes-my-background-image-bigger-why-tp4667954p4667954.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to