我计划在不同的设备大小上为textview使用不同的字体大小,以使字母清晰。我已经决定不对不同的设备使用不同的布局,并建立了一个通用的布局,以适应所有的设备。现在唯一的问题是文本大小。
问题:
>我想提供关于如何根据设备的大小(物理尺寸)改变字体大小的技术建议。
>如何根据宽高比导出字体大小。
>使用这种方法的任何缺陷?
文本视图的Xml
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ffffff"
android:orientation="vertical">
android:id="@+id/tvValue4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="I planned to use different font size for the textview on different device size so as to make the letters legible. I have already decided not to use different layouts for different devices and built a common layout to fit in all the devices. Now the only problem is on the text size."
android:textColor="#000000"
android:textSize="15sp" />
提前致谢