Firstly, it's better to know something about XML
(info).
This is not so simple.
You can learn about writing XML for better buttons directly from Google.
How to define StateList.
How to define Shape.
Simple example for my Logitech-Z680 IR control
You can download main file example as
Main file.
You can download this examples as
Blue button
Orange button
Red button.
Guide
- Write your XML definition file
- Save it, filename must be exactly same as text value in WinLIRC for remote combo box and your defined name separated by dot.
In my case is main file
logitech_z680
and my nice button definition file
orangebutton => file is logitech_z680.orangebutton.xml
-
Add drawableBackground attribute for your button in the main file (in my case logitech_z680.xml)
Attribute will be drawableBackground="orangebutton.xml" only!
Application will automatically add name logitech_z680. before this value.
I know, maybe it's confusing, but i made it in purpose to prevent overwriting files with same names for different IR controls.
- Save it into your SDCard to RemoteControl folder (configurable property!).
In this case, path to load is/sdcard/RemoteControl/logitech_z680.orangebutton.xml
If XML is not correct or not found, you will see default button.
Final result
User defined | Nice user defined |
|
|