In the class, add the declaration of events to the top of the code
B4X:
#Event: TextChanged (Old As String, New As String)
#Event: FocusChanged (HasFocus As Boolean)
#Event: EnterPressed
Edit the Sub TextChanged as shown below:
B4X:
Private Sub MyEditText_TextChanged (Old As String, New As String)
HintAnimation(New.Length>0)
If SubExists(mCallBack,mEventName & "_TextChanged") Then CallSub3(mCallBack,mEventName & "_TextChanged",Old,New)
End Sub
Add these two SUB
B4X:
Private Sub MyEditText_FocusChanged (HasFocus As Boolean)
If SubExists(mCallBack,mEventName & "_FocusChanged") Then CallSub2(mCallBack,mEventName & "_FocusChanged",HasFocus)
End Sub
private Sub MyEditText_EnterPressed
If SubExists(mCallBack,mEventName & "_EnterPressed") Then CallSub(mCallBack,mEventName & "_EnterPressed")
End Sub
Sub txtCard_FocusChanged (HasFocus As Boolean)
Dim Send As LabelExended '
If HasFocus Then
Send = Sender
Log(Sender)
SV.ScrollPosition = Send.Top - 20dip
End If
End Sub
Sub txtCard_FocusChanged (HasFocus As Boolean)
Dim Send As LabelExended '
If HasFocus Then
Send = Sender
Log(Sender)
SV.ScrollPosition = Send.Top - 20dip
End If
End Sub
yes i know , but in FloatLabeledEditText i can't set the right gravity property for the Hint especially during typing in Edittext and there is no animation for hint.