0

I'm trying to implement a feature that highlights dates in a TextView and provides tappable links which, when clicked, takes the user to the Calendar app with the date pre-filled.

So far, I have the tappable links working using SpannableString, ClickableString and LinkMovementMethod, but I'm stuck at the "Finding dates in a string" part. I believe iOS has some built in functionality for this, so I'm wondering if anything exists in Android land that I might have missed.

Trying to hold off from writing a complex regex, so any ideas, advice to greatly appreciated. Thanks

Salmonlegs
  • 13
  • 3
  • I think this might help: https://stackoverflow.com/questions/33547179/how-to-identify-date-from-a-string-in-java in this question they use a library that takes one string parses all the Dates in those strings and gives them back as an Array. You then have to plug it in your code to make links and you're done. – NLxDoDge Jan 28 '22 at 13:16

0 Answers0