小编Rad*_*adu的帖子

android:colorForeground的含义

我正在通过复制内置Theme.Light中的部分来编写新主题,而我不明白android:colorForeground的含义.

我能找到的唯一信息是"前景图像的默认颜色" ,但我仍然无法理解它的含义.

有人可以赐教吗?

我用于测试的布局:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:colorForeground="#80ff8000" >

    <EditText 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:text="First EditText"
        android:colorForeground="#ffffffff" />
    <TextView
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:text="First TextView"
        android:colorForeground="#ff000000" />

    <RelativeLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:colorForeground="#ffffffff" >
        <EditText
            android:layout_width="fill_parent" 
            android:layout_height="wrap_content" 
            android:text="Second EditText, inside a RelativeLayout"
            android:colorForeground="#ff0000ff"
            android:layout_alignParentTop="true"
            android:layout_marginTop="10dip" />
        <TextView
            android:layout_width="fill_parent" 
            android:layout_height="wrap_content" 
            android:text="Second TextView, inside a RelativeLayout"
            android:colorForeground="#ff00ff00"
            android:layout_alignParentTop="true" />
    </RelativeLayout>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

android themes

9
推荐指数
1
解决办法
2378
查看次数

标签 统计

android ×1

themes ×1