Closed Monabr closed 7 months ago
@Monabr Have you checked the custom
function of the EventPointType
?
It accepts a Painter, where you can pass the icon.
You can also find an example in the code: https://github.com/pushpalroy/JetLime/blob/58d485969983030206af38b15ecd68c27400ef46/app/src/main/java/com/pushpal/jetlime/ui/timelines/CustomizedVerticalTimeLine.kt#L79
Painter cannot paint with color by itself. There is also no background for the icon. Painter only uses icons from resources, but cannot colorize them.
Right. So you are looking to add a tint to your icon? And also a background in case your icon is transparent itself?
Will be adding support for this in the next release.
@pushpalroy I could attempt to take this task on if you want :) I believe there are solutions using the painter or converting their image to a bitmap and then applying a tint but providing it directly would be much easier for end users.
Hello @SteliosPapamichail,
Thank you for your interest in contributing to this project! I'm currently in the process of developing an enhanced method for integrating icons within the timeline, aimed at streamlining the existing implementation. If you have any ideas or suggestions on this front, I would be very keen to hear them. Your input could be incredibly valuable in refining this feature for our end users.
The support for this has been added to the latest release 2.2.0
.
You will now be able to pass an optional tint
color for the custom icon.
Also the pointColor
will now act as the background for the custom icon painter.
Also, there was an issue with the custom icon animation which was fixed.
Thanks again for using this library and providing feedback!
Please make it possible.