Package com.pspdfkit.ui
Class FloatingHintEditText
-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback
,android.view.KeyEvent.Callback
,android.view.ViewTreeObserver.OnPreDrawListener
,android.view.accessibility.AccessibilityEventSource
,androidx.appcompat.widget.EmojiCompatConfigurationView
,androidx.core.view.OnReceiveContentViewBehavior
,androidx.core.view.TintableBackgroundView
,androidx.core.widget.TintableCompoundDrawablesView
public class FloatingHintEditText extends LocalizedEditText
An AppCompatEditText extension containing a floating hint text, a colored underline and bottom error text.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
FloatingHintEditText.EditTextListener
Listener interface for events on the FloatingHintEditText.
-
Constructor Summary
Constructors Constructor Description FloatingHintEditText(Context context)
FloatingHintEditText(Context context, AttributeSet attrs)
FloatingHintEditText(Context context, AttributeSet attrs, int style)
FloatingHintEditText(Context context, String floatingHintText)
FloatingHintEditText(Context context, AttributeSet attrs, String floatingHintText)
FloatingHintEditText(Context context, AttributeSet attrs, int style, String floatingHintText)
-
Method Summary
Modifier and Type Method Description void
setPdfEditTextListener(@Nullable() FloatingHintEditText.EditTextListener listener)
Sets a listener to be notified of a pdf editing events. void
setHintColor(int color)
Sets the color for the hint text. final void
setPadding(int left, int top, int right, int bottom)
boolean
onKeyPreIme(int keyCode, KeyEvent event)
void
showError()
Show error. void
setOnFocusChangeListener(@Nullable() View.OnFocusChangeListener listener)
void
setErrorColor(int errorColor)
Sets the color for the error text. void
setPrimaryColor(int color)
Sets the primary color for the FloatingHintEditText. void
setFloatingHintColor(int floatingHintColor)
Sets the color for the floating hint text. -
-
Constructor Detail
-
FloatingHintEditText
FloatingHintEditText(Context context)
-
FloatingHintEditText
FloatingHintEditText(Context context, AttributeSet attrs)
-
FloatingHintEditText
FloatingHintEditText(Context context, AttributeSet attrs, int style)
-
FloatingHintEditText
FloatingHintEditText(Context context, AttributeSet attrs, String floatingHintText)
-
FloatingHintEditText
FloatingHintEditText(Context context, AttributeSet attrs, int style, String floatingHintText)
-
-
Method Detail
-
setPdfEditTextListener
void setPdfEditTextListener(@Nullable() FloatingHintEditText.EditTextListener listener)
Sets a listener to be notified of a pdf editing events. Calling this method will replace any previously set listener. You may provide
null
to clear the listener.- Parameters:
listener
- EditTextListener that should be notified, ornull
to clear the listener.
-
setHintColor
void setHintColor(int color)
Sets the color for the hint text.
- Parameters:
color
- Hint text color.
-
setPadding
final void setPadding(int left, int top, int right, int bottom)
-
onKeyPreIme
boolean onKeyPreIme(int keyCode, KeyEvent event)
-
showError
void showError()
Show error.
-
setOnFocusChangeListener
void setOnFocusChangeListener(@Nullable() View.OnFocusChangeListener listener)
-
setErrorColor
void setErrorColor(int errorColor)
Sets the color for the error text.
- Parameters:
errorColor
- Error text color.
-
setPrimaryColor
void setPrimaryColor(int color)
Sets the primary color for the FloatingHintEditText.
- Parameters:
color
- Primary color to set.
-
setFloatingHintColor
void setFloatingHintColor(int floatingHintColor)
Sets the color for the floating hint text.
- Parameters:
floatingHintColor
- Floating hint text color.
-
-
-
-