-
-
Notifications
You must be signed in to change notification settings - Fork 619
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
IconicsTextView and Html.fromHtml colors #26
Comments
@SanderTuit i assume the spanables which are create by the Html.fromHtml method are overwritten by Android-Iconics. Not sure if it's that easy to keep both. Is it an required function for you? |
Well, I was actually trying to use it to color the icon, but I guess that would be more difficult altogether. My use case is the following. I'm displaying an icon after a username and want to use different colors for different user types. I guess I can use a different kind of |
There is something different which allows you to color icons inside a textView :D Html.fromHtml is not planned :D |
Here's a snippet how you can style elements of an TextView with spanables :D //Show how to style the text of an existing TextView
TextView tv1 = (TextView) findViewById(R.id.test1);
new Iconics.IconicsBuilder().ctx(this)
.style(new ForegroundColorSpan(Color.WHITE), new BackgroundColorSpan(Color.BLACK), new RelativeSizeSpan(2f))
.styleFor("faw-adjust", new BackgroundColorSpan(Color.RED), new ForegroundColorSpan(Color.parseColor("#33000000")), new RelativeSizeSpan(2f))
.on(tv1)
.build(); |
IconicsTextView
doesn't follow HTML colors when usingsetText(Html.fromHtml('Test: <font color='#FF0000'>Colored text goes here</font>'))
. Is this intentional, a bug or a feature? ;-)The text was updated successfully, but these errors were encountered: