当我将backgroundcolor设置为片段中的relativelayout时,为什么按钮会改变颜色?

时间:2015-11-24 00:13:15

标签: android android-fragments background android-relativelayout

这是我的片段

<RelativeLayout
    android:layout_width="fill_parent"
    android:layout_height="135dp"
    android:background="@color/colorTerracota"
    android:padding="15dp"
    android:layout_centerVertical="true"
    android:layout_centerHorizontal="true"
    android:layout_gravity="center">

    <Button
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/statetexas"
        android:id="@+id/btnTexas"
        android:width="100dp"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true" />

    <Button
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/stateyucatan"
        android:id="@+id/btnYucatan"
        android:width="100dp"
        android:layout_alignParentTop="true"
        android:layout_alignLeft="@+id/btnTexas"
        android:layout_alignStart="@+id/btnTexas" />


</RelativeLayout>

enter image description here

我希望这样看:

enter image description here

0 个答案:

没有答案