Page 1 of 1

Geometry Manager / Android ??

Posted: Mon Mar 04, 2013 6:53 pm
by n9yty
Hi!

I'm new to LiveCode, but I heard about the Kickstarter project, was glad to be able to contribute, and have high hopes for the future of the platform. I am an IT Manager, and do a number of software projects mostly for in-house use, and I think there is potential for LiveCode to play a role for a variety of these projects.

Maybe I've been entirely spoiled by being on the Mac and being used to Interface Builder and what a wonderful job it does with its springs and struts to manage object layout/resizing. And my first effort with LiveCode was to build a small app that pulled content from our WordPress site. I am parsing page content instead of the RSS feed because I wanted to allow forward/backward movement through the archived stories, but I was amazed at how easy this was using the revXML routines as long as the markup in the web page was done well. Since we did the template, we have the flexibility to make a nice fit here. Anyway.... In all the testing I was doing on the desktop, I had no issues with resizing windows and making the layout flow to new window sizes. Even card changes were not an issue as long as I called revUpdateGeometry() to get back in sync.

But when I tried to push to either the Android emulator or my real Android device, none of the sizing/scaling seems to be happening. Then looking at the docs a bit closer for the Geometry Manager routines it would seem that they are only supported on desktop/server, but not on mobile? Will this change?

Re: Geometry Manager / Android ??

Posted: Mon Mar 04, 2013 10:46 pm
by Simon
One of the Kickstarter stretch goals is resolution independence, which will solve this issue for you, but it's not here now.
There is a handy plugin but the code it writes is beyond me:
http://forums.runrev.com/phpBB2/viewtop ... ers#p66236

I don't use the Geometry Manager as it rarely does what I expect. Instead I use:
resizeStack (in the dictionary)

Code: Select all

  on resizeStack
if the environment is "mobile" then
      put the working screenRect into tScreen
      set the rect of this stack to tScreen
      put item 3 of tScreen into tWScreen
      put item 4 of tScreen into tHScreen
   else
      put the width of this stack into tWScreen
      put the height of this stack into tHScreen
   end if
--do changes here
With the new Width and Height you can calculate the positions of the other objects.
I find it's a pain to use but it does work.
Can't wait for the resolution independence :D

Simon

Re: Geometry Manager / Android ??

Posted: Mon Mar 04, 2013 10:55 pm
by n9yty
Simon wrote:I don't use the Geometry Manager as it rarely does what I expect.
Thanks, Simon, for such a great response. At least for my simple app I was able to get Geometry Manager to work on the desktop for what I needed, but in addition to your great hints I also found the online Beginner's Course (sorry, I can't post the link as my account is not approved to do so) and watching Lesson 4 gave me the answers I need as well, so between the two I should have no problem making it do what I would like. :) Yes, it is a bit of mundane extra work, but in the end it will not be a problem.

Thanks again!
-Steve

Re: Geometry Manager / Android ??

Posted: Mon Mar 04, 2013 11:30 pm
by Simon
Here is the link:
http://www.runrev.com/developers/docume ... rs-course/
And yes, I'll have to remember this course to point others toward. Lots of ppl have trouble with resizing.

Simon