Android Question Compare AutoScaleRate vs Manual Scale

Discussion in 'Android Questions' started by ArminKH, Jul 5, 2015.

  1. ArminKH

    ArminKH Well-Known Member

    before using Designer and Autoscaleall and autoscalerate i use this code to set my viewes size and position
    Sub AutoResizeAll
    Dim xx,yy,rr As Float
            rr = 
    For Each V As View In Activity.GetAllViewsRecursive
    End Sub
    above code works perfectly and my viewes scaled with a good Rate
    but for now if i want to Set Same Scale Rate by using AutoScaleAll from designer then Which Scale Rate must be Entered? 0.5?0.6?0.7?
    i want just same result
    thank u
  2. Erel

    Erel Administrator Staff Member Licensed User

    Your code is similar to using a scale rate of 1.0. Though auto scale all is more sophisticated than this code.

    It compares the chosen variant size to the actual device size. It doesn't assume that the variant size is 320x480.

    I don't think that it is a good solution to use a scale rate of 1.0. It means that your layout is stretched on large devices. Using anchors together with the default autoscale all will give better results.
    ArminKH likes this.
  3. ArminKH

    ArminKH Well-Known Member

    thank u but when i use AutoScaleAll then my viewes are a bit small on large devices
    what do you think about using a Scale Rate between 0.5 and 0.7 ? again layout is stretched on large devices And seem not good?
  4. LucaMs

    LucaMs Expert Licensed User

  5. Erel

    Erel Administrator Staff Member Licensed User

    Anchors and designer script are more important than scaling. In most cases the scale rate should be smaller than 0.5.

    Make sure to test the layout on tablets and phones (you can use the UI Cloud for that).
    Peter Simpson and NJDude like this.
  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