Jump to content


Photo

iPhone Portrait Object Spacing - Orientation Landscape Spacing

orientation

  • Please log in to reply
9 replies to this topic

#1 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 354 posts
  • LocationMelbourne Australia

Posted 22 December 2017 - 02:29 AM

I have an iPhone Portrait Form with all objects formatted correctly via Flex and LayOut Config.

 

When phone is rotated all the object spacing fails, please show me how to resolve - thanks.

 

 

Attached Files


  • 0

Andy


#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 5193 posts

Posted 22 December 2017 - 05:19 AM

Hi,

 

I think it's better to make a test case

 

Best regards,


  • 0

#3 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 354 posts
  • LocationMelbourne Australia

Posted 26 December 2017 - 10:01 PM

I am out of the office at the moment so I cannot re-test with Delphi Tokyo 10.2.2 but with my previous Delphi (Berlin 10.1) on iPhoneX the results are above.

 

Please show me how to catch "orientation" event plus adjust screen positioning to make it suitable for Landscape - Thanks.

Attached Files


  • 0

Andy


#4 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 354 posts
  • LocationMelbourne Australia

Posted 29 December 2017 - 04:07 AM

Farshad, Can you please advise.


  • 0

Andy


#5 mohammad

mohammad

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 835 posts
  • LocationKufur Kassem, Palestine

Posted 29 December 2017 - 02:40 PM

I think it is relative to the layout settings thats you have mafe, I already posted an example of layout specially for mobile, please refer to it and see how I made it in the user area > sample projects, If you need further help you may post it here.... Good luck
  • 0

#6 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 354 posts
  • LocationMelbourne Australia

Posted 29 December 2017 - 07:33 PM

Mohammad, I have viewed your example.

 

I use Container, Panel and Flex.

 

Would you be so kind and please have a look at my code posted above and advise - thanks.


  • 0

Andy


#7 mohammad

mohammad

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 835 posts
  • LocationKufur Kassem, Palestine

Posted 31 December 2017 - 06:58 AM

Well....

 

Hmmmmmmmmmm

 

I see that most of unigui users struggling with 'layouts' and they mix VCL layout way (align) with Extjs/Touch layout....

 

Please DON'T USE 'ALIGN' property, NEVER....

Always use 'Aligment Control' = uiAligmentClient

When it comes to mobile think of using the 'minHeight'

And practice 'vbox' / 'hbox' to achieve the result that you want...

 

I think that I should write a guide for 'layouts' or maybe an online video course using skype...let's vote...

 

your project is attached...

 

If you need further help please post here or contact me via whatsapp: +972-54-9000258 

Attached Files


  • 0

#8 dan602

dan602

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 106 posts

Posted 31 December 2017 - 09:16 AM


Hi Mohammad,

You helped me out on a mobile layout, which I spent hours trying to do, so again thanks for that.

I would be willing to donate for you to create a comprehensive guide on layouts, from real basics, like what NOT to do. Also including a basic overview on best practices on where to add, and how to interact with CCS with Delphi controls. Perhaps start a new thread to Hague interest.

Coming from a Delphi background I can echo the fact that the only thing I really struggle with is layouts.

Sent from my Pixel using Tapatalk
  • 0

#9 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 354 posts
  • LocationMelbourne Australia

Posted 31 December 2017 - 09:35 PM

Thanks Mohammad, I had tried every concept I could think of, after putting everything back to what it should have been, the missing piece of code was:-

 

config.minHeight = 450;


  • 0

Andy


#10 mohammad

mohammad

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 835 posts
  • LocationKufur Kassem, Palestine

Posted 01 January 2018 - 03:26 PM

Great to hear that  ;)


  • 0





Also tagged with one or more of these keywords: orientation

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users