我正在尝试将 textsize 设置为全局级别,但无法确定或找到方法来做到这一点。
例如我有这样的事情:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id = "@+id/Table"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:shrinkColumns="*"
android:stretchColumns="*">
</TableLayout>
</ScrollView>
TableRows 和 TextViews 本身是根据用户输入动态生成的。
问题是我想根据资源文件全局设置基本 textSize ,而不必去接触一堆代码。有没有办法告诉应用程序,“嘿,应用程序,使用它作为所有 textViews 的基本 textSize?”
或者换一种说法,在 HTML 中,我可以在 body、div 和 table 级别设置字体大小。我可以在一个布局(LinearLayout、TableLayout、ScrollView 等)级别上做一些类似的事情吗?