Yes, you are correct.
(You can also create your own class that implements
OnTabChangeListener like this:
public class TabChangeListener implements OnTabChangeListener {
public void onTabChanged(String tabID) {
// XXX do something
}
}
and then use it:
TabChangeListener listener = new TabChangeListener();
tabHost.setOnTabChangeListener(listener);
that goes for all cases of using interfaces :)
)
Tauno
On Mon, Oct 27, 2008 at 7:10 PM, David <[EMAIL PROTECTED]> wrote:
>
> So that's how I use the TextWatcher...Ok, it works perfectly! Thanks
> tauntz! (Am I correct in assuming this is how to use the
> tabHost.setOnTabChangeListener()?)
>
> On Oct 26, 12:39 pm, tauntz <[EMAIL PROTECTED]> wrote:
>> http://code.google.com/android/reference/android/widget/TextView.html...)
>>
>> Example:
>> editText.addTextChangedListener(new TextWatcher() {
>> public void afterTextChanged(Editable s) {
>> //XXX do something
>> }
>> public void beforeTextChanged(CharSequence s, int
>> start, int count,
>> int after) {
>> //XXX do something
>> }
>> public void onTextChanged(CharSequence s, int start,
>> int before, int count) {
>> //XXX do something
>> }
>> });
>>
>> Tauno
>>
>> On Sun, Oct 26, 2008 at 9:33 PM, David <[EMAIL PROTECTED]> wrote:
>>
>> > I want to run a function when the text in an EditText is changed. How
>> > would I do this?
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---