cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hintbw-abc
Level 8

Duplicate app and change aspect ratio to tablet (from a phone layout)

I've put a lot of work into building a phone app that has quite a bit of logic and I would like to "clone" it to turn it into a tablet sized app for users who are going to be accessing this on a tablet or on a computer through the web player. When I look at the options for the app to change the screen size and orientation, I'm really not seeing options to change the "screen size" which is where I would have thought a user might be able to change something from a phone layout to something larger.

 

Am I missing something? Any way to do this?

2 ACCEPTED SOLUTIONS

Accepted Solutions
mr-dang
Level 10

Re: Duplicate app and change aspect ratio to tablet (from a phone layout)

I don't think you can switch between phone and tablet sizes/ratios yet. I think it's safe to assume that that's the direction PA is headed in the longterm since it's MS's goal to make universal "code-it-once" apps.

 

In the mean time, I recommend using relative references in the sizes of objects:

 

Gallery.TemplateHeight
Gallery.TemplateWidth

Each object you place will take more time, but the flexibility is worth it.

Microsoft Employee
@8bitclassroom
mr-dang
Level 10

Re: Duplicate app and change aspect ratio to tablet (from a phone layout)

I am uncertain what exactly you mean by "two-column" so I'll try to address two interpretations.

 

Interpretation #1

If by "two-column" you mean you want the width of the gallery to show two columns of records, you can change the Gallery's Wrap property:

2017-12-04 (5).png

  

 

Interpretation #2

If by "two-column" you mean you want to show two columns, a.k.a. two fields, for each record in the gallery, then you can insert a Label side by side into the gallery for each column you want to show.

2017-12-04 (6).png

There is also a Data Table control in PowerApps which shows your datasource in a more Excel fashion.

You can find it in: 

 

Insert > Data Table


Let me know if this helps.

Microsoft Employee
@8bitclassroom
11 REPLIES 11
mr-dang
Level 10

Re: Duplicate app and change aspect ratio to tablet (from a phone layout)

I don't think you can switch between phone and tablet sizes/ratios yet. I think it's safe to assume that that's the direction PA is headed in the longterm since it's MS's goal to make universal "code-it-once" apps.

 

In the mean time, I recommend using relative references in the sizes of objects:

 

Gallery.TemplateHeight
Gallery.TemplateWidth

Each object you place will take more time, but the flexibility is worth it.

Microsoft Employee
@8bitclassroom
Super User
Super User

Re: Duplicate app and change aspect ratio to tablet (from a phone layout)

Hi

 

PC/Tablet will be useful for the sake of Data Entry and usually it will take up "wider" screen size, whereas Phone will be more for viewing (browsing) purposes.

Even though you can;t really clone from Landscape to Portrait, but when you resize it, most of the formula will remain unchanged and you just need to remove entries, left only viewing screen.

 

I am alway making PC/Tablet and after completion, save another copy and change to Portrait (not Phone) and it will fit exactly into Phone size. It really works.

 

Automatic change of Landscape to Portrait and vice versa is not supported at the moment, as I know.

Just sharing.

hpkeong
Sru
Level 8

Re: Duplicate app and change aspect ratio to tablet (from a phone layout)

Hi,

can anybody tell me if there are different templates for tablet and phone layouts. I am trying to see if i can have two column layout for tablet view as my form has 20 plus fields to display. 

 

I am not even able to resize the default data card that comes when we try to add columns from tables.

 

Thanks,
Sru

Microsoft Employee

Re: Duplicate app and change aspect ratio to tablet (from a phone layout)

I have the same requirement. Need to have two column layout in landscape mode. Please help!

mr-dang
Level 10

Re: Duplicate app and change aspect ratio to tablet (from a phone layout)

I am uncertain what exactly you mean by "two-column" so I'll try to address two interpretations.

 

Interpretation #1

If by "two-column" you mean you want the width of the gallery to show two columns of records, you can change the Gallery's Wrap property:

2017-12-04 (5).png

  

 

Interpretation #2

If by "two-column" you mean you want to show two columns, a.k.a. two fields, for each record in the gallery, then you can insert a Label side by side into the gallery for each column you want to show.

2017-12-04 (6).png

There is also a Data Table control in PowerApps which shows your datasource in a more Excel fashion.

You can find it in: 

 

Insert > Data Table


Let me know if this helps.

Microsoft Employee
@8bitclassroom
Microsoft Employee

Re: Duplicate app and change aspect ratio to tablet (from a phone layout)

Thanks mr-dang for your response. I was looking for scenario#1 and your solution worked.Thanks a lot!

Microsoft Employee

Re: Duplicate app and change aspect ratio to tablet (from a phone layout)

Hi @Sru

 

You can set the 'Snap to columns' property of the form to 2 to have two column view in landscape mode when you have more number of field to display. Hope this helps!

 

-Satish

Highlighted
borlip
Level: Powered On

Re: Duplicate app and change aspect ratio to tablet (from a phone layout)

The steps below is the solution that worked for me:

1. Save PowerApps to the disk: myTabletApp.msapp

2. Add file extension .zip : mtTabletApp.msapp.zip. PowerApps file is actually zipped folder

pafiles.png

3. Open Properties.json and change the following fields:

"DocumentLayoutWidth":1024,"DocumentLayoutHeight":768,"DocumentLayoutOrientation":"landscape","DocumentLayoutMaintainAspectRatio":true,"DocumentLayoutLockOrientation":true,"OriginatingVersion":"1.160","DocumentAppType":"DesktopOrTablet"

Into:

"DocumentLayoutWidth":640,"DocumentLayoutHeight":1136,"DocumentLayoutOrientation":"portrait","DocumentLayoutMaintainAspectRatio":true,"DocumentLayoutLockOrientation":true,"OriginatingVersion":"1.244","DocumentAppType":"Phone"

4. Remove .zip extension and open file in PowerApps

5. Consequently, you'd need to rearrange and resize the controls to match the mobile phone layout

Geostation
Level: Power Up

Re: Duplicate app and change aspect ratio to tablet (from a phone layout)

I created my phone app then saved as a different name, changed the aspect ration to landscape in 'app settings' then edited the new tablet friendly version.

 

It means you have two version of the same app which both need updating but its an alternative until a better way is introduced