I am using RelativeLayout for put a textview on image for example, the problem that it is change the place on the screen for every device that i try(in the simulator).
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top|center"
android:layout_marginTop="-70dp" >
<ImageView
android:id="@+id/imageView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/propfile" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/str_phone"
android:textColor="@color/black"
android:layout_marginTop="337dp" android:layout_marginLeft="133dp"
android:onClick="onClick"
android:clickable="true"/>
</RelativeLayout>
You would like to put a
TextViewdirectly onImageView? Like in this example http://developer.android.com/resources/articles/layout-tricks-merge.html? If yes tryFrameLayoutinstead ofRelativeLayout.