Android Question Edititext , line disappear!

coslad

Well-Known Member
Licensed User
Longtime User
Hi ,

i have a trouble , if i put through the designer a edittext view large 100%x with singleline= true and wrap=true , when the first line is finished and begin the second line , the fist line disapper even though there is much space .
An exemple in attach .
You can see the first line almost completely disappeared
am i wrong ?

Thanks
 

Attachments

  • esempio.png
    esempio.png
    18.7 KB · Views: 441

coslad

Well-Known Member
Licensed User
Longtime User
ok, but i need a wrap function like when you write a sms but with done key and without enter key , becouse i save the edittext in a list file , so the text can't contain LF character .
 
Upvote 0

coslad

Well-Known Member
Licensed User
Longtime User
Hi Erel , I did it , but without wrap=true , the text continues in a straight line without going to the second line when the view is over .
 
Upvote 0

coslad

Well-Known Member
Licensed User
Longtime User
Thanks informatrix ,
at the moment i solved in this way :

B4X:
Sub txt_descrizione_difetto_TextChanged (Old As String, New As String)
If New.EndsWith(Chr(10)) Then
    txt_descrizione_difetto.Text=Old
    txt_descrizione_difetto.SelectionStart=Old.Length
End If
End Sub

but i'm going to try your solution ,

thanks again
 
Upvote 0

GaNdAlF89

Active Member
Licensed User
Longtime User
Hi, I have the same problem. I want that text in multiline edittext continues in second line, but edittext scrolls up the first line. I have also tried with setting SingleLine to True , ForceDone to True and Wrap to True. How can I fix it?
 
Upvote 0

Informatix

Expert
Licensed User
Longtime User
Sorry, I had to say that SingleLine was set to False..
There's a bug in the standard EditText (not really the fault of Erel) that I fixed in my Masked EditText. The SingleLine and Wrap settings may be ignored depending on how you set the other settings of your EditText (the order is very important). So, as suggested above, use the Masked EditText instead.
 
Upvote 0
Top