Android Question Scale TabHost

dibesw

Active Member
Licensed User
Longtime User
HI,
I have problems with scale TabHost.
I drew a layout into tab of TabHost.
This istruction I seems that not scale that is inside of TabHost.

B4X:
Scale.ScaleAll(Activity, True)

is that so?
Thanks
 
Last edited:

klaus

Expert
Licensed User
Longtime User
The problem with using only %x and %y is that the text size is not modified, you need to change it too.
If you have SupportedOrientations = unspecified you need two layouts one for portrait and one for landscape.
The Scale module will scale the loaded layout.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
@LucaMs In this context you have to use "Nichts" (which is "nothing") and not "Nicht" (which is "not") in german language :)
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Attached you find a workaround for the TabHost scaling.
The layouts for the tabs are on panels.
The panel height and width are reduced to take into account the tab height and the padding of the internal container.
This workaround is not perfect because the padding and tab height are not proportional on different screen sizes.
Using panels for the tab layouts allows to scale them with Scale.ScaleView for each panel.
 

Attachments

  • TabHostK.zip
    16 KB · Views: 157
Upvote 0
Top