Search in sources :

Example 1 with SimpleTextWatcher

use of com.novoda.notils.text.SimpleTextWatcher in project Memento-Calendar by alexstyl.

the class ContactSuggestionViewHolder method bind.

public void bind(final ContactDetailsListener listener) {
    contactSuggestionView.setOnContactSelectedListener(new ContactSuggestionView.OnContactSelectedListener() {

        @Override
        public void onContactSelected(Contact contact) {
            listener.onContactSelected(contact);
        }

        @Override
        public void onContactCleared() {
            listener.onContactCleared();
        }
    });
    contactSuggestionView.addTextChangedListener(new SimpleTextWatcher() {

        @Override
        public void afterTextChanged(Editable text) {
            listener.onNameModified(text.toString());
        }
    });
}
Also used : SimpleTextWatcher(com.novoda.notils.text.SimpleTextWatcher) ContactSuggestionView(com.alexstyl.specialdates.addevent.ui.ContactSuggestionView) Editable(android.text.Editable) Contact(com.alexstyl.specialdates.contact.Contact)

Aggregations

Editable (android.text.Editable)1 ContactSuggestionView (com.alexstyl.specialdates.addevent.ui.ContactSuggestionView)1 Contact (com.alexstyl.specialdates.contact.Contact)1 SimpleTextWatcher (com.novoda.notils.text.SimpleTextWatcher)1