addisonElliott / SegmentedButton

Segmented Control/Button with animation for Android API 16+
Apache License 2.0
148 stars 39 forks source link

Draw consistent background clip path for middle tabs #48

Closed vcoolish closed 3 years ago

vcoolish commented 3 years ago

This is needed to avoid color contrast problems for MIUI devices

addisonElliott commented 3 years ago

Hm, it's interesting that it's required for MIUI devices. Is this a bug?

Can you provide pictures of what sort of color contrast problems you're experiencing?

vcoolish commented 3 years ago

Hm, it's interesting that it's required for MIUI devices. Is this a bug?

Can you provide pictures of what sort of color contrast problems you're experiencing?

It's not a bug. MIUI has a feature that forces layout to invert contrast. But when we change the rect it doesn't happen. So it comes out that left and right tabs remain with unchanged color and middle ones are with inverted. It looks very ugly and it's just a workaround to make the colors consistent.

before after
IMAGE 2021-01-06 13:51:11 IMAGE 2021-01-06 13:51:16
vcoolish commented 3 years ago

Hi @addisonElliott Any updates on this?

addisonElliott commented 3 years ago

Sorry, I've been meaning to spend some time on this. I'll go ahead and merge it now, but it may be a day or two until I can release another version.

Thanks for being patient.

vcoolish commented 3 years ago

Thank you @addisonElliott :)

Sorry, I've been meaning to spend some time on this. I'll go ahead and merge it now, but it may be a day or two until I can release another version.

Thanks for being patient.