Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Unity UI Create 2 panels for portrait and landscape - like the android phone app

Discussion in 'Unity UI & TextMesh Pro' started by newguy123, Jan 10, 2019.

  1. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    87
    Hi guys

    With Android 8.0, the default phone app appears to be mainly 2 panels. In portrait the number buttons is at the bottom, filling the width, but about halfway in height. Above that, is the contact list where your contacts show up, also filling the width, and about halfway in length.

    When in landscape however, its not filling the width anymore, but the height, and now the width is about halfway.

    I cant work out how to achieve that type of layout. Closest I can think of is anchor the one at top left and the other at bottom right, but then how to achieve the rest, taking into account it should work on all devices and aspect ratios.
     
  2. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    570
    hi @newguy123,

    It is not easy to achieve that out of the box. Therefore I wrote an asset "Better UI" which takes care of correct sizing for any screen sizes.
    In the version 2.0 I also added a big feature to change the UI layout for different screens (or orientations) while using the same objects.

    In my signature you can find some information about Better UI.
    here you can find information about the Beta of version 2.0.
    If you are interested in the beta, please write me a PM.
     
    newguy123 likes this.