我使用android:background更改了我的活動的背景顏色。背景顏色改變,但按鈕背景的顏色也改變。我想保留具有默認背景和屬性的按鈕。由於背景顏色而改變了按鈕顏色
按鈕外觀如圖所示。活動的
XML文件低於
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="#116493">
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?android:attr/buttonStyleSmall"
android:text="Button" />
</LinearLayout>
只需設置你的按鈕的背景。問題解決了 – Amsheer
@Nimit,很高興聽到。 –