-1
就像標題所示,當通過主題設置按鈕的背景時,按鈕停止響應。我相信這是幾個Android版本的問題,因爲我的Nexus 4運行KitKat沒有問題,但我的HTC Desire S運行2.3.5有它發生。順便說一下,我使用的是HoloEverywhere 2.0 atm。問題是什麼?通過主題設置按鈕背景使得按鈕不可點擊
我設置了主題的方式如下:
<style name="AppTheme" parent="@style/Holo.Theme.Light.DarkActionBar">
<item name="android:buttonStyle">@style/MyButtonStyle</item>
</style>
的按鈕樣式如下:
<style name="MyButtonStyle" parent="android:style/Widget.Holo.Light.Button">
<item name="android:background">@drawable/button_yellow</item>
</style>
這部作品的N4,但不會對HTC Desire S的工作然而,如果我直接設置相同的背景上的按鈕,它是在HTC工作也很好,像這樣:
<Button
android:id="@+id/example_button"
android:text="Example"
android:gravity="center"
android:onClick="onClickEvent"
android:background="@drawable/button_yellow"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
任何想法是什麼問題?
您是否在所有'styles.xml'文件中都放置了該樣式? –