0

我有来自我的用户的投诉:

“在 MultiAutoCompleteTextView 控件中输入文本时 -> 文本颜色和背景颜色相同,我无法阅读文本!”

实际上我使用的是设备提供的颜色。

这是我的xml:

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout
    android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@android:drawable/title_bar"
    android:id="@+id/title_layout" android:padding="5dp">
    <TextView
        android:id="@+id/tv_label"
        android:layout_width="match_parent" android:layout_height="wrap_content"
        android:paddingLeft="5dp" android:layout_toLeftOf="@+id/btn_send"
        android:textColor="@android:color/primary_text_light" android:textStyle="bold"
        android:text="@string/_Find" android:layout_alignBaseline="@+id/btn_send" />
    <Button
        android:id="@+id/btn_send" android:text="@string/Search"
        android:layout_height="wrap_content" android:layout_width="wrap_content"
        android:layout_alignParentRight="true"/>
</RelativeLayout>

<MultiAutoCompleteTextView
    android:id="@+id/search_city"
    android:layout_width="fill_parent" android:layout_height="wrap_content"
    android:layout_marginTop="3dp" android:layout_below="@+id/title_layout"
    android:completionThreshold="1"
    android:hint="@string/CityResort"
    android:imeOptions="actionNext"
    android:nextFocusRight="@+id/search_address"
    android:drawableRight="@android:drawable/ic_input_delete"
    android:singleLine="true"
    android:text=""
    >
    <requestFocus />
</MultiAutoCompleteTextView>

<MultiAutoCompleteTextView
    android:id="@+id/search_address"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_below="@+id/search_city"
    android:layout_alignParentLeft="true"
    android:completionThreshold="1"
    android:hint="@string/adres_or_poi_name"
    android:imeOptions="actionDone"
    android:paddingTop="10dp"
    android:drawableRight="@android:drawable/ic_input_delete"
    android:singleLine="true"
    android:text=""
    />
<FrameLayout
    android:layout_width="fill_parent" android:layout_height="fill_parent"
    android:layout_alignParentBottom="true" />

4

1 回答 1

0

问题可能是因为不同的主题颜色。例如。我的 motorola defy 有黑色主题,因此如果你在不同的原生小部件上设置白色或黑色文本,背景可能是一个意想不到的背景(比如黑色,你将文本颜色设置为黑色)并且文本无法阅读。尝试设置您的应用程序的主题,也许这会解决您的问题。

于 2012-04-06T07:47:53.587 回答