I have a custom view that extends one of the framework classes. Most Views in Android have some default attributes defined for them (such as Button being clickable, which is set by android:clickable="true").
How do I provide application-wide defaults for my custom view?
I solved my own problem thusly:
res/values/attrs.xml:
res/values/styles.xml:
Then all you do is set the theme in the manifest to AppTheme. This also works with standard widgets using
android:[widget]Stylein place ofcustomViewStylein the definition of AppTheme.