本文介绍了在Android的马拉地语字体支持的TextView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含TextView的一个小部件的布局。我想设置马拉文字的TextView的。我想股票控件,它显示在屏幕上马拉的消息。问题是我无法设置马拉字体远程视窗。任何帮助吗?在此先感谢

I have a widget layout containing textview. I want to set marathi text to that textview.I am trying ticker widget which shows marathi news on screen. the problem is i am unable to set marathi font to remoteview. Any Help? Thanks in advance

编辑:

下面是我的code

RemoteViews remoteViews = new RemoteViews(this .getApplicationContext().getPackageName(), R.layout.widget_layout);
// Set the text
remoteViews.setTextViewText(R.id.txt_marqee, stringBuffer);

这是我的远程视窗充气widget_layout。而这个布局包含的TextView里面我是用一个股票。我想设置devnagari字体远程视窗。任何帮助?

this is my remoteview inflating widget_layout. And this layout contains textview which i am using as a ticker. I want to set devnagari font to remoteview. Any help?

推荐答案

由于梵文字体不支持Android的,你仍然可以给支持你的应用程序。

As Devanagari fonts are not supported by Android, you can still give that support to your Application.

有关马拉字体拷贝字体文件到你的资源文件夹。然后用下面的code。

For Marathi font copy font file to your asset folder. then use the following code.

 TextView text_view = new TextView(this);
 Typeface font = Typeface.createFromAsset(getAssets(), "MarathiFont.ttf");
 text_view.setTypeface(font);
 text_view.setText("मराठी");

以同样的方式ü可以给印地文支持......

the same way u can give support for hindi....

这篇关于在Android的马拉地语字体支持的TextView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 05:12