HtmlView2 icon indicating copy to clipboard operation
HtmlView2 copied to clipboard

set dark black color

Open pishguy opened this issue 8 years ago • 10 comments

i'm trying to set dark black color as #000000 for texts, but i see light black color and i can't set to dark

<span>
    It's to
    <span style="color:#000000;">do do do do</span> so
</span>

http://rupload.ir/upload/55wha037ka5bbn4m7v1v.jpg

pishguy avatar Apr 30 '17 17:04 pishguy

I have added a test (see latest commit) but can't repro the issue: issues

stefanhaustein avatar May 01 '17 21:05 stefanhaustein

@stefanhaustein oh sir, i found whats problem, dark black work fine until nested tags are inside <p> for example:

in this html <span> is child of <p>

<p style="color:gray">
      It's to
      <span style="color:#000000;">do do do do</span> so
</p>

if parent was <span> nested tag could not have dark black color for example:

<span>
    It's to
    <span style="color:#000000;">do do do do</span> so
</span>

pishguy avatar May 02 '17 03:05 pishguy

I have changed the p to a span in the test, but the rendering still looks correct: https://github.com/stefanhaustein/HtmlView2/commit/98841c960380694e1ab620f21b62cad7c934cf17

stefanhaustein avatar May 02 '17 18:05 stefanhaustein

@stefanhaustein did you test on api level 24 or above?

pishguy avatar May 30 '17 03:05 pishguy

Don't remember the exact setup, is the issue limited to specific api levels? Which API level did you use when observing the problem?

stefanhaustein avatar May 31 '17 21:05 stefanhaustein

i have this problem on api level 24, for dark black, tags must be into <p> not <span>

https://github.com/stefanhaustein/HtmlView2/issues/15#issuecomment-298488504

pishguy avatar May 31 '17 21:05 pishguy

Can you provide an example that doesn't work as expected that I can copy-paste into the test page, so we are sure we are looking at the same issue? I'll make sure I'll test on 24 then.

stefanhaustein avatar Jun 05 '17 21:06 stefanhaustein

@stefanhaustein please see this screen shot

for this html tag:

String text = "<html><span>It's to <span style='color:#000000;'>do do do do</span> so</span><br/><br/><p> hello <span style='color:#000000;'>do do do do</span> world</p></html>";

download source code

pishguy avatar Jun 06 '17 04:06 pishguy

Ok, for me, all the text is black, at least when I add it to the issues list (but the br seems to be skipped).

Can you switch to this newer version of this library: https://github.com/stefanhaustein/nativehtml ? It's not fully api compatible, but it's much simpler to maintain and debug for me...

stefanhaustein avatar Jun 06 '17 18:06 stefanhaustein

@stefanhaustein ok, please let me to test that

pishguy avatar Jun 07 '17 04:06 pishguy