Arf Well-Known Member Licensed User Longtime User Mar 19, 2015 #1 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?
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?
Erel B4X founder Staff member Licensed User Longtime User Mar 19, 2015 #2 The designer autoscale feature only affects views added in the designer. However there is a code module created by klaus that does the same thing for other views: https://www.b4x.com/android/forum/threads/autoscale-code-module.23750/#content Upvote 0
The designer autoscale feature only affects views added in the designer. However there is a code module created by klaus that does the same thing for other views: https://www.b4x.com/android/forum/threads/autoscale-code-module.23750/#content