Resources in SDK 1.2.x

Hi,

I've noticed that projects created after 1.2.x are using a new structure for resources (strings.xml & drawables.xml).

Where do you now put the entries like the Settings XML fragments, as I was previously adding these to the resources.xml (which is now gone).

Also the documentation on the website still refers to resources.xml.

Thanks
Chris
  • Hi,

    I've noticed that projects created after 1.2.x are using a new structure for resources (strings.xml & drawables.xml).

    Where do you now put the entries like the Settings XML fragments, as I was previously adding these to the resources.xml (which is now gone).

    Also the documentation on the website still refers to resources.xml.

    Thanks
    Chris


    If you create a watchface project from "Watchface -> Simple with settings" template in Eclipse, you will see the structure and also where settings go.
    As far as I know, the structure is not strict. You can still have have different names for your files and different folder structures, as long as your xml schema is what is expected by the compiler.

    But I'd encourage you to follow the best practices as set out in the boiler plate code and structures.
  • If you create a watchface project from "Watchface -> Simple with settings" template in Eclipse, you will see the structure and also where settings go.
    As far as I know, the structure is not strict. You can still have have different names for your files and different folder structures, as long as your xml schema is what is expected by the compiler.

    But I'd encourage you to follow the best practices as set out in the boiler plate code and structures.


    Thanks. I created a WatchFace, and received the same structure (as I had for a DataField), so no obvious location for settings with a drawables, layout and strings XML files (i.e. no route <resources> Xpath node in any of the pre-created XML files).

    I did however find the same, that if I created my own resources.xml (like the one from v1.x) it happily complied it.

    Is this the recommend approach, or am I walking into a later 'compatibility' problem?

    Thanks
    Chris
  • Thanks. I created a WatchFace, and received the same structure (as I had for a DataField), so no obvious location for settings with a drawables, layout and strings XML files (i.e. no route <resources> Xpath node in any of the pre-created XML files).

    I did however find the same, that if I created my own resources.xml (like the one from v1.x) it happily complied it.

    Is this the recommend approach, or am I walking into a later 'compatibility' problem?

    Thanks
    Chris


    I am sure Garmin is committed to backward compatibility, but I'd suggest you try and follow the latest structures.
    I for example have ported my existing apps to follow the best practices and structures.

    The structure recommended by the Watchface "Simple with Settings" template is as follows:

    resources
    -- drawables
    -- drawables.xml
    -- layouts
    -- layout.xml
    -- settings
    -- properties.xml
    -- settings.xml
    -- strings
    -- strings.xml