I’m trying to assign a theme to a button with a custom background. It looks simply like this:
<style name="button">
<item name="android:background">@drawable/buttonbackground</item>
</style>
<Button android:theme="@style/button"/>
The button keeps it’s original background, but for TextView, for example, it works.
<TextView android:theme="@style/button"/>
Where’s the problem?
2
Answers
Well, it was a very simple solution, just use
style
instead ofandroid:theme
. I just didn't know it existed.change your app theme:
use @style/Theme in the AndroidManifest.xml: