Class DynamicTextWatcher
java.lang.Object
com.pranavpandey.android.dynamic.util.watcher.DynamicTextWatcher
- All Implemented Interfaces:
NoCopySpan
,TextWatcher
A
TextWatcher
to delay the text changed event.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface android.text.NoCopySpan
NoCopySpan.Concrete
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
Default value in milliseconds by which the text changed event should be delayed.static final int
Message constant to dispatch the text change event. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
beforeTextChanged
(CharSequence s, int start, int count, int after) abstract void
This method will be called after delaying the text changed event.Returns the handler used by this watcher to delay the text changed event.long
Returns the delay in milliseconds by which the text changed event should be delayed.void
onTextChanged
(CharSequence s, int start, int before, int count)
-
Field Details
-
MESSAGE_TEXT_CHANGED
public static final int MESSAGE_TEXT_CHANGEDMessage constant to dispatch the text change event.- See Also:
-
DELAY_TEXT_CHANGE
public static final long DELAY_TEXT_CHANGEDefault value in milliseconds by which the text changed event should be delayed.- See Also:
-
-
Constructor Details
-
DynamicTextWatcher
public DynamicTextWatcher()
-
-
Method Details
-
beforeTextChanged
- Specified by:
beforeTextChanged
in interfaceTextWatcher
-
onTextChanged
- Specified by:
onTextChanged
in interfaceTextWatcher
-
afterTextChanged
- Specified by:
afterTextChanged
in interfaceTextWatcher
-
delayedTextChanged
This method will be called after delaying the text changed event.- Parameters:
s
- The text after the change.- See Also:
-
getTextChangeDelay
public long getTextChangeDelay()Returns the delay in milliseconds by which the text changed event should be delayed.- Returns:
- The delay in milliseconds by which the text changed event should be delayed.
-
getHandler
Returns the handler used by this watcher to delay the text changed event.- Returns:
- The handler used by this watcher to delay the text changed event.
-