小编Ram*_*000的帖子

如何在TextView Android中的字母上获得重音符号

我的文字需要用拉丁语显示。当文本文件显示在TextView中时,其中带有问号的小菱形会出现在所有字母应带有重音的位置。有人可以帮忙吗?我需要能够以PDF格式显示文本。因此,我通过将文本的各个部分从PDF中复制到文本文件中来获取文本文件。扫描文本文件的代码如下所示:

public String inputStreamToString(InputStream is) throws IOException
{
    StringBuffer sBuffer = new StringBuffer();
    BufferedReader  dataIO = new BufferedReader(new InputStreamReader (is));
    String strLine = null;
    while ((strLine = dataIO.readLine()) != null)
    {
        sBuffer.append(strLine + "\n");
    }

    dataIO.close();
    is.close();

    return sBuffer.toString();
}
Run Code Online (Sandbox Code Playgroud)

然后在onCreate()我有这个:

text = (TextView)findViewById(R.id.textView1);

    //text.setText("This is a whole lot of text and praying");
    InputStream iFile = getResources().openRawResource(idEng);
    try {

        text.setText(inputStreamToString(iFile));
        text.setFocusable(false);
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    text.setMovementMethod(new ScrollingMovementMethod());

    ELswitch = (ToggleButton)findViewById(R.id.toggleButton1);
    ELswitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() …
Run Code Online (Sandbox Code Playgroud)

java android text textview

5
推荐指数
0
解决办法
2413
查看次数

Django和Python有什么区别?

我正在寻找一个需要Django和Python的工作机会.我有一些Python的经验,但没有Django的经验,也不知道Django究竟是什么.有人可以解释Django和Python之间的区别,它们是如何相关的以及它们的用途是什么?

在此先感谢您的帮助.

python django

5
推荐指数
2
解决办法
8358
查看次数

标签 统计

android ×1

django ×1

java ×1

python ×1

text ×1

textview ×1