android官方API之TextInputLayout

来源:https://developer.android.com/reference/android/support/design/widget/TextInputLayout

TextInputLayout

public class TextInputLayout 
extends LinearLayout 

java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.LinearLayout
         ↳ android.support.design.widget.TextInputLayout

Layout which wraps an EditText (or descendant) to show a floating label when the hint is hidden due to the user inputting text.

Also supports showing an error via setErrorEnabled(boolean) and setError(CharSequence), and a character counter via setCounterEnabled(boolean).

Password visibility toggling is also supported via the setPasswordVisibilityToggleEnabled(boolean) API and related attribute. If enabled, a button is displayed to toggle between the password being displayed as plain-text or disguised, when your EditText is set to display a password.

Note: When using the password toggle functionality, the 'end' compound drawable of the EditText will be overridden while the toggle is enabled. To ensure that any existing drawables are restored correctly, you should set those compound drawables relatively (start/end), opposed to absolutely (left/right).

The TextInputEditText class is provided to be used as a child of this layout. Using TextInputEditText allows TextInputLayout greater control over the visual aspects of any text input. An example usage is as so:

 

<android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.design.widget.TextInputEditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/form_username"/> </android.support.design.widget.TextInputLayout>

Note: The actual view hierarchy present under TextInputLayout is NOT guaranteed to match the view hierarchy as written in XML. As a result, calls to getParent() on children of the TextInputLayout -- such as an TextInputEditText -- may not return the TextInputLayout itself, but rather an intermediate View. If you need to access a View directly, set an android:id and use findViewById(int).

Summary

XML attributes

TextInputLayout_android_hint  
TextInputLayout_counterEnabled  
TextInputLayout_counterMaxLength  
TextInputLayout_errorEnabled  
TextInputLayout_errorTextAppearance  
TextInputLayout_hintAnimationEnabled  
TextInputLayout_hintEnabled  
TextInputLayout_hintTextAppearance  
TextInputLayout_passwordToggleContentDescription  
TextInputLayout_passwordToggleDrawable  
TextInputLayout_passwordToggleEnabled  
TextInputLayout_passwordToggleTint  
TextInputLayout_passwordToggleTintMode  

Inherited constants

From class android.widget.LinearLayout
int HORIZONTAL
int SHOW_DIVIDER_BEGINNING
int SHOW_DIVIDER_END
int SHOW_DIVIDER_MIDDLE
int SHOW_DIVIDER_NONE
int VERTICAL
From class android.view.ViewGroup
int CLIP_TO_PADDING_MASK
int FOCUS_AFTER_DESCENDANTS
int FOCUS_BEFORE_DESCENDANTS
int FOCUS_BLOCK_DESCENDANTS
int LAYOUT_MODE_CLIP_BOUNDS
int LAYOUT_MODE_OPTICAL_BOUNDS
int PERSISTENT_ALL_CACHES
int PERSISTENT_ANIMATION_CACHE
int PERSISTENT_NO_CACHE
int PERSISTENT_SCROLLING_CACHE
From class android.view.View
int ACCESSIBILITY_LIVE_REGION_ASSERTIVE
int ACCESSIBILITY_LIVE_REGION_NONE
int ACCESSIBILITY_LIVE_REGION_POLITE
int AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS
String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE
String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY
String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH
String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR
String AUTOFILL_HINT_CREDIT_CARD_NUMBER
String AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE
String AUTOFILL_HINT_EMAIL_ADDRESS
String AUTOFILL_HINT_NAME
String AUTOFILL_HINT_PASSWORD
String AUTOFILL_HINT_PHONE
String AUTOFILL_HINT_POSTAL_ADDRESS
String AUTOFILL_HINT_POSTAL_CODE
String AUTOFILL_HINT_USERNAME
int AUTOFILL_TYPE_DATE
int AUTOFILL_TYPE_LIST
int AUTOFILL_TYPE_NONE
int AUTOFILL_TYPE_TEXT
int AUTOFILL_TYPE_TOGGLE
int DRAG_FLAG_GLOBAL
int DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION
int DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION
int DRAG_FLAG_GLOBAL_URI_READ
int DRAG_FLAG_GLOBAL_URI_WRITE
int DRAG_FLAG_OPAQUE
int DRAWING_CACHE_QUALITY_AUTO
int DRAWING_CACHE_QUALITY_HIGH
int DRAWING_CACHE_QUALITY_LOW
int FIND_VIEWS_WITH_CONTENT_DESCRIPTION
int FIND_VIEWS_WITH_TEXT
int FOCUSABLE
int FOCUSABLES_ALL
int FOCUSABLES_TOUCH_MODE
int FOCUSABLE_AUTO
int FOCUS_BACKWARD
int FOCUS_DOWN
int FOCUS_FORWARD
int FOCUS_LEFT
int FOCUS_RIGHT
int FOCUS_UP
int GONE
int HAPTIC_FEEDBACK_ENABLED
int IMPORTANT_FOR_ACCESSIBILITY_AUTO
int IMPORTANT_FOR_ACCESSIBILITY_NO
int IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
int IMPORTANT_FOR_ACCESSIBILITY_YES
int IMPORTANT_FOR_AUTOFILL_AUTO
int IMPORTANT_FOR_AUTOFILL_NO
int IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS
int IMPORTANT_FOR_AUTOFILL_YES
int IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS
int INVISIBLE
int KEEP_SCREEN_ON
int LAYER_TYPE_HARDWARE
int LAYER_TYPE_NONE
int LAYER_TYPE_SOFTWARE
int LAYOUT_DIRECTION_INHERIT
int LAYOUT_DIRECTION_LOCALE
int LAYOUT_DIRECTION_LTR
int LAYOUT_DIRECTION_RTL
int MEASURED_HEIGHT_STATE_SHIFT
int MEASURED_SIZE_MASK
int MEASURED_STATE_MASK
int MEASURED_STATE_TOO_SMALL
int NOT_FOCUSABLE
int NO_ID
int OVER_SCROLL_ALWAYS
int OVER_SCROLL_IF_CONTENT_SCROLLS
int OVER_SCROLL_NEVER
int SCREEN_STATE_OFF
int SCREEN_STATE_ON
int SCROLLBARS_INSIDE_INSET
int SCROLLBARS_INSIDE_OVERLAY
int SCROLLBARS_OUTSIDE_INSET
int SCROLLBARS_OUTSIDE_OVERLAY
int SCROLLBAR_POSITION_DEFAULT
int SCROLLBAR_POSITION_LEFT
int SCROLLBAR_POSITION_RIGHT
int SCROLL_AXIS_HORIZONTAL
int SCROLL_AXIS_NONE
int SCROLL_AXIS_VERTICAL
int SCROLL_INDICATOR_BOTTOM
int SCROLL_INDICATOR_END
int SCROLL_INDICATOR_LEFT
int SCROLL_INDICATOR_RIGHT
int SCROLL_INDICATOR_START
int SCROLL_INDICATOR_TOP
int SOUND_EFFECTS_ENABLED
int STATUS_BAR_HIDDEN
int STATUS_BAR_VISIBLE
int SYSTEM_UI_FLAG_FULLSCREEN
int SYSTEM_UI_FLAG_HIDE_NAVIGATION
int SYSTEM_UI_FLAG_IMMERSIVE
int SYSTEM_UI_FLAG_IMMERSIVE_STICKY
int SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
int SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
int SYSTEM_UI_FLAG_LAYOUT_STABLE
int SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
int SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
int SYSTEM_UI_FLAG_LOW_PROFILE
int SYSTEM_UI_FLAG_VISIBLE
int SYSTEM_UI_LAYOUT_FLAGS
int TEXT_ALIGNMENT_CENTER
int TEXT_ALIGNMENT_GRAVITY
int TEXT_ALIGNMENT_INHERIT
int TEXT_ALIGNMENT_TEXT_END
int TEXT_ALIGNMENT_TEXT_START
int TEXT_ALIGNMENT_VIEW_END
int TEXT_ALIGNMENT_VIEW_START
int TEXT_DIRECTION_ANY_RTL
int TEXT_DIRECTION_FIRST_STRONG
int TEXT_DIRECTION_FIRST_STRONG_LTR
int TEXT_DIRECTION_FIRST_STRONG_RTL
int TEXT_DIRECTION_INHERIT
int TEXT_DIRECTION_LOCALE
int TEXT_DIRECTION_LTR
int TEXT_DIRECTION_RTL
String VIEW_LOG_TAG
int VISIBLE

Inherited fields

From class android.view.View
public static final Property<View, Float> ALPHA
protected static final int[] EMPTY_STATE_SET
protected static final int[] ENABLED_FOCUSED_SELECTED_STATE_SET
protected static final int[] ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET
protected static final int[] ENABLED_FOCUSED_STATE_SET
protected static final int[] ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET
protected static final int[] ENABLED_SELECTED_STATE_SET
protected static final int[] ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET
protected static final int[] ENABLED_STATE_SET
protected static final int[] ENABLED_WINDOW_FOCUSED_STATE_SET
protected static final int[] FOCUSED_SELECTED_STATE_SET
protected static final int[] FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET
protected static final int[] FOCUSED_STATE_SET
protected static final int[] FOCUSED_WINDOW_FOCUSED_STATE_SET
protected static final int[] PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET
protected static final int[] PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET
protected static final int[] PRESSED_ENABLED_FOCUSED_STATE_SET
protected static final int[] PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET
protected static final int[] PRESSED_ENABLED_SELECTED_STATE_SET
protected static final int[] PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET
protected static final int[] PRESSED_ENABLED_STATE_SET
protected static final int[] PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET
protected static final int[] PRESSED_FOCUSED_SELECTED_STATE_SET
protected static final int[] PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET
protected static final int[] PRESSED_FOCUSED_STATE_SET
protected static final int[] PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET
protected static final int[] PRESSED_SELECTED_STATE_SET
protected static final int[] PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET
protected static final int[] PRESSED_STATE_SET
protected static final int[] PRESSED_WINDOW_FOCUSED_STATE_SET
public static final Property<View, Float> ROTATION
public static final Property<View, Float> ROTATION_X
public static final Property<View, Float> ROTATION_Y
public static final Property<View, Float> SCALE_X
public static final Property<View, Float> SCALE_Y
protected static final int[] SELECTED_STATE_SET
protected static final int[] SELECTED_WINDOW_FOCUSED_STATE_SET
public static final Property<View, Float> TRANSLATION_X
public static final Property<View, Float> TRANSLATION_Y
public static final Property<View, Float> TRANSLATION_Z
protected static final int[] WINDOW_FOCUSED_STATE_SET
public static final Property<View, Float> X
public static final Property<View, Float> Y
public static final Property<View, Float> Z

Public constructors

TextInputLayout(Context context)
TextInputLayout(Context context, AttributeSet attrs)
TextInputLayout(Context context, AttributeSet attrs, int defStyleAttr)

Public methods

void addView(View child, int index, ViewGroup.LayoutParams params)
void dispatchProvideAutofillStructure(ViewStructure structure, int flags)
void draw(Canvas canvas)
int getCounterMaxLength()

Returns the max length shown at the character counter.

EditText getEditText()

Returns the EditText used for text input.

CharSequence getError()

Returns the error message that was set to be displayed with setError(CharSequence), or nullif no error was set or if error displaying is not enabled.

CharSequence getHint()

Returns the hint which is displayed in the floating label, if enabled.

CharSequence getPasswordVisibilityToggleContentDescription()

Returns the currently configured content description for the password visibility toggle button.

Drawable getPasswordVisibilityToggleDrawable()

Returns the icon currently used for the password visibility toggle button.

Typeface getTypeface()

Returns the typeface used for the hint and any label views (such as counter and error views).

boolean isCounterEnabled()

Returns whether the character counter functionality is enabled or not in this layout.

boolean isErrorEnabled()

Returns whether the error functionality is enabled or not in this layout.

boolean isHintAnimationEnabled()

Returns whether any hint state changes, due to being focused or non-empty text, are animated.

boolean isHintEnabled()

Returns whether the floating label functionality is enabled or not in this layout.

boolean isPasswordVisibilityToggleEnabled()

Returns whether the password visibility toggle functionality is currently enabled.

Parcelable onSaveInstanceState()
void setCounterEnabled(boolean enabled)

Whether the character counter functionality is enabled or not in this layout.

void setCounterMaxLength(int maxLength)

Sets the max length to display at the character counter.

void setEnabled(boolean enabled)
void setError(CharSequence error)

Sets an error message that will be displayed below our EditText.

void setErrorEnabled(boolean enabled)

Whether the error functionality is enabled or not in this layout.

void setErrorTextAppearance(int resId)

Sets the text color and size for the error message from the specified TextAppearance resource.

void setHint(CharSequence hint)

Set the hint to be displayed in the floating label, if enabled.

void setHintAnimationEnabled(boolean enabled)

Set whether any hint state changes, due to being focused or non-empty text, are animated.

void setHintEnabled(boolean enabled)

Sets whether the floating label functionality is enabled or not in this layout.

void setHintTextAppearance(int resId)

Sets the hint text color, size, style from the specified TextAppearance resource.

void setPasswordVisibilityToggleContentDescription(CharSequence description)

Set a content description for the navigation button if one is present.

void setPasswordVisibilityToggleContentDescription(int resId)

Set a content description for the navigation button if one is present.

void setPasswordVisibilityToggleDrawable(int resId)

Set the icon to use for the password visibility toggle button.

void setPasswordVisibilityToggleDrawable(Drawable icon)

Set the icon to use for the password visibility toggle button.

void setPasswordVisibilityToggleEnabled(boolean enabled)

Returns whether the password visibility toggle functionality is enabled or not.

void setPasswordVisibilityToggleTintList(ColorStateList tintList)

Applies a tint to the the password visibility toggle drawable.

void setPasswordVisibilityToggleTintMode(PorterDuff.Mode mode)

Specifies the blending mode used to apply the tint specified bysetPasswordVisibilityToggleTintList(ColorStateList) to the password visibility toggle drawable.

void setTypeface(Typeface typeface)

Set the typeface to use for the hint and any label views (such as counter and error views).

Protected methods

void dispatchRestoreInstanceState(SparseArray<Parcelable> container)
void drawableStateChanged()
void onLayout(boolean changed, int left, int top, int right, int bottom)
void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
void onRestoreInstanceState(Parcelable state)

Inherited methods

From class android.widget.LinearLayout
boolean checkLayoutParams(ViewGroup.LayoutParams arg0)
ViewGroup.LayoutParams generateDefaultLayoutParams()
ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams arg0)
ViewGroup.LayoutParams generateLayoutParams(AttributeSet arg0)
CharSequence getAccessibilityClassName()
int getBaseline()
int getBaselineAlignedChildIndex()
Drawable getDividerDrawable()
int getDividerPadding()
int getGravity()
int getOrientation()
int getShowDividers()
float getWeightSum()
boolean isBaselineAligned()
boolean isMeasureWithLargestChildEnabled()
void onDraw(Canvas arg0)
void onLayout(boolean arg0, int arg1, int arg2, int arg3, int arg4)
void onMeasure(int arg0, int arg1)
void onRtlPropertiesChanged(int arg0)
void setBaselineAligned(boolean arg0)
void setBaselineAlignedChildIndex(int arg0)
void setDividerDrawable(Drawable arg0)
void setDividerPadding(int arg0)
void setGravity(int arg0)
void setHorizontalGravity(int arg0)
void setMeasureWithLargestChildEnabled(boolean arg0)
void setOrientation(int arg0)
void setShowDividers(int arg0)
void setVerticalGravity(int arg0)
void setWeightSum(float arg0)
boolean shouldDelayChildPressedState()
From class android.view.ViewGroup
void addChildrenForAccessibility(ArrayList<View> arg0)
void addFocusables(ArrayList<View> arg0, int arg1, int arg2)
void addKeyboardNavigationClusters(Collection<View> arg0, int arg1)
boolean addStatesFromChildren()
void addTouchables(ArrayList<View> arg0)
void addView(View arg0, ViewGroup.LayoutParams arg1)
void addView(View arg0, int arg1)
void addView(View arg0, int arg1, ViewGroup.LayoutParams arg2)
void addView(View arg0)
void addView(View arg0, int arg1, int arg2)
boolean addViewInLayout(View arg0, int arg1, ViewGroup.LayoutParams arg2,boolean arg3)
boolean addViewInLayout(View arg0, int arg1, ViewGroup.LayoutParams arg2)
void attachLayoutAnimationParameters(View arg0, ViewGroup.LayoutParamsarg1, int arg2, int arg3)
void attachViewToParent(View arg0, int arg1, ViewGroup.LayoutParams arg2)
void bringChildToFront(View arg0)
boolean canAnimate()
boolean checkLayoutParams(ViewGroup.LayoutParams arg0)
void childDrawableStateChanged(View arg0)
void childHasTransientStateChanged(View arg0, boolean arg1)
void cleanupLayoutState(View arg0)
void clearChildFocus(View arg0)
void clearDisappearingChildren()
void clearFocus()
void debug(int arg0)
void detachAllViewsFromParent()
void detachViewFromParent(int arg0)
void detachViewFromParent(View arg0)
void detachViewsFromParent(int arg0, int arg1)
WindowInsets dispatchApplyWindowInsets(WindowInsets arg0)
boolean dispatchCapturedPointerEvent(MotionEvent arg0)
void dispatchConfigurationChanged(Configuration arg0)
void dispatchDisplayHint(int arg0)
boolean dispatchDragEvent(DragEvent arg0)
void dispatchDraw(Canvas arg0)
void dispatchDrawableHotspotChanged(float arg0, float arg1)
void dispatchFreezeSelfOnly(SparseArray<Parcelable> arg0)
boolean dispatchGenericFocusedEvent(MotionEvent arg0)
boolean dispatchGenericPointerEvent(MotionEvent arg0)
boolean dispatchHoverEvent(MotionEvent arg0)
boolean dispatchKeyEvent(KeyEvent arg0)
boolean dispatchKeyEventPreIme(KeyEvent arg0)
boolean dispatchKeyShortcutEvent(KeyEvent arg0)
void dispatchPointerCaptureChanged(boolean arg0)
void dispatchProvideAutofillStructure(ViewStructure arg0, int arg1)
void dispatchProvideStructure(ViewStructure arg0)
void dispatchRestoreInstanceState(SparseArray<Parcelable> arg0)
void dispatchSaveInstanceState(SparseArray<Parcelable> arg0)
void dispatchSetActivated(boolean arg0)
void dispatchSetPressed(boolean arg0)
void dispatchSetSelected(boolean arg0)
void dispatchSystemUiVisibilityChanged(int arg0)
void dispatchThawSelfOnly(SparseArray<Parcelable> arg0)
boolean dispatchTouchEvent(MotionEvent arg0)
boolean dispatchTrackballEvent(MotionEvent arg0)
boolean dispatchUnhandledMove(View arg0, int arg1)
void dispatchVisibilityChanged(View arg0, int arg1)
void dispatchWindowFocusChanged(boolean arg0)
void dispatchWindowSystemUiVisiblityChanged(int arg0)
void dispatchWindowVisibilityChanged(int arg0)
boolean drawChild(Canvas arg0, View arg1, long arg2)
void drawableStateChanged()
void endViewTransition(View arg0)
View findFocus()
void findViewsWithText(ArrayList<View> arg0, CharSequence arg1, int arg2)
View focusSearch(View arg0, int arg1)
void focusableViewAvailable(View arg0)
boolean gatherTransparentRegion(Region arg0)
ViewGroup.LayoutParams generateDefaultLayoutParams()
ViewGroup.LayoutParams generateLayoutParams(AttributeSet arg0)
ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams arg0)
CharSequence getAccessibilityClassName()
View getChildAt(int arg0)
int getChildCount()
int getChildDrawingOrder(int arg0, int arg1)
static int getChildMeasureSpec(int arg0, int arg1, int arg2)
boolean getChildStaticTransformation(View arg0, Transformation arg1)
boolean getChildVisibleRect(View arg0, Rect arg1, Point arg2)
boolean getClipChildren()
boolean getClipToPadding()
int getDescendantFocusability()
View getFocusedChild()
LayoutAnimationController getLayoutAnimation()
Animation.AnimationListener getLayoutAnimationListener()
int getLayoutMode()
LayoutTransition getLayoutTransition()
int getNestedScrollAxes()
ViewOverlay getOverlay()
int getPersistentDrawingCache()
boolean getTouchscreenBlocksFocus()
boolean hasFocus()
boolean hasTransientState()
int indexOfChild(View arg0)
final void invalidateChild(View arg0, Rect arg1)
ViewParent invalidateChildInParent(int[] arg0, Rect arg1)
boolean isAlwaysDrawnWithCacheEnabled()
boolean isAnimationCacheEnabled()
boolean isChildrenDrawingOrderEnabled()
boolean isChildrenDrawnWithCacheEnabled()
boolean isMotionEventSplittingEnabled()
boolean isTransitionGroup()
void jumpDrawablesToCurrentState()
final void layout(int arg0, int arg1, int arg2, int arg3)
void measureChild(View arg0, int arg1, int arg2)
void measureChildWithMargins(View arg0, int arg1, int arg2, int arg3, int arg4)
void measureChildren(int arg0, int arg1)
void notifySubtreeAccessibilityStateChanged(View arg0, View arg1, int arg2)
final void offsetDescendantRectToMyCoords(View arg0, Rect arg1)
final void offsetRectIntoDescendantCoords(View arg0, Rect arg1)
void onAttachedToWindow()
int[] onCreateDrawableState(int arg0)
void onDescendantInvalidated(View arg0, View arg1)
void onDetachedFromWindow()
boolean onInterceptHoverEvent(MotionEvent arg0)
boolean onInterceptTouchEvent(MotionEvent arg0)
abstract void onLayout(boolean arg0, int arg1, int arg2, int arg3, int arg4)
boolean onNestedFling(View arg0, float arg1, float arg2, boolean arg3)
boolean onNestedPreFling(View arg0, float arg1, float arg2)
boolean onNestedPrePerformAccessibilityAction(View arg0, int arg1, Bundlearg2)
void onNestedPreScroll(View arg0, int arg1, int arg2, int[] arg3)
void onNestedScroll(View arg0, int arg1, int arg2, int arg3, int arg4)
void onNestedScrollAccepted(View arg0, View arg1, int arg2)
boolean onRequestFocusInDescendants(int arg0, Rect arg1)
boolean onRequestSendAccessibilityEvent(View arg0, AccessibilityEvent arg1)
PointerIcon onResolvePointerIcon(MotionEvent arg0, int arg1)
boolean onStartNestedScroll(View arg0, View arg1, int arg2)
void onStopNestedScroll(View arg0)
void onViewAdded(View arg0)
void onViewRemoved(View arg0)
void recomputeViewAttributes(View arg0)
void removeAllViews()
void removeAllViewsInLayout()
void removeDetachedView(View arg0, boolean arg1)
void removeView(View arg0)
void removeViewAt(int arg0)
void removeViewInLayout(View arg0)
void removeViews(int arg0, int arg1)
void removeViewsInLayout(int arg0, int arg1)
void requestChildFocus(View arg0, View arg1)
boolean requestChildRectangleOnScreen(View arg0, Rect arg1, boolean arg2)
void requestDisallowInterceptTouchEvent(boolean arg0)
boolean requestFocus(int arg0, Rect arg1)
boolean requestSendAccessibilityEvent(View arg0, AccessibilityEvent arg1)
void requestTransparentRegion(View arg0)
boolean restoreDefaultFocus()
void scheduleLayoutAnimation()
void setAddStatesFromChildren(boolean arg0)
void setAlwaysDrawnWithCacheEnabled(boolean arg0)
void setAnimationCacheEnabled(boolean arg0)
void setChildrenDrawingCacheEnabled(boolean arg0)
void setChildrenDrawingOrderEnabled(boolean arg0)
void setChildrenDrawnWithCacheEnabled(boolean arg0)
void setClipChildren(boolean arg0)
void setClipToPadding(boolean arg0)
void setDescendantFocusability(int arg0)
void setLayoutAnimation(LayoutAnimationController arg0)
void setLayoutAnimationListener(Animation.AnimationListener arg0)
void setLayoutMode(int arg0)
void setLayoutTransition(LayoutTransition arg0)
void setMotionEventSplittingEnabled(boolean arg0)
void setOnHierarchyChangeListener(ViewGroup.OnHierarchyChangeListener arg0)
void setPersistentDrawingCache(int arg0)
void setStaticTransformationsEnabled(boolean arg0)
void setTouchscreenBlocksFocus(boolean arg0)
void setTransitionGroup(boolean arg0)
boolean shouldDelayChildPressedState()
boolean showContextMenuForChild(View arg0, float arg1, float arg2)
boolean showContextMenuForChild(View arg0)
ActionMode startActionModeForChild(View arg0, ActionMode.Callback arg1, int arg2)
ActionMode startActionModeForChild(View arg0, ActionMode.Callback arg1)
void startLayoutAnimation()
void startViewTransition(View arg0)
void updateViewLayout(View arg0, ViewGroup.LayoutParams arg1)
From class android.view.View
void addChildrenForAccessibility(ArrayList<View> arg0)
void addExtraDataToAccessibilityNodeInfo(AccessibilityNodeInfo arg0, String arg1, Bundle arg2)
void addFocusables(ArrayList<View> arg0, int arg1)
void addFocusables(ArrayList<View> arg0, int arg1, int arg2)
void addKeyboardNavigationClusters(Collection<View> arg0, int arg1)
void addOnAttachStateChangeListener(View.OnAttachStateChangeListener arg0)
void addOnLayoutChangeListener(View.OnLayoutChangeListener arg0)
void addTouchables(ArrayList<View> arg0)
ViewPropertyAnimator animate()
void announceForAccessibility(CharSequence arg0)
void autofill(AutofillValue arg0)
void autofill(SparseArray<AutofillValue> arg0)
boolean awakenScrollBars(int arg0, boolean arg1)
boolean awakenScrollBars(int arg0)
boolean awakenScrollBars()
void bringToFront()
void buildDrawingCache(boolean arg0)
void buildDrawingCache()
void buildLayer()
boolean callOnClick()
boolean canResolveLayoutDirection()
boolean canResolveTextAlignment()
boolean canResolveTextDirection()
boolean canScrollHorizontally(int arg0)
boolean canScrollVertically(int arg0)
final void cancelDragAndDrop()
void cancelLongPress()
final void cancelPendingInputEvents()
boolean checkInputConnectionProxy(View arg0)
void clearAnimation()
void clearFocus()
static int combineMeasuredStates(int arg0, int arg1)
int computeHorizontalScrollExtent()
int computeHorizontalScrollOffset()
int computeHorizontalScrollRange()
void computeScroll()
WindowInsets computeSystemWindowInsets(WindowInsets arg0, Rect arg1)
int computeVerticalScrollExtent()
int computeVerticalScrollOffset()
int computeVerticalScrollRange()
AccessibilityNodeInfo createAccessibilityNodeInfo()
void createContextMenu(ContextMenu arg0)
void destroyDrawingCache()
WindowInsets dispatchApplyWindowInsets(WindowInsets arg0)
boolean dispatchCapturedPointerEvent(MotionEvent arg0)
void dispatchConfigurationChanged(Configuration arg0)
void dispatchDisplayHint(int arg0)
boolean dispatchDragEvent(DragEvent arg0)
void dispatchDraw(Canvas arg0)
void dispatchDrawableHotspotChanged(float arg0, float arg1)
void dispatchFinishTemporaryDetach()
boolean dispatchGenericFocusedEvent(MotionEvent arg0)
boolean dispatchGenericMotionEvent(MotionEvent arg0)
boolean dispatchGenericPointerEvent(MotionEvent arg0)
boolean dispatchHoverEvent(MotionEvent arg0)
boolean dispatchKeyEvent(KeyEvent arg0)
boolean dispatchKeyEventPreIme(KeyEvent arg0)
boolean dispatchKeyShortcutEvent(KeyEvent arg0)
boolean dispatchNestedFling(float arg0, float arg1, boolean arg2)
boolean dispatchNestedPreFling(float arg0, float arg1)
boolean dispatchNestedPrePerformAccessibilityAction(int arg0, Bundle arg1)
boolean dispatchNestedPreScroll(int arg0, int arg1, int[] arg2, int[] arg3)
boolean dispatchNestedScroll(int arg0, int arg1, int arg2, int arg3, int[] arg4)
void dispatchPointerCaptureChanged(boolean arg0)
boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent arg0)
void dispatchProvideAutofillStructure(ViewStructure arg0, int arg1)
void dispatchProvideStructure(ViewStructure arg0)
void dispatchRestoreInstanceState(SparseArray<Parcelable> arg0)
void dispatchSaveInstanceState(SparseArray<Parcelable> arg0)
void dispatchSetActivated(boolean arg0)
void dispatchSetPressed(boolean arg0)
void dispatchSetSelected(boolean arg0)
void dispatchStartTemporaryDetach()
void dispatchSystemUiVisibilityChanged(int arg0)
boolean dispatchTouchEvent(MotionEvent arg0)
boolean dispatchTrackballEvent(MotionEvent arg0)
boolean dispatchUnhandledMove(View arg0, int arg1)
void dispatchVisibilityChanged(View arg0, int arg1)
void dispatchWindowFocusChanged(boolean arg0)
void dispatchWindowSystemUiVisiblityChanged(int arg0)
void dispatchWindowVisibilityChanged(int arg0)
void draw(Canvas arg0)
void drawableHotspotChanged(float arg0, float arg1)
void drawableStateChanged()
View findFocus()
final <T extends View> T findViewById(int arg0)
final <T extends View> T findViewWithTag(Object arg0)
void findViewsWithText(ArrayList<View> arg0, CharSequence arg1, int arg2)
boolean fitSystemWindows(Rect arg0)
View focusSearch(int arg0)
void forceHasOverlappingRendering(boolean arg0)
void forceLayout()
static int generateViewId()
CharSequence getAccessibilityClassName()
int getAccessibilityLiveRegion()
AccessibilityNodeProvider getAccessibilityNodeProvider()
int getAccessibilityTraversalAfter()
int getAccessibilityTraversalBefore()
float getAlpha()
Animation getAnimation()
IBinder getApplicationWindowToken()
String[] getAutofillHints()
final AutofillId getAutofillId()
int getAutofillType()
AutofillValue getAutofillValue()
Drawable getBackground()
ColorStateList getBackgroundTintList()
PorterDuff.Mode getBackgroundTintMode()
int getBaseline()
final int getBottom()
float getBottomFadingEdgeStrength()
int getBottomPaddingOffset()
float getCameraDistance()
boolean getClipBounds(Rect arg0)
Rect getClipBounds()
final boolean getClipToOutline()
CharSequence getContentDescription()
final Context getContext()
ContextMenu.ContextMenuInfo getContextMenuInfo()
final boolean getDefaultFocusHighlightEnabled()
static int getDefaultSize(int arg0, int arg1)
Display getDisplay()
final int[] getDrawableState()
Bitmap getDrawingCache()
Bitmap getDrawingCache(boolean arg0)
int getDrawingCacheBackgroundColor()
int getDrawingCacheQuality()
void getDrawingRect(Rect arg0)
long getDrawingTime()
float getElevation()
boolean getFilterTouchesWhenObscured()
boolean getFitsSystemWindows()
int getFocusable()
ArrayList<View> getFocusables(int arg0)
void getFocusedRect(Rect arg0)
Drawable getForeground()
int getForegroundGravity()
ColorStateList getForegroundTintList()
PorterDuff.Mode getForegroundTintMode()
final boolean getGlobalVisibleRect(Rect arg0)
boolean getGlobalVisibleRect(Rect arg0, Point arg1)
Handler getHandler()
final boolean getHasOverlappingRendering()
final int getHeight()
void getHitRect(Rect arg0)
int getHorizontalFadingEdgeLength()
int getHorizontalScrollbarHeight()
int getId()
int getImportantForAccessibility()
int getImportantForAutofill()
boolean getKeepScreenOn()
KeyEvent.DispatcherState getKeyDispatcherState()
int getLabelFor()
int getLayerType()
int getLayoutDirection()
ViewGroup.LayoutParams getLayoutParams()
final int getLeft()
float getLeftFadingEdgeStrength()
int getLeftPaddingOffset()
final boolean getLocalVisibleRect(Rect arg0)
void getLocationInWindow(int[] arg0)
void getLocationOnScreen(int[] arg0)
Matrix getMatrix()
final int getMeasuredHeight()
final int getMeasuredHeightAndState()
final int getMeasuredState()
final int getMeasuredWidth()
final int getMeasuredWidthAndState()
int getMinimumHeight()
int getMinimumWidth()
int getNextClusterForwardId()
int getNextFocusDownId()
int getNextFocusForwardId()
int getNextFocusLeftId()
int getNextFocusRightId()
int getNextFocusUpId()
View.OnFocusChangeListener getOnFocusChangeListener()
ViewOutlineProvider getOutlineProvider()
int getOverScrollMode()
ViewOverlay getOverlay()
int getPaddingBottom()
int getPaddingEnd()
int getPaddingLeft()
int getPaddingRight()
int getPaddingStart()
int getPaddingTop()
final ViewParent getParent()
ViewParent getParentForAccessibility()
float getPivotX()
float getPivotY()
PointerIcon getPointerIcon()
Resources getResources()
final boolean getRevealOnFocusHint()
final int getRight()
float getRightFadingEdgeStrength()
int getRightPaddingOffset()
View getRootView()
WindowInsets getRootWindowInsets()
float getRotation()
float getRotationX()
float getRotationY()
float getScaleX()
float getScaleY()
int getScrollBarDefaultDelayBeforeFade()
int getScrollBarFadeDuration()
int getScrollBarSize()
int getScrollBarStyle()
int getScrollIndicators()
final int getScrollX()
final int getScrollY()
int getSolidColor()
StateListAnimator getStateListAnimator()
int getSuggestedMinimumHeight()
int getSuggestedMinimumWidth()
int getSystemUiVisibility()
Object getTag()
Object getTag(int arg0)
int getTextAlignment()
int getTextDirection()
CharSequence getTooltipText()
final int getTop()
float getTopFadingEdgeStrength()
int getTopPaddingOffset()
TouchDelegate getTouchDelegate()
ArrayList<View> getTouchables()
String getTransitionName()
float getTranslationX()
float getTranslationY()
float getTranslationZ()
int getVerticalFadingEdgeLength()
int getVerticalScrollbarPosition()
int getVerticalScrollbarWidth()
ViewTreeObserver getViewTreeObserver()
int getVisibility()
final int getWidth()
int getWindowAttachCount()
WindowId getWindowId()
int getWindowSystemUiVisibility()
IBinder getWindowToken()
int getWindowVisibility()
void getWindowVisibleDisplayFrame(Rect arg0)
float getX()
float getY()
float getZ()
boolean hasExplicitFocusable()
boolean hasFocus()
boolean hasFocusable()
boolean hasNestedScrollingParent()
boolean hasOnClickListeners()
boolean hasOverlappingRendering()
boolean hasPointerCapture()
boolean hasTransientState()
boolean hasWindowFocus()
static View inflate(Context arg0, int arg1, ViewGroup arg2)
void invalidate()
void invalidate(Rect arg0)
void invalidate(int arg0, int arg1, int arg2, int arg3)
void invalidateDrawable(Drawable arg0)
void invalidateOutline()
boolean isAccessibilityFocused()
boolean isActivated()
boolean isAttachedToWindow()
boolean isClickable()
boolean isContextClickable()
boolean isDirty()
boolean isDrawingCacheEnabled()
boolean isDuplicateParentStateEnabled()
boolean isEnabled()
final boolean isFocusable()
final boolean isFocusableInTouchMode()
boolean isFocused()
final boolean isFocusedByDefault()
boolean isHapticFeedbackEnabled()
boolean isHardwareAccelerated()
boolean isHorizontalFadingEdgeEnabled()
boolean isHorizontalScrollBarEnabled()
boolean isHovered()
boolean isImportantForAccessibility()
final boolean isImportantForAutofill()
boolean isInEditMode()
boolean isInLayout()
boolean isInTouchMode()
final boolean isKeyboardNavigationCluster()
boolean isLaidOut()
boolean isLayoutDirectionResolved()
boolean isLayoutRequested()
boolean isLongClickable()
boolean isNestedScrollingEnabled()
boolean isOpaque()
boolean isPaddingOffsetRequired()
boolean isPaddingRelative()
boolean isPressed()
boolean isSaveEnabled()
boolean isSaveFromParentEnabled()
boolean isScrollContainer()
boolean isScrollbarFadingEnabled()
boolean isSelected()
boolean isShown()
boolean isSoundEffectsEnabled()
final boolean isTemporarilyDetached()
boolean isTextAlignmentResolved()
boolean isTextDirectionResolved()
boolean isVerticalFadingEdgeEnabled()
boolean isVerticalScrollBarEnabled()
void jumpDrawablesToCurrentState()
View keyboardNavigationClusterSearch(View arg0, int arg1)
void layout(int arg0, int arg1, int arg2, int arg3)
final void measure(int arg0, int arg1)
static int[] mergeDrawableStates(int[] arg0, int[] arg1)
void offsetLeftAndRight(int arg0)
void offsetTopAndBottom(int arg0)
void onAnimationEnd()
void onAnimationStart()
WindowInsets onApplyWindowInsets(WindowInsets arg0)
void onAttachedToWindow()
void onCancelPendingInputEvents()
boolean onCapturedPointerEvent(MotionEvent arg0)
boolean onCheckIsTextEditor()
void onConfigurationChanged(Configuration arg0)
void onCreateContextMenu(ContextMenu arg0)
int[] onCreateDrawableState(int arg0)
InputConnection onCreateInputConnection(EditorInfo arg0)
void onDetachedFromWindow()
void onDisplayHint(int arg0)
boolean onDragEvent(DragEvent arg0)
void onDraw(Canvas arg0)
void onDrawForeground(Canvas arg0)
final void onDrawScrollBars(Canvas arg0)
boolean onFilterTouchEventForSecurity(MotionEvent arg0)
void onFinishInflate()
void onFinishTemporaryDetach()
void onFocusChanged(boolean arg0, int arg1, Rect arg2)
boolean onGenericMotionEvent(MotionEvent arg0)
void onHoverChanged(boolean arg0)
boolean onHoverEvent(MotionEvent arg0)
void onInitializeAccessibilityEvent(AccessibilityEvent arg0)
void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo arg0)
boolean onKeyDown(int arg0, KeyEvent arg1)
boolean onKeyLongPress(int arg0, KeyEvent arg1)
boolean onKeyMultiple(int arg0, int arg1, KeyEvent arg2)
boolean onKeyPreIme(int arg0, KeyEvent arg1)
boolean onKeyShortcut(int arg0, KeyEvent arg1)
boolean onKeyUp(int arg0, KeyEvent arg1)
void onLayout(boolean arg0, int arg1, int arg2, int arg3, int arg4)
void onMeasure(int arg0, int arg1)
void onOverScrolled(int arg0, int arg1, boolean arg2, boolean arg3)
void onPointerCaptureChange(boolean arg0)
void onPopulateAccessibilityEvent(AccessibilityEvent arg0)
void onProvideAutofillStructure(ViewStructure arg0, int arg1)
void onProvideAutofillVirtualStructure(ViewStructure arg0, int arg1)
void onProvideStructure(ViewStructure arg0)
void onProvideVirtualStructure(ViewStructure arg0)
PointerIcon onResolvePointerIcon(MotionEvent arg0, int arg1)
void onRestoreInstanceState(Parcelable arg0)
void onRtlPropertiesChanged(int arg0)
Parcelable onSaveInstanceState()
void onScreenStateChanged(int arg0)
void onScrollChanged(int arg0, int arg1, int arg2, int arg3)
boolean onSetAlpha(int arg0)
void onSizeChanged(int arg0, int arg1, int arg2, int arg3)
void onStartTemporaryDetach()
boolean onTouchEvent(MotionEvent arg0)
boolean onTrackballEvent(MotionEvent arg0)
void onVisibilityAggregated(boolean arg0)
void onVisibilityChanged(View arg0, int arg1)
void onWindowFocusChanged(boolean arg0)
void onWindowSystemUiVisibilityChanged(int arg0)
void onWindowVisibilityChanged(int arg0)
boolean overScrollBy(int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, boolean arg8)
boolean performAccessibilityAction(int arg0, Bundle arg1)
boolean performClick()
boolean performContextClick(float arg0, float arg1)
boolean performContextClick()
boolean performHapticFeedback(int arg0)
boolean performHapticFeedback(int arg0, int arg1)
boolean performLongClick(float arg0, float arg1)
boolean performLongClick()
void playSoundEffect(int arg0)
boolean post(Runnable arg0)
boolean postDelayed(Runnable arg0, long arg1)
void postInvalidate()
void postInvalidate(int arg0, int arg1, int arg2, int arg3)
void postInvalidateDelayed(long arg0, int arg1, int arg2, int arg3, int arg4)
void postInvalidateDelayed(long arg0)
void postInvalidateOnAnimation(int arg0, int arg1, int arg2, int arg3)
void postInvalidateOnAnimation()
void postOnAnimation(Runnable arg0)
void postOnAnimationDelayed(Runnable arg0, long arg1)
void refreshDrawableState()
void releasePointerCapture()
boolean removeCallbacks(Runnable arg0)
void removeOnAttachStateChangeListener(View.OnAttachStateChangeListenerarg0)
void removeOnLayoutChangeListener(View.OnLayoutChangeListener arg0)
void requestApplyInsets()
void requestFitSystemWindows()
final boolean requestFocus(int arg0)
final boolean requestFocus()
boolean requestFocus(int arg0, Rect arg1)
final boolean requestFocusFromTouch()
void requestLayout()
void requestPointerCapture()
boolean requestRectangleOnScreen(Rect arg0)
boolean requestRectangleOnScreen(Rect arg0, boolean arg1)
final void requestUnbufferedDispatch(MotionEvent arg0)
static int resolveSize(int arg0, int arg1)
static int resolveSizeAndState(int arg0, int arg1, int arg2)
boolean restoreDefaultFocus()
void restoreHierarchyState(SparseArray<Parcelable> arg0)
void saveHierarchyState(SparseArray<Parcelable> arg0)
void scheduleDrawable(Drawable arg0, Runnable arg1, long arg2)
void scrollBy(int arg0, int arg1)
void scrollTo(int arg0, int arg1)
void sendAccessibilityEvent(int arg0)
void sendAccessibilityEventUnchecked(AccessibilityEvent arg0)
void setAccessibilityDelegate(View.AccessibilityDelegate arg0)
void setAccessibilityLiveRegion(int arg0)
void setAccessibilityTraversalAfter(int arg0)
void setAccessibilityTraversalBefore(int arg0)
void setActivated(boolean arg0)
void setAlpha(float arg0)
void setAnimation(Animation arg0)
void setAutofillHints(String... arg0)
void setBackground(Drawable arg0)
void setBackgroundColor(int arg0)
void setBackgroundDrawable(Drawable arg0)
void setBackgroundResource(int arg0)
void setBackgroundTintList(ColorStateList arg0)
void setBackgroundTintMode(PorterDuff.Mode arg0)
final void setBottom(int arg0)
void setCameraDistance(float arg0)
void setClickable(boolean arg0)
void setClipBounds(Rect arg0)
void setClipToOutline(boolean arg0)
void setContentDescription(CharSequence arg0)
void setContextClickable(boolean arg0)
void setDefaultFocusHighlightEnabled(boolean arg0)
void setDrawingCacheBackgroundColor(int arg0)
void setDrawingCacheEnabled(boolean arg0)
void setDrawingCacheQuality(int arg0)
void setDuplicateParentStateEnabled(boolean arg0)
void setElevation(float arg0)
void setEnabled(boolean arg0)
void setFadingEdgeLength(int arg0)
void setFilterTouchesWhenObscured(boolean arg0)
void setFitsSystemWindows(boolean arg0)
void setFocusable(boolean arg0)
void setFocusable(int arg0)
void setFocusableInTouchMode(boolean arg0)
void setFocusedByDefault(boolean arg0)
void setForeground(Drawable arg0)
void setForegroundGravity(int arg0)
void setForegroundTintList(ColorStateList arg0)
void setForegroundTintMode(PorterDuff.Mode arg0)
void setHapticFeedbackEnabled(boolean arg0)
void setHasTransientState(boolean arg0)
void setHorizontalFadingEdgeEnabled(boolean arg0)
void setHorizontalScrollBarEnabled(boolean arg0)
void setHovered(boolean arg0)
void setId(int arg0)
void setImportantForAccessibility(int arg0)
void setImportantForAutofill(int arg0)
void setKeepScreenOn(boolean arg0)
void setKeyboardNavigationCluster(boolean arg0)
void setLabelFor(int arg0)
void setLayerPaint(Paint arg0)
void setLayerType(int arg0, Paint arg1)
void setLayoutDirection(int arg0)
void setLayoutParams(ViewGroup.LayoutParams arg0)
final void setLeft(int arg0)
void setLongClickable(boolean arg0)
final void setMeasuredDimension(int arg0, int arg1)
void setMinimumHeight(int arg0)
void setMinimumWidth(int arg0)
void setNestedScrollingEnabled(boolean arg0)
void setNextClusterForwardId(int arg0)
void setNextFocusDownId(int arg0)
void setNextFocusForwardId(int arg0)
void setNextFocusLeftId(int arg0)
void setNextFocusRightId(int arg0)
void setNextFocusUpId(int arg0)
void setOnApplyWindowInsetsListener(View.OnApplyWindowInsetsListener arg0)
void setOnCapturedPointerListener(View.OnCapturedPointerListener arg0)
void setOnClickListener(View.OnClickListener arg0)
void setOnContextClickListener(View.OnContextClickListener arg0)
void setOnCreateContextMenuListener(View.OnCreateContextMenuListener arg0)
void setOnDragListener(View.OnDragListener arg0)
void setOnFocusChangeListener(View.OnFocusChangeListener arg0)
void setOnGenericMotionListener(View.OnGenericMotionListener arg0)
void setOnHoverListener(View.OnHoverListener arg0)
void setOnKeyListener(View.OnKeyListener arg0)
void setOnLongClickListener(View.OnLongClickListener arg0)
void setOnScrollChangeListener(View.OnScrollChangeListener arg0)
void setOnSystemUiVisibilityChangeListener(View.OnSystemUiVisibilityChangeListener arg0)
void setOnTouchListener(View.OnTouchListener arg0)
void setOutlineProvider(ViewOutlineProvider arg0)
void setOverScrollMode(int arg0)
void setPadding(int arg0, int arg1, int arg2, int arg3)
void setPaddingRelative(int arg0, int arg1, int arg2, int arg3)
void setPivotX(float arg0)
void setPivotY(float arg0)
void setPointerIcon(PointerIcon arg0)
void setPressed(boolean arg0)
final void setRevealOnFocusHint(boolean arg0)
final void setRight(int arg0)
void setRotation(float arg0)
void setRotationX(float arg0)
void setRotationY(float arg0)
void setSaveEnabled(boolean arg0)
void setSaveFromParentEnabled(boolean arg0)
void setScaleX(float arg0)
void setScaleY(float arg0)
void setScrollBarDefaultDelayBeforeFade(int arg0)
void setScrollBarFadeDuration(int arg0)
void setScrollBarSize(int arg0)
void setScrollBarStyle(int arg0)
void setScrollContainer(boolean arg0)
void setScrollIndicators(int arg0, int arg1)
void setScrollIndicators(int arg0)
void setScrollX(int arg0)
void setScrollY(int arg0)
void setScrollbarFadingEnabled(boolean arg0)
void setSelected(boolean arg0)
void setSoundEffectsEnabled(boolean arg0)
void setStateListAnimator(StateListAnimator arg0)
void setSystemUiVisibility(int arg0)
void setTag(int arg0, Object arg1)
void setTag(Object arg0)
void setTextAlignment(int arg0)
void setTextDirection(int arg0)
void setTooltipText(CharSequence arg0)
final void setTop(int arg0)
void setTouchDelegate(TouchDelegate arg0)
final void setTransitionName(String arg0)
void setTranslationX(float arg0)
void setTranslationY(float arg0)
void setTranslationZ(float arg0)
void setVerticalFadingEdgeEnabled(boolean arg0)
void setVerticalScrollBarEnabled(boolean arg0)
void setVerticalScrollbarPosition(int arg0)
void setVisibility(int arg0)
void setWillNotCacheDrawing(boolean arg0)
void setWillNotDraw(boolean arg0)
void setX(float arg0)
void setY(float arg0)
void setZ(float arg0)
boolean showContextMenu()
boolean showContextMenu(float arg0, float arg1)
ActionMode startActionMode(ActionMode.Callback arg0, int arg1)
ActionMode startActionMode(ActionMode.Callback arg0)
void startAnimation(Animation arg0)
final boolean startDrag(ClipData arg0, View.DragShadowBuilder arg1, Object arg2, int arg3)
final boolean startDragAndDrop(ClipData arg0, View.DragShadowBuilder arg1, Object arg2, int arg3)
boolean startNestedScroll(int arg0)
void stopNestedScroll()
String toString()
void unscheduleDrawable(Drawable arg0, Runnable arg1)
void unscheduleDrawable(Drawable arg0)
final void updateDragShadow(View.DragShadowBuilder arg0)
boolean verifyDrawable(Drawable arg0)
boolean willNotCacheDrawing()
boolean willNotDraw()
From class java.lang.Object
Object clone()
boolean equals(Object arg0)
void finalize()
final Class<?> getClass()
int hashCode()
final void notify()
final void notifyAll()
String toString()
final void wait(long arg0, int arg1)
final void wait(long arg0)
final void wait()
From interface android.view.ViewParent
abstract void bringChildToFront(View arg0)
abstract boolean canResolveLayoutDirection()
abstract boolean canResolveTextAlignment()
abstract boolean canResolveTextDirection()
abstract void childDrawableStateChanged(View arg0)
abstract void childHasTransientStateChanged(View arg0, boolean arg1)
abstract void clearChildFocus(View arg0)
abstract void createContextMenu(ContextMenu arg0)
abstract View focusSearch(View arg0, int arg1)
abstract void focusableViewAvailable(View arg0)
abstract boolean getChildVisibleRect(View arg0, Rect arg1, Point arg2)
abstract int getLayoutDirection()
abstract ViewParent getParent()
abstract ViewParent getParentForAccessibility()
abstract int getTextAlignment()
abstract int getTextDirection()
abstract void invalidateChild(View arg0, Rect arg1)
abstract ViewParent invalidateChildInParent(int[] arg0, Rect arg1)
abstract boolean isLayoutDirectionResolved()
abstract boolean isLayoutRequested()
abstract boolean isTextAlignmentResolved()
abstract boolean isTextDirectionResolved()
abstract View keyboardNavigationClusterSearch(View arg0, int arg1)
abstract void notifySubtreeAccessibilityStateChanged(View arg0, View arg1, int arg2)
default void onDescendantInvalidated(View arg0, View arg1)
abstract boolean onNestedFling(View arg0, float arg1, float arg2, boolean arg3)
abstract boolean onNestedPreFling(View arg0, float arg1, float arg2)
abstract boolean onNestedPrePerformAccessibilityAction(View arg0, int arg1, Bundle arg2)
abstract void onNestedPreScroll(View arg0, int arg1, int arg2, int[] arg3)
abstract void onNestedScroll(View arg0, int arg1, int arg2, int arg3, int arg4)
abstract void onNestedScrollAccepted(View arg0, View arg1, int arg2)
abstract boolean onStartNestedScroll(View arg0, View arg1, int arg2)
abstract void onStopNestedScroll(View arg0)
abstract void recomputeViewAttributes(View arg0)
abstract void requestChildFocus(View arg0, View arg1)
abstract boolean requestChildRectangleOnScreen(View arg0, Rect arg1, boolean arg2)
abstract void requestDisallowInterceptTouchEvent(boolean arg0)
abstract void requestFitSystemWindows()
abstract void requestLayout()
abstract boolean requestSendAccessibilityEvent(View arg0, AccessibilityEvent arg1)
abstract void requestTransparentRegion(View arg0)
abstract boolean showContextMenuForChild(View arg0)
abstract boolean showContextMenuForChild(View arg0, float arg1, float arg2)
abstract ActionMode startActionModeForChild(View arg0, ActionMode.Callback arg1, int arg2)
abstract ActionMode startActionModeForChild(View arg0, ActionMode.Callback arg1)
From interface android.view.ViewManager
abstract void addView(View arg0, ViewGroup.LayoutParams arg1)
abstract void removeView(View arg0)
abstract void updateViewLayout(View arg0, ViewGroup.LayoutParams arg1)
From interface android.graphics.drawable.Drawable.Callback
abstract void invalidateDrawable(Drawable arg0)
abstract void scheduleDrawable(Drawable arg0, Runnable arg1, long arg2)
abstract void unscheduleDrawable(Drawable arg0, Runnable arg1)
From interface android.view.KeyEvent.Callback
abstract boolean onKeyDown(int arg0, KeyEvent arg1)
abstract boolean onKeyLongPress(int arg0, KeyEvent arg1)
abstract boolean onKeyMultiple(int arg0, int arg1, KeyEvent arg2)
abstract boolean onKeyUp(int arg0, KeyEvent arg1)
From interface android.view.accessibility.AccessibilityEventSource
abstract void sendAccessibilityEvent(int arg0)
abstract void sendAccessibilityEventUnchecked(AccessibilityEvent arg0)

XML attributes

TextInputLayout_android_hint

Related methods:

TextInputLayout_counterEnabled

Related methods:

TextInputLayout_counterMaxLength

Related methods:

TextInputLayout_errorEnabled

Related methods:

TextInputLayout_errorTextAppearance

Related methods:

TextInputLayout_hintAnimationEnabled

Related methods:

TextInputLayout_hintEnabled

Related methods:

TextInputLayout_hintTextAppearance

Related methods:

TextInputLayout_passwordToggleContentDescription

Related methods:

TextInputLayout_passwordToggleDrawable

Related methods:

TextInputLayout_passwordToggleEnabled

Related methods:

TextInputLayout_passwordToggleTint

Related methods:

TextInputLayout_passwordToggleTintMode

Related methods:

Public constructors

TextInputLayout

added in version 22.2.0

 

TextInputLayout (Context context)

Parameters
context Context

TextInputLayout

added in version 22.2.0

 

TextInputLayout (Context context, AttributeSet attrs)

Parameters
context Context
attrs AttributeSet

TextInputLayout

added in version 23.4.0

 

TextInputLayout (Context context, AttributeSet attrs, int defStyleAttr)

Parameters
context Context
attrs AttributeSet
defStyleAttr int

Public methods

addView

 

void addView (View child, int index, ViewGroup.LayoutParams params)

Parameters
child View
index int
params ViewGroup.LayoutParams

dispatchProvideAutofillStructure

 

void dispatchProvideAutofillStructure (ViewStructure structure, int flags)

Parameters
structure ViewStructure
flags int

draw

 

void draw (Canvas canvas)

Parameters
canvas Canvas

getCounterMaxLength

added in version 23.4.0

 

int getCounterMaxLength ()

Returns the max length shown at the character counter.

Related XML Attributes:

Returns
int

getEditText

added in version 22.2.0

 

EditText getEditText ()

Returns the EditText used for text input.

Returns
EditText

getError

added in version 23.4.0

 

CharSequence getError ()

Returns the error message that was set to be displayed with setError(CharSequence), or null if no error was set or if error displaying is not enabled.

Returns
CharSequence

See also:

getHint

added in version 23.4.0

 

CharSequence getHint ()

Returns the hint which is displayed in the floating label, if enabled.

Related XML Attributes:

Returns
CharSequence the hint, or null if there isn't one set, or the hint is not enabled.

getPasswordVisibilityToggleContentDescription

added in version 26.1.0

 

CharSequence getPasswordVisibilityToggleContentDescription ()

Returns the currently configured content description for the password visibility toggle button.

This will be used to describe the navigation action to users through mechanisms such as screen readers.

Returns
CharSequence

getPasswordVisibilityToggleDrawable

added in version 26.1.0

 

Drawable getPasswordVisibilityToggleDrawable ()

Returns the icon currently used for the password visibility toggle button.

Related XML Attributes:

Returns
Drawable

See also:

getTypeface

added in version 23.4.0

 

Typeface getTypeface ()

Returns the typeface used for the hint and any label views (such as counter and error views).

Returns
Typeface

isCounterEnabled

added in version 23.4.0

 

boolean isCounterEnabled ()

Returns whether the character counter functionality is enabled or not in this layout.

Related XML Attributes:

Returns
boolean

See also:

isErrorEnabled

added in version 23.4.0

 

boolean isErrorEnabled ()

Returns whether the error functionality is enabled or not in this layout.

Related XML Attributes:

Returns
boolean

See also:

isHintAnimationEnabled

added in version 23.4.0

 

boolean isHintAnimationEnabled ()

Returns whether any hint state changes, due to being focused or non-empty text, are animated.

Related XML Attributes:

Returns
boolean

See also:

isHintEnabled

added in version 23.4.0

 

boolean isHintEnabled ()

Returns whether the floating label functionality is enabled or not in this layout.

Related XML Attributes:

Returns
boolean

See also:

isPasswordVisibilityToggleEnabled

added in version 26.1.0

 

boolean isPasswordVisibilityToggleEnabled ()

Returns whether the password visibility toggle functionality is currently enabled.

Returns
boolean

See also:

onSaveInstanceState

added in version 23.4.0

 

Parcelable onSaveInstanceState ()

Returns
Parcelable

setCounterEnabled

added in version 23.4.0

 

void setCounterEnabled (boolean enabled)

Whether the character counter functionality is enabled or not in this layout.

Related XML Attributes:

Parameters
enabled boolean

setCounterMaxLength

added in version 23.4.0

 

void setCounterMaxLength (int maxLength)

Sets the max length to display at the character counter.

Related XML Attributes:

Parameters
maxLength int: maxLength to display. Any value less than or equal to 0 will not be shown.

setEnabled

 

void setEnabled (boolean enabled)

Parameters
enabled boolean

setError

added in version 22.2.0

 

void setError (CharSequence error)

Sets an error message that will be displayed below our EditText. If the error is null, the error message will be cleared.

If the error functionality has not been enabled via setErrorEnabled(boolean), then it will be automatically enabled if error is not empty.

Parameters
error CharSequence: Error message to display, or null to clear

See also:

setErrorEnabled

added in version 22.2.0

 

void setErrorEnabled (boolean enabled)

Whether the error functionality is enabled or not in this layout. Enabling this functionality before setting an error message via setError(CharSequence), will mean that this layout will not change size when an error is displayed.

Related XML Attributes:

Parameters
enabled boolean

setErrorTextAppearance

added in version 26.1.0

 

void setErrorTextAppearance (int resId)

Sets the text color and size for the error message from the specified TextAppearance resource.

Related XML Attributes:

Parameters
resId int

setHint

added in version 22.2.0

 

void setHint (CharSequence hint)

Set the hint to be displayed in the floating label, if enabled.

Related XML Attributes:

Parameters
hint CharSequence

See also:

setHintAnimationEnabled

added in version 23.4.0

 

void setHintAnimationEnabled (boolean enabled)

Set whether any hint state changes, due to being focused or non-empty text, are animated.

Related XML Attributes:

Parameters
enabled boolean

See also:

setHintEnabled

added in version 23.4.0

 

void setHintEnabled (boolean enabled)

Sets whether the floating label functionality is enabled or not in this layout.

If enabled, any non-empty hint in the child EditText will be moved into the floating hint, and its existing hint will be cleared. If disabled, then any non-empty floating hint in this layout will be moved into the EditText, and this layout's hint will be cleared.

Related XML Attributes:

Parameters
enabled boolean

See also:

setHintTextAppearance

added in version 23.4.0

 

void setHintTextAppearance (int resId)

Sets the hint text color, size, style from the specified TextAppearance resource.

Related XML Attributes:

Parameters
resId int

setPasswordVisibilityToggleContentDescription

added in version 26.1.0

 

void setPasswordVisibilityToggleContentDescription (CharSequence description)

Set a content description for the navigation button if one is present.

The content description will be read via screen readers or other accessibility systems to explain the action of the password visibility toggle.

Related XML Attributes:

Parameters
description CharSequence: Content description to set, or null to clear the content description

setPasswordVisibilityToggleContentDescription

added in version 26.1.0

 

void setPasswordVisibilityToggleContentDescription (int resId)

Set a content description for the navigation button if one is present.

The content description will be read via screen readers or other accessibility systems to explain the action of the password visibility toggle.

Related XML Attributes:

Parameters
resId int: Resource ID of a content description string to set, or 0 to clear the description

setPasswordVisibilityToggleDrawable

added in version 26.1.0

 

void setPasswordVisibilityToggleDrawable (int resId)

Set the icon to use for the password visibility toggle button.

If you use an icon you should also set a description for its action using setPasswordVisibilityToggleContentDescription(CharSequence). This is used for accessibility.

Related XML Attributes:

Parameters
resId int: resource id of the drawable to set, or 0 to clear the icon

setPasswordVisibilityToggleDrawable

added in version 26.1.0

 

void setPasswordVisibilityToggleDrawable (Drawable icon)

Set the icon to use for the password visibility toggle button.

If you use an icon you should also set a description for its action using setPasswordVisibilityToggleContentDescription(CharSequence). This is used for accessibility.

Related XML Attributes:

Parameters
icon Drawable: Drawable to set, may be null to clear the icon

setPasswordVisibilityToggleEnabled

added in version 26.1.0

 

void setPasswordVisibilityToggleEnabled (boolean enabled)

Returns whether the password visibility toggle functionality is enabled or not.

When enabled, a button is placed at the end of the EditText which enables the user to switch between the field's input being visibly disguised or not.

Related XML Attributes:

Parameters
enabled boolean: true to enable the functionality

setPasswordVisibilityToggleTintList

added in version 26.1.0

 

void setPasswordVisibilityToggleTintList (ColorStateList tintList)

Applies a tint to the the password visibility toggle drawable. Does not modify the current tint mode, which is SRC_IN by default.

Subsequent calls to setPasswordVisibilityToggleDrawable(Drawable) will automatically mutate the drawable and apply the specified tint and tint mode using setTintList(Drawable, ColorStateList).

Related XML Attributes:

Parameters
tintList ColorStateList: the tint to apply, may be null to clear tint

setPasswordVisibilityToggleTintMode

added in version 26.1.0

 

void setPasswordVisibilityToggleTintMode (PorterDuff.Mode mode)

Specifies the blending mode used to apply the tint specified bysetPasswordVisibilityToggleTintList(ColorStateList) to the password visibility toggle drawable. The default mode is SRC_IN.

Related XML Attributes:

Parameters
mode PorterDuff.Mode: the blending mode used to apply the tint, may be null to clear tint

setTypeface

added in version 23.4.0

 

void setTypeface (Typeface typeface)

Set the typeface to use for the hint and any label views (such as counter and error views).

Parameters
typeface Typeface: typeface to use, or null to use the default.

Protected methods

dispatchRestoreInstanceState

 

void dispatchRestoreInstanceState (SparseArray<Parcelable> container)

Parameters
container SparseArray

drawableStateChanged

 

void drawableStateChanged ()

onLayout

 

void onLayout (boolean changed, int left, int top, int right, int bottom)

Parameters
changed boolean
left int
top int
right int
bottom int

onMeasure

 

void onMeasure (int widthMeasureSpec, int heightMeasureSpec)

Parameters
widthMeasureSpec int
heightMeasureSpec int

onRestoreInstanceState

 

void onRestoreInstanceState (Parcelable state)

Parameters
state Parcelable

猜你喜欢

转载自blog.csdn.net/u011038298/article/details/84846492