Ok -- just some ideas
I'm realizing that although I understand in general the concept of xml files, when it would come to creating an entry -- I'm really clueless. Wow a good tutorial would help (but how do I hate eclipse)!
Anyway just wondering what others have found along with questions:
Two xml files and one image directory jump out on review of the data:
/res/drawable/stat_sys_battery.xml:
<item android:drawable="@drawable/stat_sys_battery_0" android:maxLevel="4" />
<item android:drawable="@drawable/stat_sys_battery_10" android:maxLevel="14" />
<item android:drawable="@drawable/stat_sys_battery_20" android:maxLevel="29" />
<item android:drawable="@drawable/stat_sys_battery_40" android:maxLevel="49" />
<item android:drawable="@drawable/stat_sys_battery_60" android:maxLevel="69" />
<item android:drawable="@drawable/stat_sys_battery_80" android:maxLevel="89" />
<item android:drawable="@drawable/stat_sys_battery_100" android:maxLevel="100" />
/res/values/public.xml:
<public type="drawable" name="stat_sys_battery_0" id="0x01080293" />
<public type="drawable" name="stat_sys_battery_10" id="0x01080294" />
<public type="drawable" name="stat_sys_battery_100" id="0x01080295" />
<public type="drawable" name="stat_sys_battery_20" id="0x01080296" />
<public type="drawable" name="stat_sys_battery_40" id="0x01080297" />
<public type="drawable" name="stat_sys_battery_60" id="0x01080298" />
<public type="drawable" name="stat_sys_battery_80" id="0x01080299" />
And of course the /res/drawable-hdpi-v4 folder where the images are located.
Although /res/layout/battery_status.xml refers to the battery layout style I dont think this file is relevant although I don't quite fully understand this file unless its the text that is overlayed over the battery -- Not sure about this one.
Ok the big question -- when declaring new images -- am I ok with just arbitrarily picking IDs? A suggestion was to make them consecutive to the last drawable ID values, however if I look at the last 3 ID drawable values they seem not to be consecutive (these are found in res/values/public.xml):
<public type="drawable" name="usb_android_connected" id="0x01080358" />
<public type="drawable" name="bottombar_565" id="0x010800af" />
<public type="drawable" name="btn_lock_normal" id="0x010800fd" />
Thanks for any input!!!
Don't forget the stat_sys_battery_charge.xml as well, if you want to update those to 10% increments as well.
For the stat_sys_battery.xml:
Basically it will display the PNG file until the battery hits the "max Level" so you need to add a few more entries. You can use Notepad++ as your XML editor. It's simple, free, and easy to use.
So the first ones are:
<item android:drawable="@drawable/stat_sys_battery_0" android:maxLevel="4" />
<item android:drawable="@drawable/stat_sys_battery_10" android:maxLevel="14" />
<item android:drawable="@drawable/stat_sys_battery_20" android:maxLevel="29" />
Then you need to add in a line for the 30th increment:
<item android:drawable="@drawable/stat_sys_battery_30" android:maxLevel="39" />
And so on for the rest of the new increments.
As for the Public.xml (at least from what I've tried to google/figure out from playing with it):
They are not necessarily sequential going down the list. However, you can look to the bottom of the Drawables and find the last number, then hit ctrl-f, copy in that last number + 1 and see if it shows up. If it finds it, it will show you that number and you can trace it to the largest one. Do that repeatedly until you can't find that ID anymore.
Important note: The numbers are in Hexadecimal. I'm not sure what your level of knowledge is in this area, but if you're not familiar, the numbers go:
1,2,3,4,5,6,7,8,9,a,b,c,d,e,f
10,11,12,13,14,15,16,17,18,19,1a,1b,1c,1d,1e,1f
etc.
Oh, and I don't think you need to mess with the layout .xml file. Not completely sure about it, but it doesn't seem to reference any specific PNG files.