Android Question Text scaling in code vs AutoScale

Discussion in 'Android Questions' started by Arf, Mar 19, 2015.

  1. Arf

    Arf Active Member Licensed User

    I present data in a scrollview table that is loaded onto a panel in my activity.
    This panel can changesize depending on orientation, although I will try lock the aspect ratio as it seems easiest to deal with the text if the aspect ratio remains more or less constant.

    I only have 4 rows to display, so currently I set the row height and font size within my main code like this:
    Code:
    RowHeight_1 = (TablePanel.Height-8)/4
        FontSize = RowHeight_1/
    2
        HeaderFontSize = FontSize * 
    0.75
    That seems to work OK, but I am worried that setting the font size like that is not the correct thing to do.
    I have AutoScale on and the rate set to 1.0, but does that apply to the Scrollview because it is added to the activity in code, not the designer?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Arf likes this.
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