0

I have a requirement of loading images but when i am loading images it should not be square/rectangular but in circle . So i want the images in circle and the border should be white in color . How do i load images in circle/oval . I tried creating background with shape = oval and gradient = 270 and set the background of image view to that shape . How else can i set the background for imageview .

    <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" >
    <gradient android:startColor="#FFFF0000" android:endColor="#80FF00FF"
            android:angle="270"/>
</shape>
Preethi
  • 2,112
  • 7
  • 38
  • 54

2 Answers2

2

How to make an ImageView with rounded corners?

solved my problem . I need a white border around the bitmap images and figuring out that now :(

Community
  • 1
  • 1
Preethi
  • 2,112
  • 7
  • 38
  • 54
0

Create an image with circle in the center.. that circle should be transparent.

Put this image layer over your image :)

Relative or FrameLayout will do the job for this.

Umair
  • 1,206
  • 1
  • 13
  • 28
  • 1
    Not working :( The actual image is square and then there is this transparent circle . I want the actual image to be in circle with white background – Preethi Oct 02 '12 at 03:47