Android 使用imageview在圆内圆

Android 使用imageview在圆内圆,android,Android,我使用了两个带有圆形png的ImageView,现在在我的手机s6 edge上,两个图像完美设置,一个在另一个内部, 以下是我的xml: <RelativeLayout android:id="@+id/spinner" android:layout_width="wrap_content" android:layout_centerInParent="true" android:layout_height="wrap_content" >

我使用了两个带有圆形png的ImageView,现在在我的手机s6 edge上,两个图像完美设置,一个在另一个内部, 以下是我的xml:

    <RelativeLayout
    android:id="@+id/spinner"
    android:layout_width="wrap_content"
    android:layout_centerInParent="true"
    android:layout_height="wrap_content"  >

    <ImageView
        android:id="@+id/outter"
        android:layout_height="405dp"
        android:layout_width="405dp"

        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true" />

    <ImageView
        android:id="@+id/inner"
        android:layout_height="200dp"
        android:layout_width="200dp"
        android:src="@drawable/arrowbb"
        android:layout_centerInParent="true"
        android:layout_centerVertical="true"   />
</RelativeLayout>
现在,如果我在galaxy s2上运行应用程序,我会发现两个圆几乎相互覆盖,而不是s6边缘上的方式,尽管我使用dp设置每个图像视图的宽度和高度,如xml所示

请注意,我在imageview中使用的两个圆形图像都是32位的,我使用photoshop调整了它的大小


我需要这两个圆圈在任何android手机上都是相同的形状,如何做到这一点?

试试这样:

<RelativeLayout
android:id="@+id/spinner"
android:layout_width="wrap_content"
android:layout_centerInParent="true"
android:layout_height="wrap_content"  >

<ImageView
    android:id="@+id/outter"
    android:layout_height="405dp"
    android:layout_width="405dp"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true" />

<ImageView
    android:id="@+id/inner"
    android:layout_height="200dp"
    android:layout_width="200dp"
    android:src="@drawable/arrowbb"
    android:layout_alignBottom="@id/outter"
    android:layout_alignLeft="@id/outter"
    android:layout_alignRight="@id/outter"
    android:layout_alignTop="@id/outter"  />
</RelativeLayout>

答案是:D,非常感谢,伙计,答案被接受了