Java 一些android设备上不显示背景色

Java 一些android设备上不显示背景色,java,android,Java,Android,在我的应用程序布局中,我在backgound中设置了自定义颜色,但它们并没有出现在每个android设备上。在某些设备上,背景显示为白色,而不是我设置的颜色。我的应用程序支持android 4到4.4 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_w

在我的应用程序布局中,我在backgound中设置了自定义颜色,但它们并没有出现在每个android设备上。在某些设备上,背景显示为白色,而不是我设置的颜色。我的应用程序支持android 4到4.4

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal"
    tools:context=".Volume" >

    <TimePicker
        android:id="@+id/ChoosenTime"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true" />

    <View
        android:id="@+id/view1"
        android:layout_width="2dp"
        android:layout_height="match_parent"
        android:layout_alignParentTop="true"
        android:layout_toRightOf="@+id/ChoosenTime"
        android:background="#31B6E7" />

    <ScrollView
        android:id="@+id/horizontalScroll"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_alignParentTop="true"
        android:layout_toRightOf="@+id/view1"
        android:scrollbarAlwaysDrawVerticalTrack="true" >

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="#FFFFFF"
            android:orientation="vertical" >

            <ToggleButton
                android:id="@+id/sun"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/togglebutton"
                android:onClick="daysOfWeek"
                android:textOff="Sun"
                android:textOn="Sun" />

            <ToggleButton
                android:id="@+id/mon"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/togglebutton"
                android:onClick="daysOfWeek"
                android:textOff="Mon"
                android:textOn="Mon" />

            <ToggleButton
                android:id="@+id/tue"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/togglebutton"
                android:onClick="daysOfWeek"
                android:textOff="Tue"
                android:textOn="Tue" />

            <ToggleButton
                android:id="@+id/wed"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/togglebutton"
                android:onClick="daysOfWeek"
                android:textOff="Wed"
                android:textOn="Wed" />

            <ToggleButton
                android:id="@+id/thu"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/togglebutton"
                android:onClick="daysOfWeek"
                android:textOff="Thu"
                android:textOn="Thu" />

            <ToggleButton
                android:id="@+id/fri"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/togglebutton"
                android:onClick="daysOfWeek"
                android:textOff="Fri"
                android:textOn="Fri" />

            <ToggleButton
                android:id="@+id/sat"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/togglebutton"
                android:onClick="daysOfWeek"
                android:textOff="Sat"
                android:textOn="Sat" />
        </LinearLayout>
    </ScrollView>

    <View
        android:id="@+id/view2"
        android:layout_width="2dp"
        android:layout_height="match_parent"
        android:layout_alignParentTop="true"
        android:layout_toRightOf="@+id/horizontalScroll"
        android:background="#31B6E7" />

    <RadioGroup
        android:id="@+id/radioGroup2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_toRightOf="@+id/horizontalScroll"
        android:orientation="horizontal" >

        <RadioButton
            android:id="@+id/sound"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:onClick="onoff"
            android:text="@string/sound" />

        <RadioButton
            android:id="@+id/vibrate"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:onClick="onoff"
            android:text="@string/vibrate" />

        <RadioButton
            android:id="@+id/silent"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:onClick="onoff"
            android:text="@string/silent" />
    </RadioGroup>

    <EditText
        android:id="@+id/EventName"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_toLeftOf="@+id/horizontalScroll"
        android:ems="10"
        android:text="@string/event_name" />

    <RadioGroup
        android:id="@+id/radioGroup1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_below="@+id/ChoosenTime"
        android:gravity="center"
        android:orientation="horizontal" >

        <RadioButton
            android:id="@+id/on"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:onClick="onoff"
            android:text="@string/turn_on" />

        <RadioButton
            android:id="@+id/off"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:onClick="onoff"
            android:text="@string/turn_off" />
    </RadioGroup>

    <LinearLayout
        android:id="@+id/linearLayout1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_below="@+id/radioGroup2"
        android:layout_toRightOf="@+id/view2"
        android:orientation="horizontal" >

        <CheckBox
            android:id="@+id/wifi"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:onClick="checkBoxClicked"
            android:text="@string/wifi" />

        <CheckBox
            android:id="@+id/bluetooth"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:onClick="checkBoxClicked"
            android:text="@string/bluetooth" />

    </LinearLayout>

    <CheckBox
        android:id="@+id/airplane"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/linearLayout1"
        android:layout_toRightOf="@+id/horizontalScroll"
        android:onClick="checkBoxClicked"
        android:text="@string/airplane_mode" />

</RelativeLayout>

你的问题是什么?哪些视图没有合适的背景?那么你的意思是在android的某些版本上背景颜色没有出现?哪些版本的android会出现这种情况,哪些视图?为什么不显示colors@vokilam线性布局没有其背景色