Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I make images overlap in android using relativelayout
    text
    copied!<p><img src="https://i.stack.imgur.com/0edqE.png" alt="enter image description here"></p> <p>Consider the image above.</p> <p>The red lines indicate the image file borders, the black lines indicate the actual "useful" pixels of the image, and the white = transparent.</p> <p>How would I go about getting these images positioned this way?</p> <p>I'm not really sure this would make a difference in the way the above is done, but I am planning on implementing basic animations to each image (make each image rotate in respect to their respective centers).</p> <p>This is what I have so far (positioning the 3 elements in the center, overlapping each other):</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_centerInParent="true" android:orientation="vertical" &gt; &lt;ImageView android:id="@+id/img_1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:contentDescription = "@string/img1" android:src="@drawable/img1" &lt;ImageView android:id="@+id/img_2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:contentDescription="@string/img2" android:rotation="45" android:src="@drawable/img2" /&gt; &lt;ImageView android:id="@+id/img_3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:contentDescription="@string/img3" android:rotation="200" android:src="@drawable/img3" /&gt; </code></pre> <p></p> <p>Thanks!</p> <p>/e 1 - Thank you for editing in the image 2 - I solved this problem through trial and error, thank you anyways!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload