Android DPI isn't constant with the size of the imageview that it's placed on top of

B1tHunt3r

New Member
I have an imageview inside a single relativelayout that only contains the imageview and the textviews that I'm trying to place on top of the imageview. I do have the textviews positioned correctly on top of the imageview using the margin_top, right, left etc. When my screen size changes, my imageview does successfully change its size however the textviews are not in the same relative position. Also, this problem isn't with different drawable sizes because I only have one.The XML Code \[code\]<ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:adjustViewBounds="true" android:padding="0px" android:scaleType="fitXY" android:src="http://stackoverflow.com/questions/15454349/@drawable/flat"/><TextView android:id="@+id/textView8" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_marginLeft="375dp" android:layout_marginTop="200dp" android:text="TextView" /><TextView android:id="@+id/textView9" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_alignRight="@+id/textView8" android:layout_marginRight="164dp" android:layout_marginTop="325dp" android:text="TextView" /><TextView android:id="@+id/textView10" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignRight="@+id/textView8" android:layout_marginRight="50dp" android:text="TextView" /><TextView android:id="@+id/textView11" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBottom="@+id/textView9" android:layout_marginBottom="38dp" android:layout_marginRight="76dp" android:layout_toLeftOf="@+id/textView9" android:text="TextView" />\[/code\]
 
Back
Top