web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PowerApps Large gap be...
Power Apps
Unanswered

PowerApps Large gap between Flexible Height Gallery items

(0) ShareShare
ReportReport
Posted on by 73

Hello,

 

I have a Flexible height vertical gallery in my canvas app and the gap between each items are perfect on Studio like shown below

PowerUser39_0-1703636408869.png

But when I publish and test it on my mobile phone the gap is large like shown below:

PowerUser39_1-1703636483070.png

 

My Template size property is below:

 

PowerUser39_2-1703636539023.png

 

The height and width of the gallery is hard coded the way I want and these properties align perfectly on the mobile device.

PowerUser39_3-1703636707794.png

 

In each item I have multiple labels, text box, radio button and finally 2 buttons on the bottom and their Y property is dynamic depending on another control's value and conditions.

 

Also I have Scale to Fit Turned on and Lock Aspect ratio turned off to make the app full screen on mobile device. With Aspect ratio turned on the flexible gallery works fine with perfect spacing but the issue starts only when Aspect ratio is turned off.

 

Any workaround to fix the gap between gallery items when Scale to Fit is on and Lock Aspect Ration Off

Categories:
I have the same question (0)
  • MissingLink Profile Picture
    236 on at

     be wrong, but I think that the template size might be growing as the number of records increases.   

    Because the value of 'Y' increases with each record?   (It shouldn't affect it - but hey - its worth testing)

    MissingLink_0-1703648243124.png

     

     

     

  • PowerUser39 Profile Picture
    73 on at

    @MissingLink: Thanks for your response. Yes, I tried playing with Y value and also the hardcoded numbers on both Template size and Max size but still no luck. Like I said the issue is with Aspect ratio being turned off.

  • WiZey Profile Picture
    3,023 Moderator on at

    Hello @PowerUser39 ,

     

    A flexible gallery adapt its template size to the content's size, so I believe the problem lies with the button's position itself.

     

    How is your button positioned in your gallery ? Is its X, Y, width or height based on a variable value?

  • PowerUser39 Profile Picture
    73 on at

    Thanks for your response. So basically, I have a dynamic gallery where items get added manually upon clicking on Add button by the user and the X/Y values are below:

     

    PowerUser39_0-1703693594207.png

    The Y value is based on a condition which is. 

    If(AD_RequestTypeRadio.SelectedText.Value = "Install" && AD_GalleryAssetType_txt.Text = "INSTXFMR" || AD_RequestTypeRadio.SelectedText.Value = "Install" && AD_GalleryAssetType_txt.Text = "XFMR" || AD_RequestTypeRadio.SelectedText.Value = "Install" && AD_GalleryAssetType_txt.Text = "CIRCBKR", 1070, 960)

  • WiZey Profile Picture
    3,023 Moderator on at

    1070 and 960 for Y? That's quite high values for a button in a gallery. Does your buttons "Item 1" and "Item 2" really use this condition and are set on those Y values?

     

    Just to ease my confusion, why do you set such values for Y? To hide/display the button or something else?

     

    Also, do you perhaps have other controls in your gallery which are repositioned in the same way?

  • PowerUser39 Profile Picture
    73 on at

    My Gallery is a bit complex, and I have around 10 controls in one gallery item such as Radio, text labels, text inputs, couple containers, Images and buttons. So, all these take up large space and it comes around 1100 Y and this is a dynamic service request gallery and the requirement need them all in one item. Lastly, The Add button changes its Y values depending on the above Image controls, If Image 2 is visible then the below Add button's Y will be 1070 if Image 2 is not visible then Add button's Y will be 960.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard