2019-09-10, 02:18
Hi, I have a static list populated by a range of <content><item> elements with different conditional visibilities to make up a list where you can scroll vertical and then horizontal on each item (Thanks to Hitcher for coming up with the original code).
What I would like to do is toggle one SkinSetting off and another on with a single right press, like this:
<property name="ActionRight">Skin.ToggleSetting(Setting1)</property>
<property name="ActionRight">Skin.ToggleSetting(Setting2)</property>
But from what I can tell, you can't have two elements listed like this, it only carries out the first.
I can do this with two <onclick> elements like so:
<onclick>Skin.ToggleSetting(Setting1)</onclick>
<onclick>Skin.ToggleSetting(Setting2)</onclick>
That works fine, but I would prefer to be able to do this with a right press instead if possible, I'm just not sure if there is a particular syntax I need to follow or a way of calling something other than a built-in action on a button press to let me fulfil this objective using a different method?
Alternatively is there a better way to switch between the following four scenarios than by relying on toggling different Skin.HasSettings elements? A + B Enabled, A Enabled + B Disabled, A Disabled + B Enabled, A + B Disabled.
Currently I'm doing it using three Skin.HasSettings that I'm trying to toggle between (A + B Enabled, A Enabled, B Enabled), which is why I need two toggles to move between them (switch the current enabled setting off AND switch the next desired setting on).
Thanks in advance for any help
What I would like to do is toggle one SkinSetting off and another on with a single right press, like this:
<property name="ActionRight">Skin.ToggleSetting(Setting1)</property>
<property name="ActionRight">Skin.ToggleSetting(Setting2)</property>
But from what I can tell, you can't have two elements listed like this, it only carries out the first.
I can do this with two <onclick> elements like so:
<onclick>Skin.ToggleSetting(Setting1)</onclick>
<onclick>Skin.ToggleSetting(Setting2)</onclick>
That works fine, but I would prefer to be able to do this with a right press instead if possible, I'm just not sure if there is a particular syntax I need to follow or a way of calling something other than a built-in action on a button press to let me fulfil this objective using a different method?
Alternatively is there a better way to switch between the following four scenarios than by relying on toggling different Skin.HasSettings elements? A + B Enabled, A Enabled + B Disabled, A Disabled + B Enabled, A + B Disabled.
Currently I'm doing it using three Skin.HasSettings that I'm trying to toggle between (A + B Enabled, A Enabled, B Enabled), which is why I need two toggles to move between them (switch the current enabled setting off AND switch the next desired setting on).
Thanks in advance for any help