Array Resources - JSON

Former Member
Former Member
Hey all -

I am trying to make my app more compatibly with other devices. Part of my app uses a couple of drawable class extensions that draw things based on coordinates related to screen size/shape.

I know I can pull the system screen shape/width/height and then use a bunch of if/else statements to do this, but I'd rather have the coordinates defined in resources than to cobble up a bunch of sloppy code.

When looking at: https://developer.garmin.com/connect-iq/programmers-guide/resource-compiler/ I thought using the "JsonData" type to store an array for this - but that doesn't seem to be valid. At least I can't seem to get the resource compiler to recognize JsonData as a valid resource type.

So I suppose I have two questions:

1) What is the minimum SDK version which supports Json resouces
2) Is there a more elegant way to do what I am trying to do? I know a lot of people support devices with different screen sizes/shapes so I can't be the first one trying to do something like this.

Thanks!