如何在androidxml中组合两个图像

如何在androidxml中组合两个图像,android,xml,Android,Xml,我正在使用androidxml设计,我想合并两个这样的图像。我使用了框架布局,但它合并了两个图像。我不知道怎么做这个设计 这是我的密码: 这是我的代码,它对我有用,我希望它对你也有用 <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" androi

我正在使用androidxml设计,我想合并两个这样的图像。我使用了框架布局,但它合并了两个图像。我不知道怎么做这个设计

这是我的密码:


这是我的代码,它对我有用,我希望它对你也有用

  <FrameLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerHorizontal="true">
                    <ImageView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:src="@drawable/rsz_ic_db_trash"
                        android:layout_gravity="center"
                        />
                    <ImageView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:src="@drawable/rsz_ic_db_red_bubble"
                        />
                </FrameLayout>

您需要做的是使用框架布局

棘手的部分是找到完美的边距和图像大小

在这里,我使用了15dp的边距来显示更大的图像

结果:


您必须使用FrameLayout并放置两个ImageView,然后根据需要放置它们。如果您需要更多帮助,请发布您的xml代码。我想像这样合并两个图像-但是您已经使用了frame layout,但它合并了两个图像。您想合并图像还是不想合并图像?我不想合并它们@CommonsWare@jonathanrz我编辑了我的问题。请检查it@Junaid此代码的输出是什么?您希望的输出是什么?
<FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">


        <ImageView
            android:layout_marginLeft="12dp"
            android:layout_marginTop="15dp"
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:src="#900"
            />

        <ImageView
            android:layout_width="60dp"
            android:layout_height="60dp"
            android:src="#090"
            />


</FrameLayout>