I want to make round image by code with gradiant color like this picture
Asked
Active
Viewed 1,778 times
1

mostafa hashim
- 360
- 1
- 5
- 24
-
1You can use **RoundedImageView Library**... – InnocentKiller Dec 24 '14 at 12:20
-
but i want make border with 3 colors or put the border as image drawable as picture shows , not one color for the border , i tried all off this answers before – mostafa hashim Dec 24 '14 at 13:33
3 Answers
4
Check this solution https://github.com/vinc3m1/RoundedImageView It works for me.
Example with border:
<RoundedImageView
android:id="@+id/imageViewAvatar"
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_gravity="center_horizontal|bottom"
android:background="@drawable/border"
android:cropToPadding="true"
android:padding="7dp"
android:scaleType="centerCrop"
my:is_oval="true"
my:round_background="false" />
Where border is your png with any border you want. All you need is set padding, that wiil be a distance between your image and border. And Set the image, of course.

grig
- 848
- 6
- 15
-
but i want make border with 3 colors or put the border as image drawable as picture shows , not one color for the border , i tried all off this answers before – mostafa hashim Dec 24 '14 at 13:29
-
You can use RoundedImageView for round image and make border separately as you want. For example, use RoundedImageView and ImageView(for border) in RelativeLayout. – grig Dec 24 '14 at 13:32
-
-
-
thanks that what i need , i used this padding and background border with imageview , u saved my day – mostafa hashim Dec 24 '14 at 14:38
0
this is an Lib for android u can use this https://github.com/pungrue26/SelectableRoundedImageView

Naveen Tamrakar
- 3,349
- 1
- 19
- 28
-
but i want make border with 3 colors or put the border as image drawable as picture shows , not one color for the border , i tried all off this answers before – mostafa hashim Dec 24 '14 at 13:29
0
You can use RoundedImageView library.
Or, take a look at this if you don't want to use a library.
-
but i want make border with 3 colors as picture shows , not one color for the border , i tried all off this answers before – mostafa hashim Dec 24 '14 at 13:28