如何显示在Android的特殊字符? [英] How to show special characters in Android?

查看:425
本文介绍了如何显示在Android的特殊字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发本机应用程序其中包括一些数学公式。

I am developing a native app which consists of some mathematical formulas.

公式会像.........

Formulas will be like.........

我想在我的应用程序中显示这样的公式,但我不如何在Android中使用这些特殊字符。我想在列表视图中单独显示每个公式......如果我是复制式放大器;如果我设置文本​​的文本视图意味着它显示出像

I want to display such formulas in my application, but i don't how to use these special characters in Android. I want to display each formula individually in a list view...... If i am copying formula & if i am setting text to text view means it is showing like

   txtv.setText("\\cos^2\\theta + \\sin^2\\theta = 1\\! ");

和获得输出以相同的模式。因此,谁能帮助我如何在Android中使用这些数学特殊字符。

and getting output in the same pattern. So, can anyone help me how to use these mathematical special characters in Android..

推荐答案

对不起,没有很多不同的解决方案.. 有没有神奇的答案,这里有一些不同的方式来实现你想要的。

Sorry, there are not a lot of different solutions.. There are no 'magical answer", here are some different ways to achieve what you want.

1)使用web视图与一些JavaScript

1) Using a webview with some Javascript

2)使用服务器,以产生下式的图象。

2) using a server to produce a picture of the formula.

3)在应用程序中使用9.png文件embededd的平方根符号,并显示为TextView的背景

3) Using a 9.png file embededd in your app with the square root symbol and display it as textview background

4)绘制与所有的文字和符号

4) Drawing a canvas with all your text and symbols

5)使用十六进制code: http://htmlhelp.com/reference /html40/entities/symbols.html

5) using Hexadecimal code: http://htmlhelp.com/reference/html40/entities/symbols.html

http://tlt.its.psu.edu/suggestions/国际/​​ bylanguage / mathchart.html

6)也许其他的想法,但绝对没有办法实现的最简单的方法一300公式列表视图。

6) Maybe other ideas, but definitely no way to achieve a 300 formula listview in a easiest way.

这篇关于如何显示在Android的特殊字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆