I use the antroid attribute : autoLink = "map" TextView to navigate to the map and search for the address associated with this text view.
But he behaves rudely and finds only some addresses . Here is the code I'm trying to do:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:id="@+id/textViewautoLink" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/autolinktext" android:autoLink="map"></TextView> </LinearLayout>
Here is my strings.xml
strings.xml <?xml version="1.0" encoding="utf-8"?> <resources> <string name="autolinktext">1600 Amphitheatre Parkway, Mountain View, CA 94043 </string> </resources>
Problem:
Suppose I write the line above, i.e. 1600 Amphitheater Parkway, Mountain View, CA 94043, then its working tone and textView turn blue, and when I click onit, it looks for the address on the map.
When I change this address to: 1600 Amphitheater Parkway, Mumbai, IN, it also shows the same and tries to find the address, but since the address is incorrect, he could not find it. Good.
But when I write another address, for example: 600 Band Stand, Mumbai, IN Then
1) textview does not have blue color
2) It does not seem to be available for viewing
3), and since it is not clickable, it does not find the address.
I am looking for google, but I have no reason for this behavior. I also want to know that
Is there any format for writing this card address?
Just like android knows that the address is valid or not, just writing the address in String, since I wrote the same address in the same format, I just changed the line, and the result is that one address can be clicked and the other can not.
Please, help.