1

これは私のレイアウトです...私のプロジェクトでは、abs(ActionBar Sherlock)をTheme.Sherlock.Light.DarkActionBarで使用しています。

4.0.4 の Galaxy S3 (GT-I9300) などの一部のデバイスでは、白色を設定すると別の色が返されます。濃い灰色を返します。(#797979) @android:color/white、#ffffff、#ffffffff を設定し、属性カラー #ffffff を作成しようとしましたが、何もしませんでした。

ListViewアダプタでこのレイアウトを使用しています:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/lnlItem"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" >

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_toLeftOf="@+id/chatUserImage"
        android:background="#ffffff"
        android:minHeight="70dp"
        android:padding="5dp" >

        <TextView
            android:id="@+id/chatMessage"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:textColor="@android:color/black" />

        <TextView
            android:id="@+id/chatMessageDate"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_alignParentRight="true"
            android:textColor="@android:color/darker_gray"
            android:textSize="12sp" />
    </RelativeLayout>

    <ImageView
        android:id="@+id/chatUserImage"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:layout_alignParentRight="true"
        android:background="#00000000"
        android:src="@android:drawable/ic_menu_gallery"
        tools:ignore="ContentDescription" />

</RelativeLayout>

そして、これは私のアクティビティのレイアウトです:

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:id="@+id/chatFrame"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >

        <TextView
            android:id="@+id/chatHeader"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@android:color/black"
            android:gravity="center"
            android:padding="5dp"
            android:textColor="@android:color/white" >
        </TextView>

        <ListView
            android:id="@+id/chatListMessages"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_above="@+id/chatSendMessage"
            android:layout_below="@+id/chatHeader"
            android:layout_marginBottom="5dp"
            android:layout_marginTop="5dp"
            android:cacheColorHint="@android:color/transparent" >
        </ListView>

        <LinearLayout
            android:id="@+id/chatSendMessage"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:background="@drawable/chat_send_message"
            android:gravity="center_vertical"
            android:orientation="horizontal"
            android:padding="5dp" >

            <EditText
                android:id="@+id/chatEditSendMessage"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:gravity="top|left"
                android:inputType="textMultiLine"
                android:maxLines="3"
                android:minLines="1"
                android:scrollHorizontally="false" />

            <ImageButton
                android:id="@+id/btnSendMessage"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@android:color/transparent"
                android:src="@android:drawable/btn_dialog"
                tools:ignore="ContentDescription" />
        </LinearLayout>

    </RelativeLayout>
4

0 に答える 0