The Screen Density Conundrum

Monte Goulding monte at sweattechnologies.com
Tue Jul 31 03:26:47 EDT 2012


Hi

As promised I have collected my latest thoughts on how to handle the screen density conundrum.

I think for the way the majority of people work in LiveCode then a single stack needs to be able to scale to as many sizes and resolutions as possible. There are going to be cases where that's not logical like a completely different tablet ui compared to mobile one etc but for the most part the ui just needs to adapt to the working screenRect.

I was deliberately ignoring screen density in the above. When we bring screen density into the equation we want some interface elements to scale relative to density. Other elements might need to scale relative to the stack dimensions or other things on the card.

Let's for a minute assume we know android screen density. I've asked on the dev list if RunRev will comment on providing that as it would appear to be a minor add for them.

So we know the density we are running at and now we have the choice of the following:
 - scale things to the screen density in preOpenCard
 	- pro - little app bloat from dealing with screen density
	- con - places high load on the device the first time a card is opened
 - create multiple substacks and present the correct one
	- pro - only needs a very simple framework if any, little load on device, higher performance
	- con - maintenance duplication, loading lots into memory
 - same as above but using stackfiles
	- pro - lower memory use
	- con - not as convenient in ide
 - creating multiple stackfiles at build time
	- pro - little load on device, little load on developer, cloning stacks would duplicate scripts too.
	- con - app bloat

It looks like there's no easy answer. If app bloat is of little concern then perhaps the last option would be best but for android we would be limited to density categories rather than the actual density. If the load on device can be mitigated using things like scaling images as Good like Chipp does then perhaps that's the best option.

Cheers

--
M E R Goulding 
Software development services
Bespoke application development for vertical markets

mergExt - There's an external for that!




More information about the use-livecode mailing list