I am using Fresco
image loader library and I want to add custom image
icon on Fresco's
rounded border only. I have googled to find such functionality but not got any proper solution. Kindly help me that how can it possible. I am attaching screenshot
and I need such functionality as per my requirement.
Asked
Active
Viewed 793 times
0

Mohd Sakib Syed
- 1,679
- 1
- 25
- 42
-
Add the Icon and the Image inside Relative layout and you can achieve your requirement – Terril Thomas May 22 '17 at 06:39
1 Answers
0
Fresco supports overlays, so just add an overlay to the drawee hierarchy with your icon.
http://frescolib.org/docs/drawee-branches.html#Overlays
For example, in XML you can do something like this:
<com.facebook.drawee.view.SimpleDraweeView
xmlns:fresco="http://schemas.android.com/apk/res-auto"
android:id="@+id/my_image_view"
android:layout_width="40dp"
android:layout_height="40dp"
fresco:overlayImage="@drawable/your_overlay"
/>
You have to position the overlay image accordingly, for example by using a <bitmap android:gravity="bottom|right" />
, ninepatch, or custom drawable. See also https://developer.android.com/guide/topics/resources/drawable-resource.html and How to get gravity 'bottom' working on a drawable in xml

Alexander Oprisnik
- 1,212
- 9
- 9
-
Thanks you so much for your answer but can you please provide me sample code to get such functionality. – Mohd Sakib Syed May 24 '17 at 04:35