11.2 . Khmer on Android Device (out of date) - PowerPoint PPT Presentation

11 2 khmer on android device out of date n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
11.2 . Khmer on Android Device (out of date) PowerPoint Presentation
Download Presentation
11.2 . Khmer on Android Device (out of date)

play fullscreen
1 / 9
11.2 . Khmer on Android Device (out of date)
115 Views
Download Presentation
ginger-mcdowell
Download Presentation

11.2 . Khmer on Android Device (out of date)

- - - - - - - - - - - - - - - - - - - - - - - - - - - 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