0
我已经尝试过很多例子,并且它们都不是work.Here是我想要做的。我有一个PhoneGap的日食project.here是项目结构PhoneGap自定义语言设置
我要添加自定义的语言为我的项目。这里是我的MainActivity.java
import org.apache.cordova.DroidGap;
import android.os.Bundle;
public class MainActivity extends DroidGap {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.loadUrl("file:///android_asset/www/index.html");
}
}
这里是我的index.html
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum- scale=1, minimum-scale=1, width=device-width;" />
<title>Directory Reader</title>
<link rel="stylesheet" href="jquery/jquery.mobile-1.1.1.min.css" />
<script src="jquery/jquery-1.8.0.min.js"></script>
<script src="jquery/jquery.mobile-1.1.1.min.js"></script>
<script type="text/javascript" src="cordova-2.0.0.js"></script>
<style type="text/css">
@font-face {
font-family: MyCustomFont;
src: url("NotoSansSinhala-Regular.eot") /* EOT file for IE */
}
@font-face {
font-family: MyCustomFont;
src: url("NotoSansSinhala-Regular.ttf") /* TTF file for CSS3 browsers */
}
body {
font-family: MyCustomFont, Verdana, Arial, sans-serif;
font-size: medium;
color: black
}
</style>
</head>
<body>
<p> test goda </p>
</div>
</body>
</html>
还是字体,我想显示没有显示在移动device.its显示英文字符“测试乡田”。任何想法如何解决这个问题?
任何想法来解决这个指令。 – san88 2015-04-01 08:32:20
是否确实在broswer上运行index.html? – KOTIOS 2015-04-01 09:05:27
不..但我怎么知道当应用程序安装在设备上的index.html的位置..我试图通过在浏览器上提供index.html位置。但浏览器也显示英文characters.Not字体我想要显示。 – san88 2015-04-01 09:06:44