Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bring an ImageView in front of another?

Is there anyway to bring an ImageView in front of another in android . For example , i have a big image and how i put a small one in the top left of the big ones. Something like the small one will overlap the bigs one . thanks for helping

like image 965
erijack Avatar asked Nov 30 '22 01:11

erijack


1 Answers

Wrap the images in a RelativeLayout. Place the image you want on top last in the xml, like so:

<RelativeLayout
    ...>
    <ImageView
        android:background="@drawable/backgroundimage"
        ... />
    <ImageView
        android:background="@drawable/foreground"
        ... />
</RelativeLayout>
like image 92
Randy Avatar answered Dec 31 '22 13:12

Randy