如果我按下面的方法指定 TextView,为什么会得到一个 'white on white'? 我是在Nexus上运行,android上 的 TextView 默认不是黑色的吗?
<TextView
android:id="@+id/atext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium"/>
我猜你是改变了父视图的背景,但是需要转换整个程序的主题。
如果我的猜想是正确的,你就应该把下面这一行添加到 AndroidManifest.xml
application tag
- android:theme="@android:style/Theme.Light".
<application android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@android:style/Theme.Light">
我去 Eclipse 中单击文本视图,然后就能看见一个很大的选项列表。