Android Question B4XFloatTextField Hint Not Rising

Sofian

Member
Hi All..
I want to B4XFloatTextField hint text rising when it has focus and when statemanager return it value after screen rotate, because hint text not rising up and text value on a same line. How to code it ?
 

Sofian

Member
Call B4XFloatTextField.Update
thanks Erel, I has change the code :
B4X:
Private Sub tx_barcode_TextChanged (Old As String, New As String)
    tx_barcode.Update
End Sub

Private Sub tx_barcode_FocusChanged (HasFocus As Boolean)
    tx_barcode.Update
End Sub

Result : it work on focus, but after rotate it value and hint text still on same line.
text1.png
text2.png


where to add B4XFloatTextField.Update for statemanager ?
 
Upvote 0

Sofian

Member
i try to add code on statemanager
B4X:
Private Sub innerRestoreState(v As View, list1 As List)
    Dim data() As Object
    Dim IME As IME       ' ------- add this ----
    If v Is EditText Then
        Dim edit As EditText
        edit = v
        data = getNextItem(list1)
        edit.Text = data(0)
        edit.SelectionStart = data(1)
        IME.ShowKeyboard(edit)  ' ------- and this for text to got focus ----

and it works, can I do that ?
 
Upvote 0
Top