<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="30sp"//sp这个单位的字体能够随系统设置中字体的大小改变而改变,dp则不会。
android:layout_margin="30dp"//外边距大小。 android:layout_marginLeft为左外边距,以此类推
android:text="@string/hello_world" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="30dp"//内边距大小,paddingTop,paddingBottom等等。
android:text="@string/hello_world" />
android内外边距设置
最新推荐文章于 2021-11-15 11:25:41 发布