android - 我如何在android studio中写一个分数

标签 android user-interface android-layout android-studio textview

如何在 android studio 中写分数。我要生成的带有水平线的分数的最佳做法是什么。

最佳答案

使用html格式。但是,您必须在顶部和底部添加额外的空间以防止它被切断。

 SpannableStringBuilder test = new SpannableStringBuilder();
 test.append("\n");
 test.append(Html.fromHtml("<sup>5</sup>/<sub>9</sub>"));
 test.append("\n");

关于android - 我如何在android studio中写一个分数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32888531/

相关文章:

.net - WPF UI 更新细节

android - 在 ConstraintLayout 中对齐包含链的一组 View

android - 在 ConstraintLayout 中使用 minHeight 查看

android - BrowseFragment 上的另一个行层

user-interface - 为什么模态/非模态对话框称为模态/非模态?

android - 将数据从自定义 View 传递到 Activity ,反之亦然

javascript - 钛中逻辑和用户界面的分离(javascript)

android - 如何将约束布局转换为相对布局?

android - 无法在 WindowManager 中调用 onClickListener

android - 为 Android 应用设置 ActionBarSherlock 主题