Design interface for mobile platform

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

kolia
Posts: 82
Joined: Thu May 28, 2015 3:53 pm

Design interface for mobile platform

Post by kolia » Fri Oct 09, 2015 11:45 am

Hello,
Are there any guidelines to design interface for the mobile world? For instance how to get the interface automatically centered when it is launched, where to put the code in order to have the code not directly linked to the graphical interface and make it non redundant. Do we need to design a unique interface for each type of mobile Platform. How to get the interface nicely resized depending on screen size and screen resolution? etc.
Thank you
Nicolas
LC 7.1 on Windows 8.1 and on MAC OS 10.10.5 Xcode 6.4 - 7.1

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm

Re: Design interface for mobile platform

Post by quailcreek » Tue Oct 13, 2015 1:29 am

LC will automatically locate the elements of your interface to where you have them on the screen as well as setting the width ratio. This means that if a control is centered on the screen, LC will keep it in the center when the display width increases. If the control runs across the full display, like with a nav or toolbar, LC will do that too. You can see this when you run your app in the simm. Just change the Hardware>device to something larger. The only part you have to control is to allow for the different heights of the Phone displays. This means you can have one design for all iPhones and Android. You'll probably need a separate one for iPad. The placement of code that adjusts the interface for display heights will vary. They will probably want to be in either the stack script or the card script where the control lives. HTH
Tom
MacBook Pro OS Mojave 10.14

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Design interface for mobile platform

Post by Simon » Tue Oct 13, 2015 5:35 am

Hi Nicolas,
I think to be more specific to your question check out "fullscreenmode" in the Dictionary.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

kolia
Posts: 82
Joined: Thu May 28, 2015 3:53 pm

Re: Design interface for mobile platform

Post by kolia » Tue Oct 13, 2015 9:07 am

Thank you to both Simon and quailcreeck. There information will certainly help me to better design such app's
Nicolas
LC 7.1 on Windows 8.1 and on MAC OS 10.10.5 Xcode 6.4 - 7.1

kolia
Posts: 82
Joined: Thu May 28, 2015 3:53 pm

Re: Design interface for mobile platform

Post by kolia » Tue Oct 13, 2015 1:44 pm

The showAll option is really nice
Nicolas
LC 7.1 on Windows 8.1 and on MAC OS 10.10.5 Xcode 6.4 - 7.1

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Re: Design interface for mobile platform

Post by SparkOut » Tue Oct 13, 2015 6:45 pm

Here's a basic lesson, if you haven't already seen it http://lessons.runrev.com/m/4069/l/1564 ... ll-devices

Take a look at the rest of the lessons too

kolia
Posts: 82
Joined: Thu May 28, 2015 3:53 pm

Re: Design interface for mobile platform

Post by kolia » Wed Oct 14, 2015 8:08 am

Thanks for that, I had the chance to have a look already.
I have an architecture question. My app has to run on different device types, possibly 3 with very different screen sizes: regular PC, tablet and phone.
I understand that for each of them I have to design 3 different cards and to put each them in a substack in order to size the each card according to physical screen dimensions and resolution. Is this the best approach?
Then come the question regarding where to put the code in order to factor it. Shall I put it in the main stack?
Edit : putting all the code in the mainstack leads to put the code for all mouseUp events (for instance ), which I don't find convenient because it makes the code not very much readable.
Are there better way of organizing the cards and the code?
Thank you
Nicolas
LC 7.1 on Windows 8.1 and on MAC OS 10.10.5 Xcode 6.4 - 7.1

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

Re: Design interface for mobile platform

Post by jmburnod » Wed Oct 14, 2015 12:43 pm

Hi Kolia,
Edit : putting all the code in the mainstack leads to put the code for all mouseUp events (for instance ), which I don't find convenient because it makes the code not very much readable.
Are there better way of organizing the cards and the code?
One or more is an old question. :roll:
I use this method

--script of btn "bMyBtn"

Code: Select all

on mouseup
debMyBtnMU
end mouseup
--script of stack

Code: Select all

on debMyBtnMU
doSomething
end debMyBtnMU
And the same for Mousedown = MD, Mouserelease = "MR" etc..

Best regards
Jean-Marc
Last edited by jmburnod on Wed Oct 14, 2015 2:51 pm, edited 1 time in total.
https://alternatic.ch

kolia
Posts: 82
Joined: Thu May 28, 2015 3:53 pm

Re: Design interface for mobile platform

Post by kolia » Wed Oct 14, 2015 2:15 pm

Thanks Jean-Marc, I was indeed thinking of this method. But I was wondering whether there are other technics.
Nicolas
Nicolas
LC 7.1 on Windows 8.1 and on MAC OS 10.10.5 Xcode 6.4 - 7.1

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Design interface for mobile platform

Post by jacque » Wed Oct 14, 2015 7:02 pm

The fullscreenmode property was implemented so you don't have to design different layouts for every platform. I've only done that once a long time ago and script maintenance was a nightmare. I'd really advise against going that route.

Properly designed, you can use the same stack for every device or desktop. Try the different fullscreenmode options to see which one works best for your layout.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Design interface for mobile platform

Post by Simon » Wed Oct 14, 2015 7:17 pm

Hi Nicolas,
I understand that for each of them I have to design 3 different cards
I think this is from "old" posts?
With resolution independence we don't have to make separate stacks.
See fullScreenMode in the Dictionary.

Or I have misunderstood this thread :oops:

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm

Re: Design interface for mobile platform

Post by quailcreek » Wed Oct 14, 2015 8:07 pm

I do my iPhone layout on iPhone 4, 320x480. I have tried in the past and I just went through the exercise again of trying all the fullScreenMode settings. None of them provide a desirable result when I change the device to iPhone 5 or 6 in the simm. I would really like someone to prove me wrong. I works well for iPad but iPhone... not so much.
Tom
MacBook Pro OS Mojave 10.14

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Design interface for mobile platform

Post by jacque » Wed Oct 14, 2015 8:42 pm

We discussed this recently on the mailing list:
http://runtime-revolution.278305.n4.nab ... 97228.html

Scroll down almost to the end of the page, where Colin provides links on how the different fullscreenmode options work. Basically what you want to do is leave some margin around all the working parts of your stack so that different screen ratios won't affect them. It does take some experimentation but once you hit the right combination it works very well.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm

Re: Design interface for mobile platform

Post by quailcreek » Wed Oct 14, 2015 10:53 pm

Hi Jacqueline,
Great information as usual. I guess I'm still missing something. My app is a data stack with very few graphics. While exactFit gives the best result, it still just stretches everything so it's distorted vertically, even the text. It's a pretty standard app. Grouped navBar and grouped toolBar with controls in between. Not sure what margins I need to be concerned with. Are there any other settings that need to be set beside fullScreenMode? I'd really like to get this to work so I can do an Android version.
Tom
MacBook Pro OS Mojave 10.14

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Design interface for mobile platform

Post by jacque » Wed Oct 14, 2015 11:26 pm

Can you post a screenshot of your layout so we can see what you're dealing with?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply