0

I am following the rounded image tutorial from romain guy,

http://www.curious-creature.com/2012/12/11/android-recipe-1-image-with-rounded-corners/

I extracted the drawable to a class RoundedDrawable but when i try and use it to the bitmap, it will always paints white.

How do i fix this?

Nikhil
  • 1,212
  • 13
  • 30
1tSurge
  • 663
  • 2
  • 7
  • 20
  • There are better ways to create rounded images, you should not use that method anymore. https://stackoverflow.com/a/26471808/599346 – tyczj May 31 '17 at 19:57
  • @tyczj that method doesn't work for me either. not even loading the bitmap =/ – 1tSurge May 31 '17 at 20:15

1 Answers1

0

Here is one simple way
add this on your build.gradlecompile 'de.hdodenhof:circleimageview:2.1.0'
and on your xml add

      <de.hdodenhof.circleimageview.CircleImageView
       xmlns:app="http://schemas.android.com/apk/res-auto"
       android:id="@+id/profile_image"
       android:layout_width="your size"
       android:layout_height="your size"
       android:src="@drawable/profile"
       app:civ_border_width="2dp"
       app:civ_border_color="#FF000000"/>
bikash giri
  • 1,444
  • 1
  • 10
  • 15