Occasionally a TextView with dynamic content will show a price. For example, as part of the content it might say $123.00
Sometimes the content may show a phone number or a URL, so I set android:autolink on the TextView. I want those to be turned into links.
The problem is that prices are turned into phone links. Obviously they are not phone numbers–either the brevity of the number or the presence of a currency code should be enough to figure that out.
What can I do so that phone numbers and URLs are autolinked, but so that prices are not autolinked as if they were phone numbers?
EDIT: There can be mixed content in the text. The specific content comes from another party and is unpredictable. A made-up example could be
“See our new store at 123 Main Street. Open 9-5 M-F. Call us at 123-456-7890 for the latest deals. Prices starting at $123.00. Like us on facebook at http://www.facebook.com/whatever.”
In that case I would want the URL to link to the website, the phone number to be linked as a phone number, but the price to NOT be linked.
I assume you have the knowledge of what the data type is and as such I would suggest not to use autolink but rather set your own onClickListener that adds the desired action.