I am using this Code in style.xml file to apply to all Button in the App as i dont want to apply the whole Holo Theme :
<style name="MyTheme" parent="@android:style/Theme.Black" >
<item name="android:buttonStyle">@style/Custombutton</item>
</style>
<style name="Custombutton" parent="Widget.Button" >
<item name="android:background">@android:drawable/btn_default_holo_dark</item>
<item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
<item name="android:textColor">#FFFFFF</item>
</style>
</resources>
This Code Generate R.java errors, i am sure the error come from this code because when i remove it i have no error,
What is wrong ?
Thanks
Problem Solved, Replaced this :
<item name="android:background">@android:drawable/btn_default_holo_dark</item>
By This :
<item name="android:background">@drawable/btn_default_holo_dark</item>
I have the btn_default_holo_dark.png in my Drawable Folder
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.