I wanted to make a custom theme for my application.
I looked up the example code on Google, but that wasn't working (copy pasting their code actually gave errors in the XML file..)
So I tried to look up some information and found a way to set styles so I wrote small amount of code.
Written in res > values > style.xml
Using xml Syntax Highlighting
- <?xml version="1.0" encoding="utf-8"?>
- <resources>
- <style name="Theme">
- <item name="android:background">#ffffff</item>
- <item name="android:textSize">12sp</item>
- <item name="android:textColor">#7a7b7d</item>
- <item name="android:layout_marginLeft">5px</item>
- <item name="android:layout_marginRight">5px</item>
- </style>
- </resources>
Parsed in 0.001 seconds, using GeSHi 1.0.8.4
This code actually works perfectly for setting styles, but not for setting themes !!
Setting it as a theme will give an exception with Binary XML in it, so i reckon my XML is wrong (duh?). Did anyone else here found out a way to write a legimate Theme?
I can't find any example code online so I am even doubting that it's possible at this moment..
Yours sincerely,
Mike