Overlapping Imageview In Relativeview
As my code below shows, I've two ImageView that I would like to overlap but the bigger is systematically put below the smaller one, both is android:layout_alignParentTop set 'true'
Solution 1:
<RelativeLayoutandroid:id="@+id/RelativeLayout1"android:layout_width="wrap_content"android:layout_height="wrap_content"><ImageViewandroid:id="@+id/homeStars"android:layout_width="fill_parent"android:layout_height="wrap_content"android:scaleType="centerInside"android:src="@drawable/background" /><ImageViewandroid:id="@+id/homeLogo"android:layout_width="220dip"android:layout_height="wrap_content"android:paddingTop="2dip"android:src="@drawable/logo" /></RelativeLayout>
I removed all of you're different layout_* tags and it works fine. Naturally all children will overlap each other by positioning themselves at the top left in a RelativeLayout
. You're extra tags were confusing not only me but likely the parser. Copy paste the above code and make changes incrementally next time! :)
Solution 2:
Try this related post. A FrameLayout will get the job done, even though you seem very keen on a RelativeLayout. Is a compromise possible for you?
Post a Comment for "Overlapping Imageview In Relativeview"