I have modified a custom view
AutoTextSizeLabel where the font size is maximized either in height or width.
Now it takes into account both borders and padingns. It is packaged in the b4xlib library.
MaxLabel
Author: Jerryk
Version: 1.30
Methods:
Sets or gets text of Label.
All Label methods are available through Base (e.g. Maxlabel.Base.TextColor, Maxlabel.Base.Top, etc.)
Properties:
Fill height is preferred. In case of long text it will be displayed on multiple lines.
Set maximixed size of font. 0 - no limit
When using the SingleLine property, use "overwritten". This is because it needs to be read for calculations, but in the original it is writeonly.
--------------
Vesion 1.1
added Tag property
Vesion 1.11
fixed error when Background is not ColorDrawable or not set
Vesion 1.20
added PreferHight property
Vesion 1.30
added MaxSize property
Vesion 1.31
fixed error when read new addded property