Preview of Resolution Independent Control library for RevMobile

Monte Goulding monte at sweattechnologies.com
Wed Jul 25 16:51:51 EDT 2012


I'm starting to put together a mobile framework to at least handle the mobile/tablet issue. What it does so far is start using any libraries in a specified folder and load either a tablet stack or mobile stack depending on if the max res is >= 1024. Until we can work out size I think that's the best cutoff. People on low res android tablets will get the mobile UI. There may be some android phablets that would get the tablet UI.

Anyway, you put most of the code into libraries or the script of the framework mainstack. Orientation needs to be handled on a single card to avoid state headaches.

Resizing to deal with density and layout to deal with orientation I think need to be two separate processes as Thomas indicated. The resizing can happen once when the card opens the first time and then be forgotten about. The layout needs to happen when the card opens and on each orientation change.

On android as we don't know screen density we should probably look at the highest percentage of devices and design for those and not resize. At the moment that is hdpi on mobile with a density of around 1.5 and mdpi (which can be treated the same as non retina iOS) on larger screens so this gives us 3 densities to deal with. So our resizing just needs to choose which of the three densities to use and scale. It's worth pointing out that this scaling only ever needs to be proportional. A front script that handled preopencard and tracked which cards had already been scaled combined with a custom property to either turn on or off scaling for that  control should work here.

Layout then is just a matter of showing and hiding controls and placing them relative to each other.

I'd be keen to merge everybody's ideas into a single open source framework if anyone is interested.

Cheers

--
M E R Goulding
Software development services

mergExt - There's an external for that!

On 25/07/2012, at 11:47 PM, John Allijn <jallijn at gmail.com> wrote:

> I watched the tutorial and the resize tool makes it very tempting to design one app for all devices, but I will be better of with building an ipad and a iphone app and change the layout upon change in the orientation.




More information about the use-livecode mailing list