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

Is there any way to change text color partially ? #147

Open
1 task
adneerav opened this issue Dec 22, 2020 · 2 comments
Open
1 task

Is there any way to change text color partially ? #147

adneerav opened this issue Dec 22, 2020 · 2 comments

Comments

@adneerav
Copy link

What kind of issue is this?

  • Feature Request. How to change text color for the swiped area content text. ?

Details

I want to change text color for the swiped content area.
Example :

I have text "Slide to pay" & initially text color is RED
Now if I swipe up to "Slide".
Text color of "Slide" text should be changed to GREEN & remaining text("to pay") color should remain same as per initial color(RED).

Any suggestion or help ?

@cortinico
Copy link
Owner

If I understand correctly, you're asking for support to partially color the text based on the slide percentage. So if you slide till 50%, half of the text should be colored differently than the other half.

That's currently not supported at the moment. Suggestions/ideas on how to do it are more than welcome.

@adneerav
Copy link
Author

Yes correct,

I have done that by calculating text size and innerthumb position.

I'll implement that using style attributes and create PR whenever I have some spare time.

Thanks

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

No branches or pull requests

2 participants