-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for custom spans #1
Comments
Hey Anton, thanks for the feedback. I actually thought about adding this, but my main goal while developing this library was to completely abstract it from the idea of Spannables, and letting people attach their custom spans would kind of defeat this purpose. Since this is just a wrapper around Spannables, I guess the only way to give user 100% of the functionality of spans without having to expose them to Spannables themselves, would be to add the fews spans that the library's missing (drawables for example) and hopefully that would be enough and there wouldn't be the need to add customs spans. Unless you have a better approach of course, them I'm all ears :) |
I understand your idea to hide spans, they are awful, but it's always a good idea not to limit users of the library, as you don't know what they need :) Possibly it's possible to wrap some spans with own interface and give users an ability to implement onDraw method. For sure one more important this will be adding an ability to hand click on specific pieces. For example I want to use this textview to display "Website: \nPhone: ", it's much better to have one TextView then 4, but I need to have an ability to handle clicks separately on website and phone. Adding an ability to add custom spans is the most easy way to make it possibly. Adding own interfaces is another way, but it's more complex :) |
Yeah, definitely agree with being able to define click events for the different spans. |
Hi,
First of all, thanks for your library, it looks really nice.
But it will be much better to give an ability to add custom spans.
Thanks.
The text was updated successfully, but these errors were encountered: