One way would be to subclass the EditText class...  You would then have
access to onTextChanged and could do whatever you want with it.

Thanks,
Justin

----------------------------------------------------------------------
There are only 10 types of people in the world...
Those who know binary and those who don't.
----------------------------------------------------------------------


On Tue, Sep 29, 2009 at 2:07 PM, infero <[email protected]> wrote:

>
> I'd like to display the length of the entered text for a EditText
> while the user is typing, so he/she can see when the maximum
> characters are reached - or the other way round how many chars are
> left (link for an SMS).
>
> I see that the TextView has a protected method onTextChanged, but how
> can I make the activity get informed about a change, so I can update
> the text?
>
> href to that method:
>
> http://developer.android.com/reference/android/widget/TextView.html#onTextChanged(java.lang.CharSequence<http://developer.android.com/reference/android/widget/TextView.html#onTextChanged%28java.lang.CharSequence>
> ,
> int, int, int)
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to