0
我正在使用TypeFace
在应用程序中显示泰米尔语字体。字母是这样的"fe;j r\;b ftrk;"
如何在文本视图中显示“”
我将它保存在字符串文件中并试图在UI上检索它。但"\"
转义下一个字符,我错过了一个字符:(事实上\代表一个字母,我希望\被显示。如何做到这一点。
感谢您的时间提前
我的代码如下
package com.mayuonline.kanthan;
import android.app.Activity;
import android.graphics.Typeface;
import android.os.Bundle;
import android.widget.TextView;
public class WelcomeActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Typeface tf = Typeface.createFromAsset(getAssets(), "font/Bamini.ttf");
TextView TextViewWelcome = (TextView)findViewById(R.id.textViewWelcome);
TextViewWelcome.setTypeface(tf);
TextViewWelcome.setText(R.string.WelcomeTitle);
}
}
你的问题标题说你想吨。 o显示'“/”'和你的问题描述说你想显示'“\”'。编辑它们以匹配海誓山盟。 – 2011-06-15 06:26:32
只是使用转义字符..尝试在谷歌搜索这些。在你的情况下使用'//',首先会跳过第二个并允许它打印 – Stuti 2011-06-15 06:27:21
谢谢@harry @ Stuti。它工作:),我纠正了标题中的愚蠢错误。 – 2011-06-15 06:33:36