【发布时间】:2015-09-30 17:30:42
【问题描述】:
所以在编程方面我仍然是新手,但我很好奇制作公式表的最佳实践是什么。当然,布局中只是简单的单词、字母和数字,但其中一些数学公式有很多字符,textview 无法读取。所以我应该只对我在word上制作的公式进行截图,还是浪费太多内存。还要放大和缩小我该怎么做。
【问题讨论】:
标签: android android-layout textview imageview zooming
所以在编程方面我仍然是新手,但我很好奇制作公式表的最佳实践是什么。当然,布局中只是简单的单词、字母和数字,但其中一些数学公式有很多字符,textview 无法读取。所以我应该只对我在word上制作的公式进行截图,还是浪费太多内存。还要放大和缩小我该怎么做。
【问题讨论】:
标签: android android-layout textview imageview zooming
在 value 文件夹的 string.xml 文件中使用 HTML 代码。
<string name="superscript"><html><i>a</i><sup>2</sup>+<i>y</i><sup>2</sup></html></string>
<string name="subscript"><html>f(x)<sub>1+x</sub></html></string>
在xml布局中
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/superscript" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/subscript" />
数学符号和字符的链接:
【讨论】:
这是真的,一切都与外观有关。但是如果我想做一个像拉普拉斯表一样的表,最好有一个图像
【讨论】:
如果您喜欢在 android 中使用 webview,那么当然可以!您可以使用 javascript 库 jqMath 在网页上展示任意数量的数学方程。 https://mathscribe.com/author/jqmath.html
【讨论】: