Can images for different densities be imported as controls?

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
FabricioRocha
Posts: 25
Joined: Sun Jan 19, 2014 8:53 pm

Can images for different densities be imported as controls?

Post by FabricioRocha » Mon Apr 07, 2014 6:03 am

Hi fellow Livecoders,

If I've got it right, an image which is "imported as control" must be placed in a card, will become part of the stack itself, then everytime you need to use it (as icon, etc), just choose them. In the other side, a "referenced image" is created as a "New referenced control" (menu File) and it becomes a reference to an image file bundled with a standalone app. Is it right?

So I came across the "How do I support different screen densities?" tutorial which tells us to use referenced images with specific filenames for low density, high density, etc, so Livecode will automatically load the right image file in runtime according to the device's density.

Question is: is it possible to "import as control" different images (for different densities) and use them in the same way the tutorial teaches for referenced images? I mean, is there a similar naming/density convention and usage method for images directly imported to a stack?

Thank you!

Fabricio Rocha
Brasilia, Brasil

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Can images for different densities be imported as contro

Post by Klaus » Mon Apr 07, 2014 8:24 am

Bom dias Fabricio,
FabricioRocha wrote:Question is: is it possible to "import as control" different images (for different densities) and use them in the same way the tutorial teaches for referenced images?
no, this feature is currently only available with referenced images!


Best

Klaus

FabricioRocha
Posts: 25
Joined: Sun Jan 19, 2014 8:53 pm

Re: Can images for different densities be imported as contro

Post by FabricioRocha » Mon Apr 07, 2014 2:34 pm

Hallo Klaus, bom dia, vielen dank! :)

What a pity, this is a really nice feature. Isn't there any workaround?

Maybe someone at RunRev could tell us if this is planned for the near future? I am also dead curious about how the implementation of native mobile themes is going...

Thanks!

Fabricio Rocha
Brasilia, Brasil

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Can images for different densities be imported as contro

Post by Klaus » Mon Apr 07, 2014 3:22 pm

I think there is already an enhancement request for this feature to also support internal images!

A workaround would be to check the screenrect and script a lot accordingly :D

Post Reply