0

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?

Nipa
  • 9
  • 2

1 Answers1

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