Android Question No CRLF after Input Type None

BarryW

Active Member
Licensed User
Longtime User
Hi. After setting my edittext input type to type none it cannot accept crlf (new line).

Tnx.
 

BarryW

Active Member
Licensed User
Longtime User
I already set the SingleLine to false and Wrap to false. Still when i try
B4X:
EditText1.Text = "Sample" & CRLF & "Text"

I get Sample Text.

I think CRLF replaces by space because when i use 2 CRLF it just bring me 2 spaces.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
It works properly here. Tested with this code:
B4X:
Sub Activity_Create(FirstTime As Boolean)
   Activity.LoadLayout("1")
   EditText1.InputType = EditText1.INPUT_TYPE_NONE
   EditText1.SingleLine = False
   EditText1.Text = $"sdfj
   ergerg
   lksdfj ksdlf "$
End Sub

Note that if you want to create a scrollable, non-editable text field then you can use CustomListView.AddText.
 
Upvote 0

BarryW

Active Member
Licensed User
Longtime User
My scenario is is have a textbox then it is set to designer windows as
InputType = INPUT_TYPE_NONE
SingleLine = False
Wrap = False

Then is have a asynstream then when it receive something it append it to textbox

I used textbox as my display because it automatically scroll textbox both horizontal and vertical

Still the crlf is not appending on my textbox

B4X:
if textboxt1.text.length > 0 then textbox1.text = textbox1.text & CRLF
textbox1.text = textbox1.text & NewItem
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…