Override settings for specific device?

For Instinct 2S/2/2X some settings have no sense as foreground / background colours selection.

Is it any way to put something in the resources-instinct2s/settings/settings.xml to make invisible or disabled settings like

<setting propertyKey="@Properties.ForegroundColor" title="@Strings.ForegroundColorTitle">
<settingConfig type="list">
...
...
?
  • you should be able to have your "normal settings in resources, and those for the Instinct2 in resources-semioctagon

  • In the case I have a specific device settings I can change a number of colours in the list like

    <setting propertyKey="@Properties.ForegroundColor" title="@Strings.ForegroundColorTitle">
    <settingConfig type="list">
    <listEntry value="0x000000">@Strings.ColorBlack</listEntry>
    <listEntry value="0xFFFFFF">@Strings.ColorWhite</listEntry>
    </settingConfig>
    </setting>
    But it can't remove completely color settings. It is possible to reduce a list to even one color, but removing whole foreground setting causes to appear whole default list with an all colours listed.
    I want to completely remove color selection for specific devices.
  • See https://developer.garmin.com/connect-iq/core-topics/resources/#resources

    you use different settings based on the resource qualifier. As far as a sample see the "Strings" sample in the SDK. It doesn't address settings, but the concept is similar.

  • Thank you for trying to help me. And sorry to be repetitive.

    I did strings overriding for multi language apps few years ago. It was ok.
    I am using layout overriding regularly.

    But can't figure out how to override 'original' settings in the way to completely remove drop down selections like selection colours from the list.

  • You can set custom resource paths in monkey.jungle to have full control over which directories are used for resources, for any given device. Then you can have separate folders for common resources (shared by all devices), default resources (shared by all devices except instinct 2), and instinct 2 resources.

    e.g.

    # Resources for all devices
    commonResourcePath = resources

    # Default resources (for most devices)
    defaultResourcePath = resources-default

    # Default resource paths (for devices which don't explicitly override their resourcePath)
    base.resourcePath = ${commonResourcePath};${defaultResourcePath}

    # Resource overrides
    instinct2FamilyResourcePath = ${commonResourcePath};resources-instinct2
    instinct2.resourcePath = $(instinct2FamilyResourcePath)
    instinct2s.resourcePath = $(instinct2FamilyResourcePath)
    instinct2x.resourcePath = $(instinct2FamilyResourcePath)

    One issue with this solution is it does break the standard resource qualifier scheme, but only for instinct2/instinct2s/instinct2x (and any other device where you explicitly override the resourcePath). e.g. instinct2 won't include "resources-semioctagon" in this case.

    You could avoid that problem by referencing the existing resource path in your overrides, but then you would have to avoid adding defaultResourcePath to base.resourcePath, which means you'd have to explicitly specify resourcePath for every single device/device family that you support.

    e.g.

    # Resources for all devices
    commonResourcePath = resources

    # Default resources (for most devices)
    defaultResourcePath = resources-default

    # base resource path
    base.resourcePath = ${base.resourcePath};${commonResourcePath}

    # default resource paths
    fr955.resourcePath = ${fr955.resourcePath};${defaultResourcePath}
    fr965.resourcePath = ${fr965.resourcePath};${defaultResourcePath}
    # ... (repeat for all other supported devices, except instinct 2*)
    # this part could be simpler if you target device families instead of individual devices

    # Resource overrides
    instinct2FamilyResourcePath = resources-instinct2
    instinct2.resourcePath = $(instinct2.resourcePath);$(instinct2FamilyResourcePath)
    instinct2s.resourcePath = $(instinct2s.resourcePath);$(instinct2FamilyResourcePath)
    instinct2x.resourcePath = $(instinct2x.resourcePath);$(instinct2FamilyResourcePath)

  • Yes, this could me much simpler

    base.resourcePath=resources;resources-basic
    semioctagon.resourcePath=resources;resources-so

    resources. basic are the settings for everything but the instincts, while resources.so are for all the instincts (the semioctagon devices).  No need to even use a bunch of device families. and this also takes care of the instinct crossover.

  • Yeah that's fair. That's equivalent to my first example, but much simpler.

    I just wanted to show something a bit more generic that can be extended to different use cases. If I were applying this scheme to multiple devices/families, I wouldn't want to hardcode resources-basic (or resources-default in my example), I'd want it in a variable, as in my example.

  • Thank you so much! Going to use for the next project.

  • Thank you! You are as usual very helpful!