This library will allow you to add a character counter to EditTexts.
The counter can be ascending or descending.
Requirements:
1- Copy the CharCounter.jar and CharCounter.xml to your additional libraries directory.
Usage:
That's it.
A sample project is attached.
The counter can be ascending or descending.
Requirements:
1- Copy the CharCounter.jar and CharCounter.xml to your additional libraries directory.
Usage:
B4X:
'Initialize the library
Dim Ascending As CharCounter
'Add the counter to an EditText
Ascending.Initialize(Activity, EditText1, 10, "A", "L", "Length: ")
'Add this line to the TextChanged event (in this sample, EditText1)
Sub EditText1_TextChanged(Old As String, New As String)
Ascending.Update(Old, New)
End Sub
That's it.
A sample project is attached.
Attachments
Last edited: