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