I am using the autoLink="All" feature of TextView to linkify all urls and telephone numbers in a TextView.
The problem I am facing is that on emulator, certain numbers are identified as phone numbers and are clickable.
On real device, these numbers doesnt get identified as phone numbers and are not clickable.
Say If the TextView contains a number 163111, On emulator it is clickable. Clickng this takes user to dialer.
But on Nexus 7 this number is not clickable.
I had a look at the Linkify.addLinks() method, which I thought would explain this behaviour, but failed to find an explanation.
Has any one faced this problem?
What may be the reason behind this?
try "autolink" property for textview.
android:autoLink="email|phone|web"
Never mind. The emulator was running on 4.2 and Nex 7 was on 4.3
https://android.googlesource.com/platform/frameworks/base/+/430fc97
The modifications in Linkify code was the reason.
Related
I have a phone number that is being linkified on Android 4+ devices.
Linkify.addText(textView,pattern,scheme);
The problem I have is that extensions are not recognized by the phone. I have tried adding commas and p/w to no avail. I have also tried a webview with an anchor element instead of a linkified textview to the same result. Everytime only the phone number is dialed and never the extension. Has anyone been able to get extensions working on Android 4+ and if so what was your method?
For the textView string I would have the following:
"8001234567,555"
The number is dialed correctly but the extension is not added.
I am trying to read a long text from the sdcard to an edittext in Android.
On almost all devices this works very well, except for some samsung devices. When I try to read anything over 10kb the string I read it too gets the whole file. When I try to add this to the edittext its cut off at 10kb. Even if I put it in a loop trying to add a little bit at the time with append it still doesn't add more than 10kb.
On every phone I have tried this works, on HTCs, Sony Ericssons, the nexus phones, but none of the Galaxy S... phone can do it.
Has this happened to anyone else?
Is there a workaround?
10 minutes after posting this question for the 20th time on the web without any answers I find it myself!
In your layout file, in the EditText, add android:maxLength="some high value" and it works!
Interesting that most other devices don't come with a limit while some Samsung phones does for the edittext!
I am trying to read a long text from the sdcard to an edittext in Android.
On almost all devices this works very well, except for some samsung devices. When I try to read anything over 10kb the string I read it too gets the whole file. When I try to add this to the edittext its cut off at 10kb. Even if I put it in a loop trying to add a little bit at the time with append it still doesn't add more than 10kb.
On every phone I have tried this works, on HTCs, Sony Ericssons, the nexus phones, but none of the Galaxy S... phone can do it.
Has this happened to anyone else?
Is there a workaround?
10 minutes after posting this question for the 20th time on the web without any answers I find it myself!
In your layout file, in the EditText, add android:maxLength="some high value" and it works!
Interesting that most other devices don't come with a limit while some Samsung phones does for the edittext!
I am using Html.fromHtml to setText to my textView. Here is my text.
The figure below is not drawn to scale. Which of the following will most likely to be the value of ∠P?
In this sentence, angle sign is html value ( ).
It is working fine in emulator. I also tested on some android device (some unnamed tablets an ebook readers). They are ok. But in my android phone (Sony Xperia X8), it is not rendering angle sign. Instead, it is showing .
Is there anything wrong? Why is it not being consistent across devices although it is just a textview rendering simple html? More importantly, how could I solve this issue. Following is my graphical representation of my problem.
Edit: It is not only in textviews but also in webviews. I changed using webview instead of textview. Unfortunately, it didn't work out as well. Anyone got any idea?
With a TextView with right gravity when I write a mix of English and Arabic texts, some English texts are moved to the right of the TextView and are not shown.
This may be because of some sort of arabizer in Samsung.
Any suggestions to fix that?
RTL language support is only partially implemented in Android 2.3. This may be one of the limitations. Try it in a 2.3 emulator (to see if this is specific to Samsung, as you suggest) and a 3.0 emulator (to see if this has been improved).