I hae posted the answer on stackoverflow :
http://stackoverflow.com/questions/10095306/crop-imageview-that-fits-to-the-image-in-android/10096381#10096381

On Apr 10, 10:00 pm, Android Developer <[email protected]>
wrote:
> Hi All,
>
> I have an imageview and i set background and source for that. How to crop
> the imageView that fits exactly with image alone.
>
> In the attachment oval is the image. how do i set that while background
> color only for the image.
>
> I tried with scaleType but no luck and i attached the code i tried
>
> <ImageView  android:layout_height="wrap_content"
> android:layout_width="wrap_content" android:scaleType="centerCrop"
>             android:src="@drawable/circle" android:background="#ffffff"
> android:id="@+id/image"></ImageView>
>
> Thanks in Advance.
>
>  imagebackground.png
> 25KViewDownload

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to