How to use <if> <else> <endif> (OR SIMILAR) in xml files ? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Skins Support (https://forum.kodi.tv/forumdisplay.php?fid=67) +--- Thread: How to use <if> <else> <endif> (OR SIMILAR) in xml files ? (/showthread.php?tid=54083) |
How to use <if> <else> <endif> (OR SIMILAR) in xml files ? - LoloMc² - 2009-07-06 Hi, In order to avoid code duplication in my PM3-HD skin modification, I would like to use the same defined button with two different settings that will result in a 32x28px button OR in a 64x56px button. As my English is far from perfect, to avoid confusion, here is a complete example I would like to do. In the "includes.xml", there is this code : Code: <control type="button" id="600"> Code: <control type="button" id="600"> Any help would be really appreciated, thanks ! - jmarshall - 2009-07-06 Use 2 separate buttons is one way to do it. If this skin setting can't be changed from the home page, you could do it via conditional includes. The other way to do it is to use a conditional zoom animation. - LoloMc² - 2009-07-06 Thank you Jonathan for your answer. May I ask you to be a little more explicit for "conditional includes" (as the only help I found was this thread and he posted because something seems to be wrong. I was not able to find anything in the wiki too Regards, - jmarshall - 2009-07-06 I believe it's: Code: <include condition="skin.setting(foo)">name_of_include</include> Cheers, Jonathan - LoloMc² - 2009-07-10 jmarshall Wrote:I believe it's:Thank you Jonathan, but it is not enough explicit for me unfortunately. And even after seaching for hours, I can not find some exemples. Moreover I do not have a working DSL connection since monday, so I can not post from home I am sorry but I am completely lost ! Is the way similar to this ? Code: <control type="button" id="600"> - eumel - 2009-07-10 First you must define the includes then you can call the includes on different conditions Code: [color=Green]<include name="double"> - LoloMc² - 2009-07-11 Thank you eumel for taking the time to give me a complete exemple... I love this forum ! Can't wait to try it I am not at home Does it work properly? - m.harati - 2011-10-18 Hi eumel, are you sure? I've wroten it, but some error occured: Code: <LinearLayout How should I define the condition? Can I import a parameter of my java project? How should I adress it in XML? but I think it has problem independently of condition, perhaps with syntax. Thx a lot, Grüße - spiff - 2011-10-18 android skinning got what exactly to do with xbmc skinning? |