Android 2.3 Hebrew Support in Webview - android

I have testing an app I ported to 2.3 on the Android 2.3 emulator, the app includes Hebrew strings displayed in a WebView required solving three problems:
Telling webview to use hebrew fonts (see my post with solution her Android 2.3 Hebrew fonts in Webview)
Telling webview to display the string right to left, which I solved by adding
<p dir="rtl">
The last problem is that webview mirrors the text: in other words the first word that should be on the right is the last word on the left and also the letters of that word are flipped, the first letter that should be on the right is the first letter from the left.
BTW, the 2.3 emaulator displays the string correctly if in a TextView.
Any ideas on how to fix #3?

I'm using webview that needs to show a complete hebrew website.
I can tell you that I didn't encounter any problem you have listed, but I DO know that sometimes the os (especially when it's custom) doing some problems with hebrew.
If you want to check it more closely, just download the 3.X (Honeycomb) platform to the sdk manager, and try it again (Honeycomb should have built-in hebrew display, so there shouldn't be any problems. If you want, you can send me the link and il'l check it out.

Related

How to display Unicode Characters in Android TextView?

My app works before with translation from English to Korean.
See screenshot below.
I don't have to configure things like right fonts among other things.
Now it won't work and would only show Latin based characters.
I know for sure that the API I use returns the translation I need since the correct translation shows on my logcat.
But android textView doesn't display it properly since I updated all of my android studio components such as the emulator. It doesn't work properly on API 17, 18 and 19 but works on API 16 which is rather odd since if it could work on API 16, it should work on much newer versions of android too. I've also Cold Boot all my emulators to reset it, but still no changes. It also works on API 21 as show below. But definitely not on API 17-19 as I've tested. :(. Please. help. Thanks.
[Edit]: I Changed the title from "How to display Korean-Chinese-Japanese Characters in TextView?" to what it is now since supporting most languages is under encoding foreign language in Unicode it seems.
After debugging for a couple hours more searching. It seems that the current updated Android emulators for API 17-19 are buggy. Since I noticed that it doesn't display Korean Characters not only my my app, but also everywhere else like my web browser.
The reason why my app displays unicode characters in an older android versions like Android 4.1. However, it turns out it could display Japanese Characters when I tried to translate to another language that is another Unicode character. It could also properly display japanese and chinese unicode characters in my browser.
I already created a fresh Android emulator for API 17-19, but it really didn't solved the problem. Installing a new keyboard didn't do the trick either. I could't not add another language too like japanese since its not in the options. But japanese works on the emulator, so I didn't bother trying to find one for Korean.
In the end, it turns out its really an emulator (Operating System related) problem and not an android app compatibility or problem on my code. Android 4.2-4.3 (API 17-18) is both Jelly Bean anyway. Since, it works on Android 4.1 that is Jelly Bean too, problems must be in the android image updates I had update a few days ago. for Android 4.4, must be the same case then.

Angularjs textarea data binding issue in Android 4.0.4 browser

I am working on for creating mobile web application using Angularjs. In one of my page, i used text area for getting some information from user. Also showing users how many characters more remaining, so they aware of maximum limit.
The issue i am getting is, UI is not updating the remaining characters value, during typing inside text area. Furthermore, remaining characters value updates, when user press enter or go to typing next line in text area.
Above issue is not reproducing in PC web browser, iOS safari browsers and Samsung Galaxy phone browser. Only issue i am getting is for Android Tablet running Android OS version 4.0.4.
Here is sample code:
<textarea id="textAreaId" name="textAreaName" class="input-block-level" rows="7" placeholder="Enter your text here." ng-model="oTextArea"></textarea>
<div>length {{oTextArea.length}}</div>
<div>text {{oTextArea}}</div>
In above code length and text div did not update value during typing inside text area for Android Tablet running Android OS version 4.0.4.
if anyone know any solution or reason why it is happening for Android Tablet, then please let me know. Thanks in advance.

Dipaly farsi text in android webview (for phones not supporting farsi)

In farsi letters are attach together to form writing scripts. However when I save HTML pages using "UTF-8" or "Windows-1256" encdoings, and try to display them using webview in android, letters are diplayed seperately and in left-to-right direction (instead of RTL).
I should notice that this case is not happening in phones supporting farsi.
Correct form should be like this (snapshot from phone supporting farsi):
Bad-formed text happens in phones not supporing farsi (Persian):
It should be noticed i've used persian font in both cases.
I also see some solutions for normal Strings in java which changes character on by one in this
question
My question: Can i fix this cases (or it should be fix by phone vendors)? if possible what is solution?
I hit this bug a lot when I was doing keyboards. The problem is that the build in canvas.drawText function in Android didn't support RTL languages. There was a patch for it, but it wasn't part of the default build of Android. So only models going out to those parts of the world that used it tended to have it. Unfortunately I know of no way to test whether it has the patch. And if it doesn't, there's no way to fix it. You could try reversing the text, but then you'd break devices which did have the patch.
Long story short- there is no way to fix it. However, I'd be shocked if Google hasn't picked up the patch in mainline by now (it existed back in the 2.2 days), so its a shrinking number of phones effected.
You can try making html with reverse font sequence! just write a windows app to get font and deliver reverse one, and use it in your android device

Unicode symbols not displaying correctly in mobile devices

While I'm developing responsive website I have used this uni-code ( » ) to the read more links. It is displaying correctly in desktop browser but it is not displaying correctly in mobile devices like android or iPhone. Is it possible to display the same as in desktop..? What's the problem..? Whether the mobile device doesn't support uni-code..?
The problem is in the embedded font you use, via #font face. The version used by Android is apparently broken. It does not display “»”, and it has problems with many other Latin 1 Supplement characters too, see my test page. Something may have gone wrong when you set up the font files on your server.
The problem does not appear if you remove the font-family setting, letting each browser use its default font, or if you use Droid Sans as hosted by Google, using <link href='http://fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet'> and font-family: "Droid Sans", sans-serif.
The problem is most probably not in the display of a character (“»”, U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK, is very widely supported in fonts) but in the character encoding. If the encoding is not properly declared, different browsers may make different guesses.
Check out the W3C page Character encodings, and make sure that the declared encoding matches the actual one.
If problems remain, please post a URL and explain what “is not displaying correctly” means (not displaying at all? space shown? some wrong characters shown? which?).
android does not support special characters, in android we need to write > to show ">" character. why don't you use image instead of characters.

Problem with Hindi keyboard on Android 2.3 emulator

I have selected some of the languages (like Hindi, English(India), English(United Kingdom) etc.) from Input languages option in Android keyboard settings in my emulator (Android 2.3 API). But the problem is that neither it is showing HINDI characters on Soft Keyboard nor displaying some of the Numbers on the keys e y u i o.
Problem is exactly shown in below given screenshot:
Also it is displaying rectangular boxes instead of characters.
Read this Android Feature Request. If you read towards the end (December 2010), you will see discussions of Gingerbread (Android v2.3) and that although it has gone some way to supporting Hindi language, it is still not providing full support 'out of the box'.
i tried changing fonts in platforms/android9/data/fonts folder and then created new avd.
please try krutidev010 font is it working then.

Categories

Resources