【发布时间】:2014-12-29 15:32:41
【问题描述】:
我给出了我在应用程序中使用 textView 的以下属性。 (中间绿字)
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="20sp"
android:textStyle="bold"
android:gravity="center_horizontal"
android:text="10/9"
android:id="@+id/estimate_fertility_date"
/>
但是,示例图片中存在空格。我想设置这些空间,因为当 App 初始化时,它看起来很糟糕。
我研究了大约 1 小时,找到了一些答案,但它们不是我想要的答案。 https://stackoverflow.com/a/6864017/2834196
【问题讨论】:
-
不确定您到底想做什么,但如果您似乎无法根据需要设置间距,也许首先将 android:includeFontPadding="false" 添加到您的 textview 以便默认填充不会影响您想要的间距,然后将顶部/底部填充或边距设置为 textview...
标签: android