程序如下:
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.52"
android:text="填写个人信息"
android:textSize="30"/>
这行会出错:
android:textSize="30"/>
------解决方案--------------------
后面要带单位,为了适应多分辨率,建议用30dip
------解决方案--------------------
字体官方建议 用 sp
------解决方案--------------------
字体设置要加单位,一般使用sp,用此单位的字体能够根据用户设置字体的大小而自动缩放。