当前位置:编程学习 > wap >>

android UI 问题

我在以下一段程序中
<?xml version="1.0" encoding="utf-8"?>
<TableLayout android:id="@+id/tableLayout1"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:background="@drawable/background_a"
android:gravity="center_vertical"
  android:stretchColumns="0,3"
  >
<!-- 第一行 -->
<TableRow android:id="@+id/tableRow1" 
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView />

<TextView
    android:id="@+id/textView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="用户名:"
    android:textSize="24px" />

<EditText android:id="@+id/editText1" 
android:textSize="24px" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" android:minWidth="200px"/>
<TextView />
</TableRow>
</TableLayout>
运行后显示的结果中“用户名:”这三个字的字体是白色的,但把它拷到一个新project运行后字体变成了黑色,哪位大牛知道原因。。。求高牛!!!!! android ui --------------------编程问答-------------------- theme? --------------------编程问答-------------------- 你确定没有在程序里面改颜色吗? --------------------编程问答-------------------- 不同的系统的默认色是不一样的,你去看看不同的android手机,他们一些系统自带的控件颜色是有差异的 --------------------编程问答-------------------- 你想让他显示白色,直接指定颜色就OK了 --------------------编程问答-------------------- LZ回复下结果吧,等着呢!是color里面默认的颜色不同还是程序里面设置啦? --------------------编程问答-------------------- 安卓2.几的背景是黑色的,字体当然是白色的。安卓4.几的背景是白色的,那么字体就是黑色的。 --------------------编程问答-------------------- 楼上有道理,学习啦 --------------------编程问答-------------------- 不同的系统的默认色是不一样的 --------------------编程问答-------------------- 你可以强制指定下text的颜色
android:textColor --------------------编程问答-------------------- 6楼说的对。。不同版本默认颜色不一样,给它一个强制颜色android:textColor:color/white
补充:移动开发 ,  Android
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,