更新时间:2022-11-01 23:18:45
在线性布局中使用
android:layout_gravity="center"
在相对布局中
android:layout_centerInParent="true"
以上代码将textView在布局中居中 将文本在TextView中居中
Above Code will center the textView in layout To center the text in TextView
android:textAlignment="center"
android:gravity="center"