Android:文字颜色全息灯

use*_*621 5 android listview themes

我只是有一个愚蠢的问题......我正在使用(或者更好,我想使用)我的应用程序中的主题holo light:我已经在清单文件中设置了它.看下面的截图:文字太亮了,不是吗?好的,我知道我可以设置它,但我的问题是:它是holo主题中的真实文本颜色还是我的应用程序中有错误?我想这是因为奇怪的是,在Google中选择了像这样的非法颜色.

在此输入图像描述

编辑:

我用属性设置主题

android:theme="@android:style/Theme.Holo.Light"
Run Code Online (Sandbox Code Playgroud)

应用程序元素.这是listview代码,我填充了listfragment:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/songsLayout"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:gravity="left"
    android:orientation="vertical"
    android:padding="12dp" >

    <ListView
        android:id="@id/android:list"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:fastScrollEnabled="true"
        android:scrollbarStyle="insideInset"
        android:textFilterEnabled="false"/>

    <TextView
        android:id="@+id/songsFragment_titleTextView"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:paddingTop="7dp"
        android:paddingBottom="0dp"
        android:textSize="18sp"
        android:lines="1">
    </TextView>

    <TextView
        android:id="@+id/songsFragment_artistTextView"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:paddingBottom="7dp"
        android:paddingTop="0dp"
        android:lines="1" 
        android:textSize="14sp">

    </TextView>

</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

希望你能帮我 :)

Chr*_*ris 16

创建适配器时,您使用的是应用程序上下文还是活动?我刚遇到完全相同的问题,但注意到我是否像这样生成了我的数组适配器:

ArrayAdapter<String> listAdapter = new ArrayAdapter<String>(getApplicationContext(),
                    android.R.layout.simple_list_item_1, tables);
            setListAdapter(listAdapter);
Run Code Online (Sandbox Code Playgroud)

然后文字显得白了.但是,如果我使用了活动上下文(所以如果我在onCreate方法中执行上述操作,我可以使用"this")文本是黑色的.我想某种程度上我的应用程序覆盖了主题.也许这也是你的问题?