T techgreyeye Member Licensed User Longtime User Nov 21, 2019 #1 My app is using ACToolBarLight but I want the text to be bigger. In this thread it says to use CSBuilder to create the string and set it's size, which I can do. https://www.b4x.com/android/forum/threads/actoolbarlight-title-size.83738/#post-530463 How do I scale the font size so it matches the designer scaling?
My app is using ACToolBarLight but I want the text to be bigger. In this thread it says to use CSBuilder to create the string and set it's size, which I can do. https://www.b4x.com/android/forum/threads/actoolbarlight-title-size.83738/#post-530463 How do I scale the font size so it matches the designer scaling?
Erel B4X founder Staff member Licensed User Longtime User Nov 21, 2019 #2 techgreyeye said: How do I scale the font size so it matches the designer scaling? Click to expand... You can check the text size of one of the text fields (Label, EditText, Button, ...) and then set it accordingly. The difference should be small. Upvote 0
techgreyeye said: How do I scale the font size so it matches the designer scaling? Click to expand... You can check the text size of one of the text fields (Label, EditText, Button, ...) and then set it accordingly. The difference should be small.
T techgreyeye Member Licensed User Longtime User Nov 21, 2019 #3 Erel said: You can check the text size of one of the text fields (Label, EditText, Button, ...) and then set it accordingly. The difference should be small. Click to expand... I tried that, but it doesn't change when I change the font size in android settings. All font size settings are returning the same size. Upvote 0
Erel said: You can check the text size of one of the text fields (Label, EditText, Button, ...) and then set it accordingly. The difference should be small. Click to expand... I tried that, but it doesn't change when I change the font size in android settings. All font size settings are returning the same size.
Erel B4X founder Staff member Licensed User Longtime User Nov 21, 2019 #4 techgreyeye said: I tried that, but it doesn't change when I change the font size in android settings Click to expand... ??? You were asking about the designer scaling in the first post. Upvote 0
techgreyeye said: I tried that, but it doesn't change when I change the font size in android settings Click to expand... ??? You were asking about the designer scaling in the first post.
T techgreyeye Member Licensed User Longtime User Nov 21, 2019 #5 Erel said: ??? You were asking about the designer scaling in the first post. Click to expand... Apologies. I'll rephrase. How do I size the CSbuilder string so that it matches the size of a string set up in the designer? Upvote 0
Erel said: ??? You were asking about the designer scaling in the first post. Click to expand... Apologies. I'll rephrase. How do I size the CSbuilder string so that it matches the size of a string set up in the designer?
Erel B4X founder Staff member Licensed User Longtime User Nov 21, 2019 #6 Maybe something like: Code: Copy Dim cs As CSBuilder cs.Initialize.Size(label1.TextSize).Append("Example").PopAll Upvote 0
Maybe something like: Code: Copy Dim cs As CSBuilder cs.Initialize.Size(label1.TextSize).Append("Example").PopAll
T techgreyeye Member Licensed User Longtime User Nov 21, 2019 #7 I have that in my code already, that's not my problem. It's that the size returned from lmAudits.textsize stays the same no matter what the android text size is set to, even though the text size of the button created in the designer is scaled appropriately. Code: Copy Dim cs As CSBuilder cs.Initialize.Size(lmAudits.TextSize).Append(Starter.appName & " - Dashboard").PopAll ACToolBarLight1.Title = cs Msgbox("Text size is " & lmAudits.TextSize,"info") In the designer, the font size is set to 20, the reported size is 15.623 whatever my system font size is set to in settings. Upvote 0
I have that in my code already, that's not my problem. It's that the size returned from lmAudits.textsize stays the same no matter what the android text size is set to, even though the text size of the button created in the designer is scaled appropriately. Code: Copy Dim cs As CSBuilder cs.Initialize.Size(lmAudits.TextSize).Append(Starter.appName & " - Dashboard").PopAll ACToolBarLight1.Title = cs Msgbox("Text size is " & lmAudits.TextSize,"info") In the designer, the font size is set to 20, the reported size is 15.623 whatever my system font size is set to in settings.
Erel B4X founder Staff member Licensed User Longtime User Nov 22, 2019 #8 Don't use Msgbox. Use Log for debugging or MsgboxAsync. Multiply the font size with Accessibility.GetUserFontScale (Accessibility library). Upvote 0
Don't use Msgbox. Use Log for debugging or MsgboxAsync. Multiply the font size with Accessibility.GetUserFontScale (Accessibility library).
T techgreyeye Member Licensed User Longtime User Nov 22, 2019 #9 Erel said: Don't use Msgbox. Use Log for debugging or MsgboxAsync. Multiply the font size with Accessibility.GetUserFontScale (Accessibility library). Click to expand... Thanks Erel, that's what I needed. Upvote 0
Erel said: Don't use Msgbox. Use Log for debugging or MsgboxAsync. Multiply the font size with Accessibility.GetUserFontScale (Accessibility library). Click to expand... Thanks Erel, that's what I needed.