In using Textfield I find that the TF auto-resizes if the font is two large. This results in other views being overlaid by the Textfield.
My preference is to fix the the size of the TF [Desinger Script Textfield1.size = 20dip] and adjust the text size in code.
You should be able to set maxWidth and maxHeight on the textfield.
Probably need javaobject to do it.
B4X:
...
dim jo as JavaObject = theTextField
jo.runMethod*"setMaxWidth",array(100.0d)) ' set to maxWidth 100 pixels wide
jo.runMethod("setMaxHeight",array(20.0d)) ' set maxHeight to 20 pixels high
...
the values need to be Doubles - so 100.0d and 20.0d
note: if the font size wont fit heightwise, the textfield will resize the height automatically so it fits.
You should be able to set maxWidth and maxHeight on the textfield.
Probably need javaobject to do it.
B4X:
...
dim jo as JavaObject = theTextField
jo.runMethod*"setMaxWidth",array(100.0d)) ' set to maxWidth 100 pixels wide
jo.runMethod("setMaxHeight",array(20.0d)) ' set maxHeight to 20 pixels high
...
the values need to be Doubles - so 100.0d and 20.0d