我想知道将可拖动图像添加到另一个图像的最佳方法是在android中。例如,如果我有一个人脸的图像,我怎么能添加一个较小的说喜剧嘴的图像并将其拖动到原始图像上的正确位置。有没有好办法解决这个问题?
提前致谢
答案 0 :(得分:0)
您可以使用FrameLayout重叠图像。请查看:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView
android:id="@+id/imageView1"
android:src="@drawable/img_face"
android:scaleType="fitCenter"
android:layout_height="250px"
android:layout_width="250px"/>
<ImageView
android:id="@+id/imageView2"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:src="@drawable/comedy_face"
android:gravity="center"/>
</FrameLayout>