-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback,android.view.KeyEvent.Callback,android.view.ViewTreeObserver.OnPreDrawListener,android.view.accessibility.AccessibilityEventSource,android.widget.Filter.FilterListener,androidx.appcompat.widget.EmojiCompatConfigurationView,androidx.core.view.TintableBackgroundView,androidx.core.widget.TintableCompoundDrawablesView
public class MaterialMultiAutoCompleteTextView extends AppCompatMultiAutoCompleteTextView
Created by rengwuxian on 2015/1/8.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public @interfaceMaterialMultiAutoCompleteTextView.FloatingLabelType
-
Field Summary
-
Constructor Summary
Constructors Constructor Description MaterialMultiAutoCompleteTextView(Context context)MaterialMultiAutoCompleteTextView(Context context, AttributeSet attrs)MaterialMultiAutoCompleteTextView(Context context, AttributeSet attrs, int style)
-
Method Summary
Modifier and Type Method Description intgetFloatingLabelTextSize()voidsetFloatingLabelTextSize(int size)intgetFloatingLabelTextColor()voidsetFloatingLabelTextColor(int color)intgetBottomTextSize()voidsetBottomTextSize(int size)intgetFloatingLabelPadding()voidsetFloatingLabelPadding(int padding)voidsetBaseColor(int color)intgetInnerPaddingTop()get inner top padding, not the real paddingTop intgetInnerPaddingBottom()get inner bottom padding, not the real paddingBottom intgetInnerPaddingLeft()get inner left padding, not the real paddingLeft intgetInnerPaddingRight()get inner right padding, not the real paddingRight voidsetPrimaryColor(int color)intgetErrorColor()voidsetErrorColor(int color)intgetMinCharacters()voidsetMinCharacters(int min)intgetMaxCharacters()voidsetMaxCharacters(int max)voidsetSingleLineEllipsis(boolean enabled)voidsetFloatingLabelAlwaysShown(boolean floatingLabelAlwaysShown)voidsetHelperTextAlwaysShown(boolean helperTextAlwaysShown)intgetMinBottomTextLines()voidsetMinBottomTextLines(int lines)floatgetCurrentBottomLines()voidsetCurrentBottomLines(float currentBottomLines)StringgetHelperText()voidsetHelperText(CharSequence helperText)intgetHelperTextColor()voidsetHelperTextColor(int color)floatgetFloatingLabelFraction()voidsetFloatingLabelFraction(float floatingLabelFraction)floatgetFocusFraction()voidsetFocusFraction(float focusFraction)TypefacegetAccentTypeface()voidsetAccentTypeface(Typeface accentTypeface)Set typeface used for the accent texts (floating label, error/helper text, character counter, etc. CharSequencegetFloatingLabelText()voidsetFloatingLabelText(@Nullable() CharSequence floatingLabelText)Set the floating label text. voidsetHideUnderline(boolean hideUnderline)Set whether or not to hide the underline (shown by default). intgetUnderlineColor()get the color of the underline for normal state voidsetUnderlineColor(int color)Set the color of the underline for normal state voidsetAutoValidate(boolean autoValidate)voidsetFloatingLabelAnimating(boolean animating)voidsetValidateOnFocusLost(boolean validate)voidsetShowClearButton(boolean show)List<METValidator>getValidators()voidsetLengthChecker(METLengthChecker lengthChecker)voidsetIconLeft(@DrawableRes() int res)voidsetIconLeft(Drawable drawable)voidsetIconLeft(Bitmap bitmap)voidsetIconRight(@DrawableRes() int res)voidsetIconRight(Drawable drawable)voidsetIconRight(Bitmap bitmap)booleanisShowClearButton()booleanisFloatingLabelAlwaysShown()booleanisHelperTextAlwaysShown()booleanisHideUnderline()final voidsetPadding(int left, int top, int right, int bottom)use setPaddings instead, or the paddingTop and the paddingBottom may be set incorrectly. voidsetPaddings(int left, int top, int right, int bottom)Use this method instead of setPadding to automatically set the paddingTop and the paddingBottom correctly. booleanisValidateOnFocusLost()voidsetMetTextColor(int color)Same function as setTextColor. voidsetMetTextColor(ColorStateList colors)Same function as setTextColor. voidsetMetHintTextColor(int color)Same function as setHintTextColor. voidsetMetHintTextColor(ColorStateList colors)Same function as setHintTextColor. voidsetFloatingLabel(int mode)booleanisFloatingLabelAnimating()booleanisAutoValidate()voidsetError(CharSequence errorText)CharSequencegetError()booleanisValid(String regex)if the main text matches the regex booleanvalidate(String regex, CharSequence errorText)check if the main text matches the regex, and set the error text if not. booleanvalidateWith(@NonNull() METValidator validator)Run validation on a single validator instance booleanvalidate()Check all validators, sets the error text if notNOTE: this stops at the first validator to report invalid. booleanhasValidators()MaterialMultiAutoCompleteTextViewaddValidator(METValidator validator)Adds a new validator to the View's list of validatorsThis will be checked with the others in validate voidclearValidators()voidsetOnFocusChangeListener(View.OnFocusChangeListener listener)booleanisCharactersCountValid()booleanonTouchEvent(MotionEvent event)-
Methods inherited from class androidx.appcompat.widget.AppCompatMultiAutoCompleteTextView
getSupportBackgroundTintList, getSupportBackgroundTintMode, getSupportCompoundDrawablesTintList, getSupportCompoundDrawablesTintMode, isEmojiCompatEnabled, onCreateInputConnection, setBackgroundDrawable, setBackgroundResource, setCompoundDrawables, setCompoundDrawablesRelative, setDropDownBackgroundResource, setEmojiCompatEnabled, setKeyListener, setSupportBackgroundTintList, setSupportBackgroundTintMode, setSupportCompoundDrawablesTintList, setSupportCompoundDrawablesTintMode, setTextAppearance -
Methods inherited from class android.widget.MultiAutoCompleteTextView
enoughToFilter, getAccessibilityClassName, performValidation, setTokenizer -
Methods inherited from class android.widget.AutoCompleteTextView
clearListSelection, dismissDropDown, getAdapter, getCompletionHint, getDropDownAnchor, getDropDownBackground, getDropDownHeight, getDropDownHorizontalOffset, getDropDownVerticalOffset, getDropDownWidth, getInputMethodMode, getItemClickListener, getItemSelectedListener, getListSelection, getOnItemClickListener, getOnItemSelectedListener, getThreshold, getValidator, isPerformingCompletion, isPopupShowing, onCommitCompletion, onFilterComplete, onKeyDown, onKeyPreIme, onKeyUp, onWindowFocusChanged, performCompletion, refreshAutoCompleteResults, setAdapter, setCompletionHint, setDropDownAnchor, setDropDownBackgroundDrawable, setDropDownHeight, setDropDownHorizontalOffset, setDropDownVerticalOffset, setDropDownWidth, setInputMethodMode, setListSelection, setOnClickListener, setOnDismissListener, setOnItemClickListener, setOnItemSelectedListener, setText, setThreshold, setValidator, showDropDown -
Methods inherited from class android.widget.EditText
extendSelection, getFreezesText, getText, isStyleShortcutEnabled, onKeyShortcut, onTextContextMenuItem, selectAll, setEllipsize, setSelection, setStyleShortcutsEnabled -
Methods inherited from class android.widget.TextView
addExtraDataToAccessibilityNodeInfo, addTextChangedListener, append, autofill, beginBatchEdit, bringPointIntoView, cancelLongPress, clearComposingText, computeScroll, debug, didTouchFocusSelect, drawableHotspotChanged, endBatchEdit, extractText, findViewsWithText, getAutoLinkMask, getAutoSizeMaxTextSize, getAutoSizeMinTextSize, getAutoSizeStepGranularity, getAutoSizeTextAvailableSizes, getAutoSizeTextType, getAutofillHints, getAutofillType, getAutofillValue, getBaseline, getBreakStrategy, getCompoundDrawablePadding, getCompoundDrawableTintBlendMode, getCompoundDrawableTintList, getCompoundDrawableTintMode, getCompoundDrawables, getCompoundDrawablesRelative, getCompoundPaddingBottom, getCompoundPaddingEnd, getCompoundPaddingLeft, getCompoundPaddingRight, getCompoundPaddingStart, getCompoundPaddingTop, getCurrentHintTextColor, getCurrentTextColor, getCustomInsertionActionModeCallback, getCustomSelectionActionModeCallback, getEditableText, getEllipsize, getError, getExtendedPaddingBottom, getExtendedPaddingTop, getFilters, getFirstBaselineToTopHeight, getFocusedRect, getFocusedSearchResultHighlightColor, getFocusedSearchResultIndex, getFontFeatureSettings, getFontVariationSettings, getGravity, getHighlightColor, getHighlights, getHint, getHintTextColors, getHyphenationFrequency, getImeActionId, getImeActionLabel, getImeHintLocales, getImeOptions, getIncludeFontPadding, getInputExtras, getInputType, getJustificationMode, getKeyListener, getLastBaselineToBottomHeight, getLayout, getLetterSpacing, getLineBounds, getLineBreakStyle, getLineBreakWordStyle, getLineCount, getLineHeight, getLineSpacingExtra, getLineSpacingMultiplier, getLinkTextColors, getLinksClickable, getMarqueeRepeatLimit, getMaxEms, getMaxHeight, getMaxLines, getMaxWidth, getMinEms, getMinHeight, getMinLines, getMinWidth, getMovementMethod, getOffsetForPosition, getPaint, getPaintFlags, getPrivateImeOptions, getSearchResultHighlightColor, getSearchResultHighlights, getSelectionEnd, getSelectionStart, getShadowColor, getShadowDx, getShadowDy, getShadowRadius, getShowSoftInputOnFocus, getText, getTextClassifier, getTextColors, getTextCursorDrawable, getTextDirectionHeuristic, getTextLocale, getTextLocales, getTextMetricsParams, getTextScaleX, getTextSelectHandle, getTextSelectHandleLeft, getTextSelectHandleRight, getTextSize, getTextSizeUnit, getTotalPaddingBottom, getTotalPaddingEnd, getTotalPaddingLeft, getTotalPaddingRight, getTotalPaddingStart, getTotalPaddingTop, getTransformationMethod, getTypeface, getUrls, hasOverlappingRendering, hasSelection, invalidateDrawable, isAllCaps, isAutoHandwritingEnabled, isCursorVisible, isElegantTextHeight, isFallbackLineSpacing, isHorizontallyScrollable, isInputMethodTarget, isSingleLine, isSuggestionsEnabled, isTextSelectable, jumpDrawablesToCurrentState, length, moveCursorToVisibleOffset, onBeginBatchEdit, onCheckIsTextEditor, onCommitCorrection, onCreateViewTranslationRequest, onDragEvent, onEditorAction, onEndBatchEdit, onGenericMotionEvent, onKeyMultiple, onPreDraw, onPrivateIMECommand, onReceiveContent, onResolvePointerIcon, onRestoreInstanceState, onRtlPropertiesChanged, onSaveInstanceState, onScreenStateChanged, onTouchEvent, onTrackballEvent, onVisibilityAggregated, performLongClick, removeTextChangedListener, sendAccessibilityEventUnchecked, setAllCaps, setAutoLinkMask, setAutoSizeTextTypeUniformWithConfiguration, setAutoSizeTextTypeUniformWithPresetSizes, setAutoSizeTextTypeWithDefaults, setBreakStrategy, setCompoundDrawablePadding, setCompoundDrawableTintBlendMode, setCompoundDrawableTintList, setCompoundDrawableTintMode, setCompoundDrawablesRelativeWithIntrinsicBounds, setCompoundDrawablesWithIntrinsicBounds, setCursorVisible, setCustomInsertionActionModeCallback, setCustomSelectionActionModeCallback, setEditableFactory, setElegantTextHeight, setEms, setEnabled, setError, setExtractedText, setFallbackLineSpacing, setFilters, setFirstBaselineToTopHeight, setFocusedSearchResultHighlightColor, setFocusedSearchResultIndex, setFontFeatureSettings, setFontVariationSettings, setFreezesText, setGravity, setHeight, setHighlightColor, setHighlights, setHint, setHintTextColor, setHorizontallyScrolling, setHyphenationFrequency, setImeActionLabel, setImeHintLocales, setImeOptions, setIncludeFontPadding, setInputExtras, setInputType, setJustificationMode, setLastBaselineToBottomHeight, setLetterSpacing, setLineBreakStyle, setLineBreakWordStyle, setLineHeight, setLineSpacing, setLines, setLinkTextColor, setLinksClickable, setMarqueeRepeatLimit, setMaxEms, setMaxHeight, setMaxLines, setMaxWidth, setMinEms, setMinHeight, setMinLines, setMinWidth, setMovementMethod, setOnEditorActionListener, setPadding, setPaddingRelative, setPaintFlags, setPrivateImeOptions, setRawInputType, setScroller, setSearchResultHighlightColor, setSearchResultHighlights, setSelectAllOnFocus, setSelected, setShadowLayer, setShowSoftInputOnFocus, setSingleLine, setSpannableFactory, setTextClassifier, setTextColor, setTextCursorDrawable, setTextIsSelectable, setTextKeepState, setTextLocale, setTextLocales, setTextMetricsParams, setTextScaleX, setTextSelectHandle, setTextSelectHandleLeft, setTextSelectHandleRight, setTextSize, setTransformationMethod, setTypeface, setWidth, showContextMenu -
Methods inherited from class android.view.View
addChildrenForAccessibility, addFocusables, addKeyboardNavigationClusters, addOnAttachStateChangeListener, addOnLayoutChangeListener, addOnUnhandledKeyEventListener, addTouchables, animate, announceForAccessibility, bringToFront, buildDrawingCache, buildLayer, callOnClick, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, cancelDragAndDrop, cancelPendingInputEvents, checkInputConnectionProxy, clearAnimation, clearFocus, clearViewTranslationCallback, combineMeasuredStates, computeSystemWindowInsets, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchCreateViewTranslationRequest, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPointerCaptureChanged, dispatchPopulateAccessibilityEvent, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchScrollCaptureSearch, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowInsetsAnimationEnd, dispatchWindowInsetsAnimationPrepare, dispatchWindowInsetsAnimationProgress, dispatchWindowInsetsAnimationStart, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, draw, findFocus, findOnBackInvokedDispatcher, findViewById, findViewWithTag, focusSearch, forceHasOverlappingRendering, forceLayout, gatherTransparentRegion, generateDisplayHash, generateViewId, getAccessibilityDelegate, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityPaneTitle, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAllowedHandwritingDelegatePackageName, getAllowedHandwritingDelegatorPackageName, getAlpha, getAnimation, getAnimationMatrix, getApplicationWindowToken, getAttributeResolutionStack, getAttributeSourceResourceMap, getAutofillId, getBackground, getBackgroundTintBlendMode, getBackgroundTintList, getBackgroundTintMode, getBottom, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentCaptureSession, getContentDescription, getContext, getDefaultFocusHighlightEnabled, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getExplicitStyle, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getForeground, getForegroundGravity, getForegroundTintBlendMode, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getHandler, getHandwritingBoundsOffsetBottom, getHandwritingBoundsOffsetLeft, getHandwritingBoundsOffsetRight, getHandwritingBoundsOffsetTop, getHandwritingDelegatorCallback, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarThumbDrawable, getHorizontalScrollbarTrackDrawable, getId, getImportantForAccessibility, getImportantForAutofill, getImportantForContentCapture, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInSurface, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineAmbientShadowColor, getOutlineProvider, getOutlineSpotShadowColor, getOverScrollMode, getOverlay, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getPreferKeepClearRects, getReceiveContentMimeTypes, getResources, getRevealOnFocusHint, getRight, getRootSurfaceControl, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollCaptureHint, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getSourceLayoutResId, getStateDescription, getStateListAnimator, getSystemGestureExclusionRects, getSystemUiVisibility, getTag, getTextAlignment, getTextDirection, getTooltipText, getTop, getTouchDelegate, getTouchables, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getUniqueDrawingId, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarThumbDrawable, getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth, getViewTranslationResponse, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowInsetsController, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocus, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOnLongClickListeners, hasPointerCapture, hasTransientState, hasWindowFocus, inflate, invalidate, invalidateOutline, isAccessibilityDataSensitive, isAccessibilityFocused, isAccessibilityHeading, isActivated, isAttachedToWindow, isClickable, isContextClickable, isCredential, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isForceDarkAllowed, isHandwritingDelegate, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isImportantForContentCapture, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingRelative, isPivotSet, isPreferKeepClear, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScreenReaderFocusable, isScrollContainer, isScrollbarFadingEnabled, isSelected, isShowingLayoutBounds, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVisibleToUserForAutofill, keyboardNavigationClusterSearch, layout, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCreateVirtualViewTranslationRequests, onDrawForeground, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyLongPress, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideContentCaptureStructure, onProvideStructure, onProvideVirtualStructure, onScrollCaptureSearch, onStartTemporaryDetach, onViewTranslationResponse, onVirtualViewTranslationResponses, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, performContextClick, performHapticFeedback, performReceiveContent, playSoundEffect, post, postDelayed, postInvalidate, postInvalidateDelayed, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, removeOnUnhandledKeyEventListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocusFromTouch, requestLayout, requestPointerCapture, requestRectangleOnScreen, requestUnbufferedDispatch, requireViewById, resetPivot, resolveSize, resolveSizeAndState, restoreDefaultFocus, restoreHierarchyState, saveAttributeDataForStyleable, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, setAccessibilityDataSensitive, setAccessibilityDelegate, setAccessibilityHeading, setAccessibilityLiveRegion, setAccessibilityPaneTitle, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAllowClickWhenDisabled, setAllowedHandwritingDelegatePackage, setAllowedHandwritingDelegatorPackage, setAlpha, setAnimation, setAnimationMatrix, setAutoHandwritingEnabled, setAutofillHints, setAutofillId, setBackground, setBackgroundColor, setBackgroundTintBlendMode, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentCaptureSession, setContentDescription, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForceDarkAllowed, setForeground, setForegroundGravity, setForegroundTintBlendMode, setForegroundTintList, setForegroundTintMode, setHandwritingBoundsOffsets, setHandwritingDelegatorCallback, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setImportantForContentCapture, setIsCredential, setIsHandwritingDelegate, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLeftTopRightBottom, setLongClickable, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnReceiveContentListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineAmbientShadowColor, setOutlineProvider, setOutlineSpotShadowColor, setOverScrollMode, setPivotX, setPivotY, setPointerIcon, setPreferKeepClear, setPreferKeepClearRects, setPressed, setRenderEffect, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScreenReaderFocusable, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollBarSize, setScrollBarStyle, setScrollCaptureCallback, setScrollCaptureHint, setScrollContainer, setScrollIndicators, setScrollX, setScrollY, setScrollbarFadingEnabled, setSoundEffectsEnabled, setStateDescription, setStateListAnimator, setSystemGestureExclusionRects, setSystemUiVisibility, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTouchDelegate, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVerticalScrollbarThumbDrawable, setVerticalScrollbarTrackDrawable, setViewTranslationCallback, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setWindowInsetsAnimationCallback, setX, setY, setZ, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, updateDragShadow, willNotCacheDrawing, willNotDraw -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
MaterialMultiAutoCompleteTextView
MaterialMultiAutoCompleteTextView(Context context)
-
MaterialMultiAutoCompleteTextView
MaterialMultiAutoCompleteTextView(Context context, AttributeSet attrs)
-
MaterialMultiAutoCompleteTextView
MaterialMultiAutoCompleteTextView(Context context, AttributeSet attrs, int style)
-
-
Method Detail
-
getFloatingLabelTextSize
int getFloatingLabelTextSize()
-
setFloatingLabelTextSize
void setFloatingLabelTextSize(int size)
-
getFloatingLabelTextColor
int getFloatingLabelTextColor()
-
setFloatingLabelTextColor
void setFloatingLabelTextColor(int color)
-
getBottomTextSize
int getBottomTextSize()
-
setBottomTextSize
void setBottomTextSize(int size)
-
getFloatingLabelPadding
int getFloatingLabelPadding()
-
setFloatingLabelPadding
void setFloatingLabelPadding(int padding)
-
setBaseColor
void setBaseColor(int color)
-
getInnerPaddingTop
int getInnerPaddingTop()
get inner top padding, not the real paddingTop
-
getInnerPaddingBottom
int getInnerPaddingBottom()
get inner bottom padding, not the real paddingBottom
-
getInnerPaddingLeft
int getInnerPaddingLeft()
get inner left padding, not the real paddingLeft
-
getInnerPaddingRight
int getInnerPaddingRight()
get inner right padding, not the real paddingRight
-
setPrimaryColor
void setPrimaryColor(int color)
-
getErrorColor
int getErrorColor()
-
setErrorColor
void setErrorColor(int color)
-
getMinCharacters
int getMinCharacters()
-
setMinCharacters
void setMinCharacters(int min)
-
getMaxCharacters
int getMaxCharacters()
-
setMaxCharacters
void setMaxCharacters(int max)
-
setSingleLineEllipsis
void setSingleLineEllipsis(boolean enabled)
-
setFloatingLabelAlwaysShown
void setFloatingLabelAlwaysShown(boolean floatingLabelAlwaysShown)
-
setHelperTextAlwaysShown
void setHelperTextAlwaysShown(boolean helperTextAlwaysShown)
-
getMinBottomTextLines
int getMinBottomTextLines()
-
setMinBottomTextLines
void setMinBottomTextLines(int lines)
-
getCurrentBottomLines
float getCurrentBottomLines()
-
setCurrentBottomLines
void setCurrentBottomLines(float currentBottomLines)
-
getHelperText
String getHelperText()
-
setHelperText
void setHelperText(CharSequence helperText)
-
getHelperTextColor
int getHelperTextColor()
-
setHelperTextColor
void setHelperTextColor(int color)
-
getFloatingLabelFraction
float getFloatingLabelFraction()
-
setFloatingLabelFraction
void setFloatingLabelFraction(float floatingLabelFraction)
-
getFocusFraction
float getFocusFraction()
-
setFocusFraction
void setFocusFraction(float focusFraction)
-
getAccentTypeface
@Nullable() Typeface getAccentTypeface()
-
setAccentTypeface
void setAccentTypeface(Typeface accentTypeface)
Set typeface used for the accent texts (floating label, error/helper text, character counter, etc.)
-
getFloatingLabelText
CharSequence getFloatingLabelText()
-
setFloatingLabelText
void setFloatingLabelText(@Nullable() CharSequence floatingLabelText)
Set the floating label text.
Pass null to force fallback to use hint's value.
-
setHideUnderline
void setHideUnderline(boolean hideUnderline)
Set whether or not to hide the underline (shown by default).
The positions of text below will be adjusted accordingly (error/helper text, character counter, ellipses, etc.)NOTE: You probably don't want to hide this if you have any subtext features of this enabled, as it can look weird to not have a dividing line between them.
-
getUnderlineColor
int getUnderlineColor()
get the color of the underline for normal state
-
setUnderlineColor
void setUnderlineColor(int color)
Set the color of the underline for normal state
-
setAutoValidate
void setAutoValidate(boolean autoValidate)
-
setFloatingLabelAnimating
void setFloatingLabelAnimating(boolean animating)
-
setValidateOnFocusLost
void setValidateOnFocusLost(boolean validate)
-
setShowClearButton
void setShowClearButton(boolean show)
-
getValidators
@Nullable() List<METValidator> getValidators()
-
setLengthChecker
void setLengthChecker(METLengthChecker lengthChecker)
-
setIconLeft
void setIconLeft(@DrawableRes() int res)
-
setIconLeft
void setIconLeft(Drawable drawable)
-
setIconLeft
void setIconLeft(Bitmap bitmap)
-
setIconRight
void setIconRight(@DrawableRes() int res)
-
setIconRight
void setIconRight(Drawable drawable)
-
setIconRight
void setIconRight(Bitmap bitmap)
-
isShowClearButton
boolean isShowClearButton()
-
isFloatingLabelAlwaysShown
boolean isFloatingLabelAlwaysShown()
-
isHelperTextAlwaysShown
boolean isHelperTextAlwaysShown()
-
isHideUnderline
boolean isHideUnderline()
-
setPadding
@Deprecated() final void setPadding(int left, int top, int right, int bottom)
use setPaddings instead, or the paddingTop and the paddingBottom may be set incorrectly.
-
setPaddings
void setPaddings(int left, int top, int right, int bottom)
Use this method instead of setPadding to automatically set the paddingTop and the paddingBottom correctly.
-
isValidateOnFocusLost
boolean isValidateOnFocusLost()
-
setMetTextColor
void setMetTextColor(int color)
Same function as setTextColor. (Directly overriding the built-in one could cause some error, so use this method instead.)
-
setMetTextColor
void setMetTextColor(ColorStateList colors)
Same function as setTextColor. (Directly overriding the built-in one could cause some error, so use this method instead.)
-
setMetHintTextColor
void setMetHintTextColor(int color)
Same function as setHintTextColor. (The built-in one is a final method that can't be overridden, so use this method instead.)
-
setMetHintTextColor
void setMetHintTextColor(ColorStateList colors)
Same function as setHintTextColor. (The built-in one is a final method that can't be overridden, so use this method instead.)
-
setFloatingLabel
void setFloatingLabel(int mode)
-
isFloatingLabelAnimating
boolean isFloatingLabelAnimating()
-
isAutoValidate
boolean isAutoValidate()
-
setError
void setError(CharSequence errorText)
-
getError
CharSequence getError()
-
isValid
@Deprecated() boolean isValid(String regex)
if the main text matches the regex
-
validate
@Deprecated() boolean validate(String regex, CharSequence errorText)
check if the main text matches the regex, and set the error text if not.
-
validateWith
boolean validateWith(@NonNull() METValidator validator)
Run validation on a single validator instance
- Parameters:
validator- Validator to check
-
validate
boolean validate()
Check all validators, sets the error text if not
NOTE: this stops at the first validator to report invalid.
-
hasValidators
boolean hasValidators()
-
addValidator
MaterialMultiAutoCompleteTextView addValidator(METValidator validator)
Adds a new validator to the View's list of validators
This will be checked with the others in validate- Parameters:
validator- Validator to add
-
clearValidators
void clearValidators()
-
setOnFocusChangeListener
void setOnFocusChangeListener(View.OnFocusChangeListener listener)
-
isCharactersCountValid
boolean isCharactersCountValid()
-
onTouchEvent
boolean onTouchEvent(MotionEvent event)
-
-
-
-