Android Question [Solved] B4xDialog: input-text multiline?

Pflichtfeld

Active Member
Licensed User
I try to use the standard B4XInputTemplate, described here . I have the same question/problem as Makubi here, which was not solved.
When I enter long text, longer than one line, the upper lines are not shown.
input.TextField1.Height=300dip seems to have no effect.
Shall I design a custom dialog for this or is it possible, to set the textbox height in code?
 

MicroDrie

Well-Known Member
Licensed User
Longtime User
The B4XEditText component from the B4XView library library is multi line and it allows to scroll up and down.
 
Upvote 0

Pflichtfeld

Active Member
Licensed User
I see, it is multiline MicroDrie, thank you. But in the B4xInputTemplate there is only one line shown and it is very hard to scroll that. My question was, if it was possible to increase the height of this textbox in the template by code, for easier handling. As normally just one line is shown, user might not suppose that other lines exist, see linked post from Makubi. That gets striking, if you set the .text-value (long and multiline) before opening the Template and the user just sees the last line.
 
Upvote 0

MicroDrie

Well-Known Member
Licensed User
Longtime User
To be honest, I don't like reinventing the wheel. And if Star-Dust has made a very nice and good modern looking and working B4X text input field, then why should I attempt to fix a dated input field problem? ? I see very few questions on this forum for which someone not has received a solution. So I take the lazy approach and take the B4XEditText as a working solution. Beside of that, the user can use also the onscreen keyboard Enter, which is missing B4XInputTemplate. You can also try to build your own views with [B4X] [XUI] Creating custom views with XUI.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
B4XInputTemplate uses a single line text field.

In B4A it is simple to make it multiline:
B4X:
InputTemplate.Initialize
InputTemplate.TextField1.TextColor = XUI.Color_Black
InputTemplate.TextField1.SetTextAlignment("TOP", "LEFT")
InputTemplate.mBase.Height = 200dip
Dim et As EditText = InputTemplate.TextField1
et.SingleLine = False
et.Height = 150dip

Another good option is to use B4XPreferenceDialog with a multiline item.
 
Upvote 0

Pflichtfeld

Active Member
Licensed User
Want to add a biiiig LIKE:
Noticed, that the speech recognition language of this template goes conform with the IDE language.
Really great!! ???
Thank you, whoever is responsible for that!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…