5 Replies Latest reply on Mar 23, 2015 12:42 PM by schamblee

    Setting layout by platform

    tays01s

      Title

      Setting layout by platform

      Post

      I'd like to set my layouts automatically by the platform the user has downloaded to. I came across an 'Solution opening script' that contained:

      If [ PatternCount ( Get ( ApplicationVersion ) ; "iPad" ) ] Go to Layout [ <unknown> ]

      Else If [ PatternCount ( Get ( ApplicationVersion ) ; "Pro" ) ] Go to Layout [ “Front” (Front) ]

      Else
      Go to Layout
      [ <unknown> ]

      End If
      If
      [ Get ( SystemPlatform ) > 2 ]

      However, don't you also have to take into account the screen sizes, particularly on Windows machines?

        • 1. Re: Setting layout by platform
          SteveMartino

          Most people create layouts for specific platforms--1 for Ipad, 1 for iPhone, 1 for Pro.  Are you saying you want to differentiate between a Pro Mac vs. a Pro Windows machine?

          Also most people would size all Pro layouts for the smallest size resolution/screen, and use Adjust Window [resize to fit] and the proper anchors on the layout to fill the screen.

          • 2. Re: Setting layout by platform
            schamblee

             The new FMP13 command Get(Device) is better  because It can determine between iPhone and iPad which have different screen sizes.  For Windows PCs I would design for 1024x768 and then stretch the screen with auto-resize anchors.   I believe most pc user are still on a 17 - 20 inch monitor.

            • 3. Re: Setting layout by platform
              tays01s

              Thanks both. For 'computer' size screens, there isn't much problem. It's the likes of iPad mini and phones that would cause a problem. Some of my layouts are modular, so while it's best to show the lot on a biggish screen, I could arrange them in a column or on tabs to fit a phone.

              I have FM12, so can't yet test Get(device). However, there's still a lot of difference in size between an iPhone 6+ and other phones. I'd like to differentiate because I think some devices might just have too small screen sizes to be usable with a 'resize to fit' command.

              • 4. Re: Setting layout by platform
                philmodjunk

                You won't need "resize to fit" on iOS devices as the windows do this automatically. There are templates on your layout for the older smaller phones. 

                • 5. Re: Setting layout by platform
                  schamblee

                  There are several new commands for FMGo 13 and FMP13 which are worth the upgrade price.