background image of stack

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
anil
Posts: 16
Joined: Sun Apr 14, 2013 4:12 am

background image of stack

Post by anil » Sat Apr 20, 2013 1:57 pm

How to repeat background image for stack so that it will fit in any size of stack on different android devices?
Also changing the size of background image when stack is resized?

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: background image of stack

Post by jmburnod » Sat Apr 20, 2013 4:34 pm

Hi anil,
I see two cases:
1.You can set the backgroundpattern of stack to the short id of an image and if the image is smaller than the rect of the stack LC fill the background with this image.
In this case you have to do nothing
2.You have an image like background that you can resize on resizestack.
Best regards
Jean-Marc
https://alternatic.ch

anil
Posts: 16
Joined: Sun Apr 14, 2013 4:12 am

Re: background image of stack

Post by anil » Sun Apr 21, 2013 3:17 am

Does community edition support Android 4.2.2(API) 17 ?

anil
Posts: 16
Joined: Sun Apr 14, 2013 4:12 am

Re: background image of stack

Post by anil » Sun Apr 21, 2013 8:40 am

hello there!

Can Anyone tell me which android version and device resolution i should target for now?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10045
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: background image of stack

Post by FourthWorld » Sun Apr 21, 2013 2:29 pm

anil wrote:Can Anyone tell me which android version and device resolution i should target for now?
Both Android and iOS support multiple device sizes and resolutions, and both APIs offer features only available on newer devices. So unless your app requires a specific feature of later OS versions, targeting the oldest practical version will give you the largest audience.

With Android, targeting v2.2 gives you more than 98% of current devices in use:
http://developer.android.com/about/dash ... index.html

Because both mobile platforms support multiple devices and resolutions, in most cases it's best to target all of them with UIs that scale and adapt for the device the app is currently being run on.

The mobilePixelDensity function can be used to determine the pixel density of the current device, and in conjunction with the mobileDeviceOrientation and screenRect functions can be used to write handlers which respond to the resizeStack message to make decisions about how your app adjusts its scale and/or layout for the current metrics.

For example, an app can benefit from offering different layouts for phones and tablets, and in some cases different layouts for horizontal and vertical orientation.

This can be a bit of work to do well, but taking the time to allow your app to adapt gracefully to make optimal use of available screen real estate will be appreciated by your users, and help your app stand out from the others that simply scale without taking full advantage of the device screen size.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply