【发布时间】:2012-01-12 21:08:30
【问题描述】:
我正在尝试将 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 ,而不必去接触一堆代码。有没有办法告诉应用程序,“嘿,应用程序,将它用作所有 textView 的基本 textSize?”
或者换一种说法,在 HTML 中,我可以在 body、div 和 table 级别设置字体大小。我可以在布局(LinearLayout、TableLayout、ScrollView 等)级别上做一些类似的事情吗?
【问题讨论】:
标签: android android-layout text-size