2013-08-15 5 views
1

선형 레이아웃의 배경을 설정했습니다. 하지만 내 버튼은이 색으로 덮여 있습니다. 정상적인 버튼 색상이 필요합니다.일반 버튼 색상을 설정하는 방법은 무엇입니까?

<LinearLayout 
    android:id="@+id/expandable" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:background="#000000" 
    android:orientation="horizontal" > 

    <Button 
     android:layout_width="wrap_content" 
     android:layout_height="fill_parent" 
     android:text="Delete" 
     android:drawableLeft="@drawable/content_discard" /> 

</LinearLayout> 

내 레이아웃 image

제발 내 도움 날. 당신의 버튼 태그 쓰기에

+0

귀하의 버튼에서 이것을 시도하십시오 : android : background = "@ null"버튼 기본 배경이 사라집니다. –

+0

@SayedJalilHassan 그 해결책이 아닙니다. –

답변

1

당신은 사용할 수 있습니다

android:background="@android:drawable/btn_default" 

예 :

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/expandable" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:background="#000000" 
    android:orientation="horizontal" > 

    <Button 
     android:layout_width="wrap_content" 
     android:layout_height="fill_parent" 
     android:background="@android:drawable/btn_default" 
     android:text="Delete" /> 

</LinearLayout> 

당신은 다음과 같은 얻을 것이다 출력 :

enter image description here

1

이 :

<Button 
    android:background = "#D3D3D3"/> 
관련 문제