在android系统的语言支持 [英] language support in android
问题描述
我要创建需要卡纳达语,卡纳塔克邦地区languauge,India.Could有人让我知道我是否可以创建基于我的应用程序的Android应用程序?谢谢
I want to create an android application which requires Kannada language,the regional languauge of Karnataka,India.Could anyone let me know whether I could create my application based on that? Thanks
推荐答案
刚刚尝试这一点。
第1步:下载字体卡纳达语.TTF文件。 (例如说
brhknd.ttf)。
Step 1: Download a kannada font .ttf file. (For example say brhknd.ttf).
第二步:现在,在您的资产文件夹中创建一个目录下的字体,在
Android项目。
Step 2: Now create a directory "fonts" in your assets folder in the android project.
第3步:现在复制brhknd.ttf文件置入资产/字体
文件夹中你的Android项目。
Step 3: Now copy the brhknd.ttf file into assets/fonts folder in you Android project.
第四步:这些行添加到您的onCreate()
Step 4: Add these lines to your onCreate()
Typeface kannada = Typeface.createFromAsset(getAssets(), "fonts/brhknd.ttf");
第五步:立即提供这种字体到你希望你的TextView
Step 5: Now provide this typeface to your TextView you want.
textview= (TextView) findViewById(R.id.tipstext);
textview.setTypeface(kannada);
textview.setTextSize(20);
textview.setText( "Jackson dsilva mangalore");
这篇关于在android系统的语言支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!