Reputation: 353
I'm new to Mono for Android (using MonoDevelop) and Android development in general. I want to create a application wide theme. This theme only has to set the background color of all EditText fields gray (just to test the functionality).
In the Resources/values folder I created 2 files:
Styles.xml
<resources>
<style name="tstEditText" parent="android:style/Widget.EditText">
<item name="android:background">#cccccc</item>
</style>
</resources>
Themes.xml
<resources>
<style name="MyApplicationTheme" parent="android:Theme">
<item name="android:editTextStyle">@style/txtEditText</item>
</style>
</resources>
After that I modified the ApplicationManifest.xml
<application android:label="MyApplication" android:theme="MyApplicationTheme"></application>
When I try to build the code I get the following error message: "Error: String types not allowed (at 'theme' with value 'MyApplicationTheme')." The error is thrown on the first activity node in the AndroidManifest.xml that is generated on build by MonoDevelop.
Apparently I'm missing something, but I have no clue... Thanks in advance for your help!
Upvotes: 1
Views: 1735
Reputation: 10139
In the manifest XML you need to specify the theme like this:
android:theme="@style/MyApplicationTheme"
Upvotes: 3