android - 行与行之间有空格的 TextView 背景

标签 android textview

我想创建一个带有彩色背景和每行之间空格的 TextView,链接如下: enter image description here

我正在尝试使用 SpannableString,但我无法在行之间创建透明空间,知道吗?

谢谢大家,对不起我的英语不好。

最佳答案

尝试在您的 XML 文件中使用 lineSpacingExtralineSpacingMultiplier

关于android - 行与行之间有空格的 TextView 背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33775660/

相关文章:

Android:如何在 TextView 的左侧添加图标

java - Android - TextView 不显示

android - TextView 转到空间中的新行

Android 相机 - 如何从字节数组中获取特定的 "rectangle"?

java - Drawable 不显示在 ImageView 中

android - admob中的Mediation id和publisher id有什么区别

android - 想要在游戏的主视图中显示时间?

Android:如何设置相对于 PercentLayout/ConstraintLayout 的文本字体大小

安卓 "attempted to access a cursor after it has been closed"

android - 当用户单击通知消息时,我想在主屏幕上打开一个弹出窗口