Skip to content
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

Modify HTML tag #39

Closed
arthursz opened this issue Jan 27, 2016 · 2 comments
Closed

Modify HTML tag #39

arthursz opened this issue Jan 27, 2016 · 2 comments

Comments

@arthursz
Copy link

Hey! I am trying to create a custom tag for my application. I want to create something like this:

<font id="1" style="background-color:#000000">Teste</font id="1">

add a identifier id="1" inside the HTML tag. But i can't understand how i can alter the tags in your code. Is there any way?

Thanks

@1gravity
Copy link
Owner

Have a look at the ConverterSpannedToHtml class:

        } else if (style instanceof BackgroundColorSpan) {
            mOut.append("<font style=\"background-color:#");
            String color = Integer.toHexString(((BackgroundColorSpan) style).getBackgroundColor() + 0x01000000);
            while (color.length() < 6) {
                color = "0" + color;
            }
            mOut.append(color);
            mOut.append("\">");

Tip: use shift+ctrl+f to search for text in the project (assuming you're using Android Studio).

@arthursz
Copy link
Author

Thanks!!!!!!!!!!!!!!!!!!!!! It's exactly what i needed =D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants