0

I am fresher in android so I don't know how to set color of circle image boundary in android. Please can any one suggest me?

Prince Agrawal
  • 3,619
  • 3
  • 26
  • 41

1 Answers1

0

There are number of ways to achieve the same thing. 1. Layering 2. Placing images inside a relative layout.

The example could be like below.

<RelativeLayout
    android:layout_width="200dp"
    android:layout_height="200dp" >

    <ImageView

        android:layout_width="160dp"
        android:layout_height="160dp"
        android:layout_centerInParent="true"
        android:src="@drawable/bg_circle" />

    <ImageView
        android:layout_width="200dp"
        android:layout_height="200dp"
        android:layout_centerInParent="true"
        android:src="@drawable/rotatetrans" />
</RelativeLayout>

I have created a project to demonstrate both approaches. you may consider taking a look at it. Hope it helps.

https://github.com/gansBhat/AndroidProjects/tree/master/Examples/ImageWithBorder

Take a look at layout file activity_main.xml

and ImageWithBorder\res\drawable\layeredImage.xml in the example. You can figure it out.

Ganesh Bhat
  • 243
  • 2
  • 10