Java 耦合器件中的相对损耗

Java 耦合器件中的相对损耗,java,android,layout,Java,Android,Layout,我正在使用RelativeLayout在图像上放置文本视图,例如,问题是我尝试的每个设备(在模拟器中)都会改变屏幕上的位置 您想将文本视图直接放在图像视图上吗?比如这个例子?如果是,请尝试FrameLayout而不是RelativeLayout您可以将图像作为相对布局的背景,然后只使用文本视图为什么不使用相对/线性布局背景而不是ImageView? <RelativeLayout android:layout_width="match_parent" android:la

我正在使用
RelativeLayout
在图像上放置文本视图,例如,问题是我尝试的每个设备(在模拟器中)都会改变屏幕上的位置



您想将
文本视图
直接放在
图像视图
上吗?比如这个例子?如果是,请尝试
FrameLayout
而不是
RelativeLayout
您可以将图像作为相对布局的背景,然后只使用文本视图

为什么不使用相对/线性布局背景而不是ImageView?
<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>