Bug? loading 2 pages scaling become crazy

Discussion in 'iOS Bugs & Wishlist' started by imbault, May 6, 2015.

  1. imbault

    imbault Well-Known Member Licensed User

    When loading a first page with AutoScaleRate(1) and AutoScaleAll, then a second page, when we show
    the first page, it's like the Autoscale had no effect, controls are super big.

    in this example
    layout1 :
    AutoScaleAll

    layout2 :
    AutoScaleRate(1)
    AutoScaleAll

    Code:
    Private Sub Application_Start (Nav As NavigationController)
        
    Dim nc As NavigationController
        nc.Initialize(
    "nc")

         
    ' in Sub Process_Globals
         ' Public NavControl As NavigationController

         NavControl = nc

        page1.Initialize(
    "page1")
        page1.RootPanel.LoadLayout(
    "layout1")

        page2.Initialize(
    "HomePage")
        page2.RootPanel.Color = 
    Colors.White
        page2.RootPanel.LoadLayout(
    "layout2")
        page2.RootPanel.Color = 
    Colors.Black
        NavControl.ShowPage(HomeScreen)
    if I remove
    Code:
    page1.Initialize("page1")
         page1.RootPanel.LoadLayout(
    "layout1")
    no problem
     
    Last edited: May 6, 2015
  2. klaus

    klaus Expert Licensed User

    Can you post a small project showing the problem so we can see what exactly you have done and test it.
     
  3. imbault

    imbault Well-Known Member Licensed User

    Sure, here it is

    if you comment those 2 lines, it's ok
    Code:
    Page2.Initialize("page2")
        Page2.RootPanel.LoadLayout(
    "layout2")
     

    Attached Files:

  4. klaus

    klaus Expert Licensed User

    What exactly do you want to do ?
    You have layout1 with one layout variant 1024 * 768 AutoScaleRate(1) and AutoScaleAll.
    Then layout2 with two layout variants 1024 * 768 and 568 * 320 and only AutoScaleAll which means AutoScaleRate(0.3) the defalt value.
    Then you add a view in code.
    You should define the dimensions of the view, added in the code, in the Page_Resize routine only ther 100%x and 100%y are known.
     
  5. imbault

    imbault Well-Known Member Licensed User

    I want to show the layout1

    Thank you Klaus, can you give me an example to put in the page_resize in order to redimension the layout1 with it's AutoScaleRate(1) and AutoScaleAll.

    Patrick
     
  6. klaus

    klaus Expert Licensed User

    I don't have enough information.
    On what kind of device do you want to display layout1 ?
    Before testing I prefer to know in detail what to look at.
     
  7. imbault

    imbault Well-Known Member Licensed User

    layout1, on a iphone6
     
  8. klaus

    klaus Expert Licensed User

    Downscaling form an iPad layout to an iPhone layout seems not to work very well.
    The main problem is the different width/height ratio.
    Attached you have modified version with layout3 for an iPhone with AutoscaleRate(0.5) and anchors.
    Doesn't look too bad.
     

    Attached Files:

  9. imbault

    imbault Well-Known Member Licensed User

    Ok, thanks a lot Klaus
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice