Android Question How to make a large edittext

Douglas Farias

Expert
Licensed User
Longtime User
hi my question i think is simple

i
HEWMOGVd29xuD8a6c9nzhu_L9bG_qSm53NMbFV01Qqqvt62_z3JyWDH6EyNgkeDVat4=h310-rw


this is my app.
my question is:
how to make the edittext is big when you click ?

for exemple i click in my edittext to put my text and it come to to full screnn
when i click at back key it back to normal ??
 

LucaMs

Expert
Licensed User
Longtime User
You could enlarge the EditText in the FocusChanged event:

B4X:
Sub EditText1_FocusChanged (HasFocus As Boolean)
    If HasFocus Then
        Dim et As EditText = Sender
        et.SetLayout(0, 0, 100%x, 100%y)
    End If
End Sub

and reset its size in Activity_KeyPress, checking for KeyCode = KeyCodes.KEYCODE_BACK (but this last thing would be well controlled)
 
Upvote 0
Top