我正在寻找很长时间,但我没有成功。我遇到过这个问题多次,但不知何故,我以固定的大小管理。设置相应的设备屏幕尺寸的Textview尺寸
但是有没有什么方法,以便TextView的大小取决于设备的屏幕大小。
到目前为止,我使用下面的代码,但即使如此,我面临着这样的问题。我想在下面的代码中设置比textAppearanceLarge
更大的尺寸。
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall" />
如果我设置一些固定的大小,说android:textSize="32sp"
它可能看起来大,屏幕尺寸像银河王牌,但在S3样的设备看起来很小。
欢迎任何相关答案,并提前致谢。
http://stackoverflow.com/问题/ 9877946 /文字大小 - 和 - 不同的android屏幕尺寸 是通缉的行为? – julthedroid 2013-05-02 13:45:14