images don't show, buttons look messed up !
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 9
- Joined: Fri Feb 10, 2012 3:41 am
images don't show, buttons look messed up !
can't figure this out ..
I'm testing out the trial version.
Everything looks good in LiveCode when i'm building the application as a stack .. The buttons, the images, etc. all look and work fine.
Then I create the application for Android , successfully.
I install the application on my Motorola X2 running Android 3.3.3 successfully.
I open the application on my phone and the images are replaced by empty boxes.
The buttons look entirely different than they do on the LiveCode cards when i'm building the stack.
everything looks messed up.
I am using a Mac OSX 6.4
I have android SDK 2.2 installed.
I have the virtual device installed.
I want to buy LiveCode but need to make sure I can deploy a real application to the Android first. So far it just deploys a bunch of rubbish that looks messed up.... Something must not be right??
Any suggestions?
thanks
I'm testing out the trial version.
Everything looks good in LiveCode when i'm building the application as a stack .. The buttons, the images, etc. all look and work fine.
Then I create the application for Android , successfully.
I install the application on my Motorola X2 running Android 3.3.3 successfully.
I open the application on my phone and the images are replaced by empty boxes.
The buttons look entirely different than they do on the LiveCode cards when i'm building the stack.
everything looks messed up.
I am using a Mac OSX 6.4
I have android SDK 2.2 installed.
I have the virtual device installed.
I want to buy LiveCode but need to make sure I can deploy a real application to the Android first. So far it just deploys a bunch of rubbish that looks messed up.... Something must not be right??
Any suggestions?
thanks
Re: images don't show, buttons look messed up !
Hi,
You don't give any information about how you imported those images. Probably, you are importing images as references controls or you set the path to an image using the properties inspector. This means that the picture files are on disk and not in the stack. When you move the stack to a difference device, the stack can't find the files anymore. The solution is to either include the files in the standalone ("copy files" in the standalone settings) or to import image files as controls.
Kind regards,
Mark
You don't give any information about how you imported those images. Probably, you are importing images as references controls or you set the path to an image using the properties inspector. This means that the picture files are on disk and not in the stack. When you move the stack to a difference device, the stack can't find the files anymore. The solution is to either include the files in the standalone ("copy files" in the standalone settings) or to import image files as controls.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Posts: 9
- Joined: Fri Feb 10, 2012 3:41 am
Re: images don't show, buttons look messed up !
i actually figured out what I was doing wrong ..
but I have another problem ..
It seems impossible to figure out the height - width of the card windows so the size is deployed properly in proportion to the android.
For example if my window size is 370width / 533height , it shows well when i'm working on the stack ,but when I create the final app and deploy it to my android device , it appears in an entirely different resolution.
i've been playing around with different width / height sizes on the window to figure out how to get the proper fit on an andriod device (phone) , is there any generic size or some day to auto-detect or something?
but I have another problem ..
It seems impossible to figure out the height - width of the card windows so the size is deployed properly in proportion to the android.
For example if my window size is 370width / 533height , it shows well when i'm working on the stack ,but when I create the final app and deploy it to my android device , it appears in an entirely different resolution.
i've been playing around with different width / height sizes on the window to figure out how to get the proper fit on an andriod device (phone) , is there any generic size or some day to auto-detect or something?
Re: images don't show, buttons look messed up !
Hi,
What were you doing wrong? Once you have asked a question and figure out what the answer is, please post the answer. Otherwise, using this forum is going to be extremely frustrating for the people who come after you.
Devices have different resolutions. If the resolution of your device is 800x480 then you need to create a stack of that window size. If you make a window on your computer visually the same size as the screen of your device, you may expect an unpleasant surprise.
For example, the Retina screen of the iPhone has a resolution of 960x640 and older iPhones have a resolution of 480x320, but if you compare the size of an iphone with an area of a standard computer screen, you'll probably come to the conclusion that all iPhone screens have a size of approximately 360x210, which is wrong.
Foreach device, you need to look up the technical specs and make a note of the screen size. For each device, you need to adjust the size of the window of your stack accordingly these specifications.
Kind regards,
Mark
What were you doing wrong? Once you have asked a question and figure out what the answer is, please post the answer. Otherwise, using this forum is going to be extremely frustrating for the people who come after you.
Devices have different resolutions. If the resolution of your device is 800x480 then you need to create a stack of that window size. If you make a window on your computer visually the same size as the screen of your device, you may expect an unpleasant surprise.
For example, the Retina screen of the iPhone has a resolution of 960x640 and older iPhones have a resolution of 480x320, but if you compare the size of an iphone with an area of a standard computer screen, you'll probably come to the conclusion that all iPhone screens have a size of approximately 360x210, which is wrong.
Foreach device, you need to look up the technical specs and make a note of the screen size. For each device, you need to adjust the size of the window of your stack accordingly these specifications.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Posts: 9
- Joined: Fri Feb 10, 2012 3:41 am
Re: images don't show, buttons look messed up !
thanks .. the answer to the previous question was the first thing you mentioned. I instead tried importing the images into the actual stack gallery and it worked , rather than importing them from a file where as that file path was not found when I created the standalone path and deployed on my android.
The resolution issue still seems kind of weird .. For example I have 2 android phones. One has a bigger screen than the other, as i'm sure many android phones don't have exactly the same screen size. It would be impossible nonetheless a waste of time to make the same application with 10 to 20 different screen sizes wouldn't it? .. I notice that when compiling a project through Eclipse , the screen resolution is always right when deployed on any phone. ... There has to be some kind of universal setting on resolution when deploying to an android phone so the app has the proper layout on the screen , right? .. maybe?
The resolution issue still seems kind of weird .. For example I have 2 android phones. One has a bigger screen than the other, as i'm sure many android phones don't have exactly the same screen size. It would be impossible nonetheless a waste of time to make the same application with 10 to 20 different screen sizes wouldn't it? .. I notice that when compiling a project through Eclipse , the screen resolution is always right when deployed on any phone. ... There has to be some kind of universal setting on resolution when deploying to an android phone so the app has the proper layout on the screen , right? .. maybe?
Re: images don't show, buttons look messed up !
Hi,
LiveCode is not the same as Eclips
You could try to set the rect of the stack window to the screenRect and write an additional script to resize all objects. I'm not sure that it works.
Kind regards,
Mark
LiveCode is not the same as Eclips

Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Posts: 9
- Joined: Fri Feb 10, 2012 3:41 am
Re: images don't show, buttons look messed up !
if you can't deploy applications that have a universal fit on multiple android screens then what's the point of deploying android apps? There are loads of different android phones out there, not all have the same screen size. It wouldn't make sense to release 10 different android apps with different screen resolutions on google marketplace .. Is LiveCode practical for Android development or should I just stick to Eclipse ?
Re: images don't show, buttons look messed up !
Hi,
If you have a simple app that you want to publish on all screensizes, perhaps Eclips would be the easiest way. If you have a more complicated app where LiveCode could save you a lot of work, perhaps it would be efficient to create a number of different apps for the most commonly used screen sizes. Currently, I'm making an Android app for a company. All employeed of the company will use the same Android device, which makes it relatively easy to manage. As I said, you might try setting the rect of the stack window to see if that allows you to make a universal app.
Kind regards,
Mark
If you have a simple app that you want to publish on all screensizes, perhaps Eclips would be the easiest way. If you have a more complicated app where LiveCode could save you a lot of work, perhaps it would be efficient to create a number of different apps for the most commonly used screen sizes. Currently, I'm making an Android app for a company. All employeed of the company will use the same Android device, which makes it relatively easy to manage. As I said, you might try setting the rect of the stack window to see if that allows you to make a universal app.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: images don't show, buttons look messed up !
The usual and recommended way to handle screen resolutions is to write resizeStack handlers that dynamically adjust the positions and (if necessary) the sizes of the objects on the card. A "resizestack" message is sent to the card when the app launches and whenever the device is rotated.shermanator wrote:if you can't deploy applications that have a universal fit on multiple android screens then what's the point of deploying android apps? There are loads of different android phones out there, not all have the same screen size. It wouldn't make sense to release 10 different android apps with different screen resolutions on google marketplace .. Is LiveCode practical for Android development or should I just stick to Eclipse ?
These handlers are not difficult to write, although they can be tedious. You'll need one for each card that has unique objects (cards that share a background group can all use the same resize handler, for example.) I strongly recommend against creating different stacks for each size, not only are there are too many different Android resolutions but also new ones appear all the time. The only way to deal with that is to do dynamic adjustments.
The resizeStack message is not sent when just changing cards, so to account for that you can either call your resizestack handler on preOpenCard (I usually do it that way) or if there aren't too many cards, loop through them all on preOpenStack and just set everything up one time when the stack opens.
ResizeStack handlers should use ratios rather than hard-coded pixel numbers. If a field is located 20 pixels from the top of the card during development, then calculate the ratio of 20 pixels to the card height and use that percent to set the field location in the resizeStack handler. Adjust all object sizes and positions this way.
The built-in geometry manager attempts to do all this for you, and you can let it do the work if you make sure it always uses relative positioning based on the card size. However, people have had mixed results using the geometry manager and so many of us just write our own scripts to handle it instead.
There is no generic resizeStack handler I can show you, every stack is different. But the general idea is to go though every control that needs to change and set its position or rectangle. There is an example in the first academy project "Ticked Off" but I don't have a link to that. Does anyone here know where that can be found?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 1201
- Joined: Sun Apr 24, 2011 2:17 am
Re: images don't show, buttons look messed up !
LiveCode Getting Started Course
http://www.runrev.com/developers/docume ... rs-course/
The lesson material there is the TickedOff project.
Its got the resizing and paging and maps.
A really nice place to start.
There is a lot of info on this page.
From beginners topics to some really nice intermediate topics.
http://www.runrev.com/developers/docume ... rs-course/
The lesson material there is the TickedOff project.
Its got the resizing and paging and maps.
A really nice place to start.
There is a lot of info on this page.
From beginners topics to some really nice intermediate topics.
All my best,
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.