1

我正在尝试用 2 张图片创建照片拼贴。我有一个背景图像,其中有 2 个透明部分,除以边框。我想将两个不同的图像放入这两个部分,图像可以移动、拖动和缩放。但是,1 个图像应该留在 1 个透明部分,并且不能移动到另一个透明部分。第二张图片也是如此。我遇到的问题是,当我放大时,图像最终会出现在两个透明部分。

这是一个示例照片来演示。绿色部分是背景(它将是实时应用程序中的真实图像),2 个白色部分代表 png 文件中的透明部分。我想将 1 张图像放入两个白色圆圈中的每一个中。 在此处输入图像描述

这是代码

    <ImageView
        android:id="@+id/imgPhoto"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        />

    <ImageView
        android:id="@+id/imgPhoto2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        />

    <ImageView
        android:id="@+id/imgBackground"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="fitXY"
        />
4

0 回答 0