Relativelayout Issue - Image Overlaps Scrollview
I'm trying to stick an image in the bottom of my app, and above is I have a scrollview, like this: Copy
Solution 2:
RelativeLayout is not the right chose in this case. You have to use LinearLayout, and the key is the android:layout_weight parameter:
<?xml version="1.0" encoding="utf-8"?><LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:orientation="vertical"android:layout_width="fill_parent"android:layout_height="fill_parent"><ScrollViewandroid:paddingTop="180dip"android:layout_width="fill_parent"android:layout_height="0dp"android:layout_weight="1"><LinearLayoutandroid:id="@+id/linearLayout4"android:layout_width="fill_parent"android:paddingRight="8dip"android:orientation="vertical"android:layout_height="wrap_content"></LinearLayout></ScrollView><ImageViewandroid:layout_width="fill_parent"android:background="@color/cinza"android:src="@drawable/header"android:id="@+id/imageView2"android:layout_height="wrap_content" />Solution 3:
Give a id for scroolview then set a tag in image view android:layout_blow="id of scrollview"
Post a Comment for "Relativelayout Issue - Image Overlaps Scrollview"