正如您在以下定义中所看到的,我将TextView的顶部填充设置为零:
<TextView
android:id = "@+id/headline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:paddingTop="0dip"
android:textColor="@color/light_grey"
android:layout_toRightOf="@id/logoImage"
android:layout_marginLeft = "8dp"
android:textSize="13sp"
android:textStyle="bold"
android:background="@color/magenta"
android:text="Platzhalter"/>
但是TextView仍然有填充:
有人知道如何解决这个问题吗?
编辑: 评论是对的,问题不是填充而是字体。将includeFontPadding设置为false不会产生完美的结果,但它有很大的帮助,结果现在已经足够好了。 对于遇到同样问题的其他人:Thorstenvv从here得到的回答听起来很有希望。