1 / 9

11.2 . Khmer on Android Device (out of date)

11.2 . Khmer on Android Device (out of date). Prof. Oum Saokosal Master of Engineering in Information Systems, South Korea 855-12-252-752 oum_saokosal@yahoo.com. Khmer on Android Device.

Download Presentation

11.2 . Khmer on Android Device (out of date)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 11.2. Khmer on Android Device(out of date) Prof. OumSaokosal Master of Engineering in Information Systems, South Korea 855-12-252-752 oum_saokosal@yahoo.com

  2. Khmer on Android Device Until now, the year 2012, Android released 4.0 Ice Cream Sandwich, yet still no support for Khmer Unicode. Some browsers like Firefox and Dolphin support Khmer Unicode but not correctly displayed. To solve this problem at the moment, we need to use a character font, e.g. ABC, to embed on a Website.

  3. Khmer on Kohsantepheapdaily Currently, there is only site being able to display Khmer on Android device: www.Kohsantepheapdaily.com.kh Fortunately, I managed to know how to do it  Next slide shows you how.

  4. Make an App with ABC font Get the files for embedding Khmer from me!!! Copy all the files, including styles folder, into assets folder of a project.

  5. In main.xml: <WebView android:id="@+id/webView1" android:layout_width="match_parent" android:layout_height="match_parent" /> In Java: public class KhmerAndroidActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebViewwv = (WebView) findViewById(R.id.webView1); wv.loadUrl("file:///android_asset/khmer.html"); } } Note: android_asset is a reference to assets folder

  6. In khmer.html: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> <html> <head><title>Khmer Font on Android</title> <meta xmlns="http://www.w3.org/1999/xhtml" name="viewport" content="initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" /> <script type="text/javascript" src="styles/mobile.js"></script> <style xmlns="http://www.w3.org/1999/xhtml" type="text/css" media="screen"> @import "styles/mobile.css"; </style> </head> <body> <span class='kh20'>viTUPasaeyIg</span> <span class='kh24'>viTUPasaeyIg</span> <span class='kh28'>viTUPasaeyIg</span> </body> </html>

  7. In mobile.css: if you wanna change a style, do it here. .kh20 { font-family: ABCTEXT05ARegular; font-size:20px; font-weight:normal !important; } .kh28 { font-family: ABCTEXT05ARegular; font-size:28px; overflow:auto; } .kh24 { font-family: ABCTEXT05ARegular; font-size:24px; overflow:auto; }

  8. Go to next slide

More Related