I have two images. One is a simple image and the second is a fancy frame. I want to set the frame on the image. I searched through some blogs, but unable to find an answer. Could anyone tell me the idea or any concept about how to do that?
Asked
Active
Viewed 82 times
1 Answers
0
You can you FrameLayout
to use 2 Images 1 over other like below to achieve like Frame -
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/image1"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="15dp"
android:layout_gravity="center"
android:background="@drawable/image2"/>
</FrameLayout>

Dipankar Baghel
- 1,932
- 2
- 12
- 24
-
Yes, true. But I want to drag image1 to fit on the frame(image2). How to do this? – Nipa Feb 04 '20 at 06:30