public class StripeEditText
extends TextInputEditText
AppCompatEditText that listens for users pressing the delete key when
there is no text present. Google has actually made this
somewhat difficult,
but we listen here for hardware key presses, older Android soft keyboard delete presses,
and modern Google Keyboard delete key presses.| Constructor and Description |
|---|
StripeEditText(android.content.Context context) |
StripeEditText(android.content.Context context,
android.util.AttributeSet attrs) |
StripeEditText(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr) |
| Modifier and Type | Method and Description |
|---|---|
android.content.res.ColorStateList |
getCachedColorStateList() |
int |
getDefaultErrorColorInt() |
boolean |
getShouldShowError()
Gets whether or not the text should be displayed in error mode.
|
android.view.inputmethod.InputConnection |
onCreateInputConnection(android.view.inputmethod.EditorInfo outAttrs) |
protected void |
onDetachedFromWindow() |
void |
setErrorColor(int errorColor)
Sets the error text color on this
StripeEditText. |
void |
setHintDelayed(int hintResource,
long delayMilliseconds)
Change the hint value of this control after a delay.
|
void |
setShouldShowError(boolean shouldShowError)
Sets whether or not the text should be put into "error mode," which displays
the text in an error color determined by the original text color.
|
public StripeEditText(android.content.Context context)
public StripeEditText(android.content.Context context,
android.util.AttributeSet attrs)
public StripeEditText(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr)
public android.content.res.ColorStateList getCachedColorStateList()
public boolean getShouldShowError()
mShouldShowErrorpublic int getDefaultErrorColorInt()
public android.view.inputmethod.InputConnection onCreateInputConnection(android.view.inputmethod.EditorInfo outAttrs)
public void setErrorColor(int errorColor)
StripeEditText.errorColor - a ColorIntpublic void setHintDelayed(int hintResource,
long delayMilliseconds)
hintResource - the string resource for the hint to be setdelayMilliseconds - a delay period, measured in millisecondspublic void setShouldShowError(boolean shouldShowError)
shouldShowError - whether or not we should display text in an error state.protected void onDetachedFromWindow()