Preview of Resolution Independent Control library for RevMobile

Monte Goulding monte at sweattechnologies.com
Wed Jul 25 19:28:07 EDT 2012


On 26/07/2012, at 8:40 AM, Chipp Walters wrote:

> How does LC determine density?

Good question. If the engine does it then it doesn't provide that info to us.

We know density on iOS so we use that to switch between mdpi and xhdpi. 

On android we can only make an educated guess based on this data:
			ldpi		mdpi	hdpi	xhdpi
small		1.7%			1.3%	
normal		0.4%	12.9%	57.5%	18.0%
large		0.2%	2.9%		
xlarge				5.1%

If the screenrect has either a width or height >= 1024 then we assume it's a large or xlarge screen and use the tablet ui. We can also see from the stats that it's going to be mdpi. If it's normal or small it's most likely to be hdpi so we would run with that and given that is a reasonable middle ground our apps should be usable for mdpi and xhdpi users. We could have a guess at ldpi if the screen size <= 400 or something but the percentages are so small.

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