Android TextView(未完善)

来源:互联网 发布:淘宝包包代销货源 编辑:程序博客网 时间:2024/05/20 05:28

前两天,别人问了我个问题  如果TextView把他的字体设大 那么这样

<TextView    android:id="@+id/blowing_TV"    android:layout_width="wrap_content"    android:background="@color/white"    android:layout_height="wrap_content"    android:text="22"    android:textSize="75sp" />
那么就会出现这个样子

上下两边总会有空白在那里  ,更不能设pandding


所以嘛 就按照下面这个来嘛


1.基准点是baseline

2.ascent:是baseline之上至字符最高处的距离

3.descent:是baseline之下至字符最低处的距离

4.leading:是上一行字符的descent到下一行的ascent之间的距离,也就是相邻行间的空白距离

5.top:是指的是最高字符到baseline的值,即ascent的最大值

6.bottom:是指最低字符到baseline的值,即descent的最大值

0 0
原创粉丝点击