转载请注明出处:http://blog.csdn.net/zhangphil
Android控制字体水平方向的缩放属性设置是android:textScaleX,即水平方向放大,备忘小知识点,此处记下。
作为演示,第一行是正常的默认样式,第二行是设置了android:textScaleX的属性为2。
代码:
[html] view plain copy <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Zhang Phil " /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textScaleX="2" android:text="Zhang Phil " /> </LinearLayout>
代码运行结果如图:
