In order to define styles that can be used as a theme for your app widget or layout, define the styles as a resource in a file. The resource file can have any name but ends with .xml since it is XML based.
e.g. the resource file can be named as styles.xml in the res/values directory of your project as:
res/values/styles.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="CodeFont" parent="@android:style/TextAppearance.Medium"> <item name="android:layout_width">fill_parent</item> <item name="android:layout_height">wrap_content</item> <item name="android:textColor">#00FF00</item> <item name="android:typeface">monospace</item> </style> </resources>