ActionLabel
public
class
ActionLabel
extends View
| java.lang.Object | ||
| ↳ | android.view.View | |
| ↳ | android.support.wearable.view.ActionLabel | |
This class is deprecated.
along with ActionPage
ActionLabel is a specialized text display widget. An upper and lower bound for text size and a maximum number of lines are provided and the layout is adjusted automatically to find the largest possible text size satisfying those constraints.
In order to provide a fixed bound, an ActionLabel should always be used with a width and height of "match_parent" or a specific size. When created programmatically, you must supply a LayoutParams to do this:
LayoutParams lp = new ViewGroup.LayoutParams(200, 50); parent.addView(label, lp);
Supported attributes are:
- text
- textColor
- maxLines
- minTextSize
- maxTextSize
- lineSpacingExtra
- lineSpacingMultiplier
- fontFamily
- typeface
- textStyle
- gravity
Summary
Inherited constants
From classandroid.view.ViewintACCESSIBILITY_LIVE_REGION_ASSERTIVEintACCESSIBILITY_LIVE_REGION_NONEintACCESSIBILITY_LIVE_REGION_POLITEintAUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWSStringAUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATEStringAUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAYStringAUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTHStringAUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEARStringAUTOFILL_HINT_CREDIT_CARD_NUMBERStringAUTOFILL_HINT_CREDIT_CARD_SECURITY_CODEStringAUTOFILL_HINT_EMAIL_ADDRESSStringAUTOFILL_HINT_NAMEStringAUTOFILL_HINT_PASSWORDStringAUTOFILL_HINT_PHONEStringAUTOFILL_HINT_POSTAL_ADDRESSStringAUTOFILL_HINT_POSTAL_CODEStringAUTOFILL_HINT_USERNAMEintAUTOFILL_TYPE_DATEintAUTOFILL_TYPE_LISTintAUTOFILL_TYPE_NONEintAUTOFILL_TYPE_TEXTintAUTOFILL_TYPE_TOGGLEintDRAG_FLAG_ACCESSIBILITY_ACTIONintDRAG_FLAG_GLOBALintDRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSIONintDRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSIONintDRAG_FLAG_GLOBAL_URI_READintDRAG_FLAG_GLOBAL_URI_WRITEintDRAG_FLAG_OPAQUEintDRAWING_CACHE_QUALITY_AUTOintDRAWING_CACHE_QUALITY_HIGHintDRAWING_CACHE_QUALITY_LOWintFIND_VIEWS_WITH_CONTENT_DESCRIPTIONintFIND_VIEWS_WITH_TEXTintFOCUSABLEintFOCUSABLES_ALLintFOCUSABLES_TOUCH_MODEintFOCUSABLE_AUTOintFOCUS_BACKWARDintFOCUS_DOWNintFOCUS_FORWARDintFOCUS_LEFTintFOCUS_RIGHTintFOCUS_UPintGONEintHAPTIC_FEEDBACK_ENABLEDintIMPORTANT_FOR_ACCESSIBILITY_AUTOintIMPORTANT_FOR_ACCESSIBILITY_NOintIMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTSintIMPORTANT_FOR_ACCESSIBILITY_YESintIMPORTANT_FOR_AUTOFILL_AUTOintIMPORTANT_FOR_AUTOFILL_NOintIMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTSintIMPORTANT_FOR_AUTOFILL_YESintIMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTSintIMPORTANT_FOR_CONTENT_CAPTURE_AUTOintIMPORTANT_FOR_CONTENT_CAPTURE_NOintIMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTSintIMPORTANT_FOR_CONTENT_CAPTURE_YESintIMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTSintINVISIBLEintKEEP_SCREEN_ONintLAYER_TYPE_HARDWAREintLAYER_TYPE_NONEintLAYER_TYPE_SOFTWAREintLAYOUT_DIRECTION_INHERITintLAYOUT_DIRECTION_LOCALEintLAYOUT_DIRECTION_LTRintLAYOUT_DIRECTION_RTLintMEASURED_HEIGHT_STATE_SHIFTintMEASURED_SIZE_MASKintMEASURED_STATE_MASKintMEASURED_STATE_TOO_SMALLintNOT_FOCUSABLEintNO_IDintOVER_SCROLL_ALWAYSintOVER_SCROLL_IF_CONTENT_SCROLLSintOVER_SCROLL_NEVERintSCREEN_STATE_OFFintSCREEN_STATE_ONintSCROLLBARS_INSIDE_INSETintSCROLLBARS_INSIDE_OVERLAYintSCROLLBARS_OUTSIDE_INSETintSCROLLBARS_OUTSIDE_OVERLAYintSCROLLBAR_POSITION_DEFAULTintSCROLLBAR_POSITION_LEFTintSCROLLBAR_POSITION_RIGHTintSCROLL_AXIS_HORIZONTALintSCROLL_AXIS_NONEintSCROLL_AXIS_VERTICALintSCROLL_CAPTURE_HINT_AUTOintSCROLL_CAPTURE_HINT_EXCLUDEintSCROLL_CAPTURE_HINT_EXCLUDE_DESCENDANTSintSCROLL_CAPTURE_HINT_INCLUDEintSCROLL_INDICATOR_BOTTOMintSCROLL_INDICATOR_ENDintSCROLL_INDICATOR_LEFTintSCROLL_INDICATOR_RIGHTintSCROLL_INDICATOR_STARTintSCROLL_INDICATOR_TOPintSOUND_EFFECTS_ENABLEDintSTATUS_BAR_HIDDENintSTATUS_BAR_VISIBLEintSYSTEM_UI_FLAG_FULLSCREENintSYSTEM_UI_FLAG_HIDE_NAVIGATIONintSYSTEM_UI_FLAG_IMMERSIVEintSYSTEM_UI_FLAG_IMMERSIVE_STICKYintSYSTEM_UI_FLAG_LAYOUT_FULLSCREENintSYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATIONintSYSTEM_UI_FLAG_LAYOUT_STABLEintSYSTEM_UI_FLAG_LIGHT_NAVIGATION_BARintSYSTEM_UI_FLAG_LIGHT_STATUS_BARintSYSTEM_UI_FLAG_LOW_PROFILEintSYSTEM_UI_FLAG_VISIBLEintSYSTEM_UI_LAYOUT_FLAGSintTEXT_ALIGNMENT_CENTERintTEXT_ALIGNMENT_GRAVITYintTEXT_ALIGNMENT_INHERITintTEXT_ALIGNMENT_TEXT_ENDintTEXT_ALIGNMENT_TEXT_STARTintTEXT_ALIGNMENT_VIEW_ENDintTEXT_ALIGNMENT_VIEW_STARTintTEXT_DIRECTION_ANY_RTLintTEXT_DIRECTION_FIRST_STRONGintTEXT_DIRECTION_FIRST_STRONG_LTRintTEXT_DIRECTION_FIRST_STRONG_RTLintTEXT_DIRECTION_INHERITintTEXT_DIRECTION_LOCALEintTEXT_DIRECTION_LTRintTEXT_DIRECTION_RTLStringVIEW_LOG_TAGintVISIBLEInherited fields
From classandroid.view.Viewpublic static final Property<View, Float>ALPHAprotected static final int[]EMPTY_STATE_SETprotected static final int[]ENABLED_FOCUSED_SELECTED_STATE_SETprotected static final int[]ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SETprotected static final int[]ENABLED_FOCUSED_STATE_SETprotected static final int[]ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SETprotected static final int[]ENABLED_SELECTED_STATE_SETprotected static final int[]ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SETprotected static final int[]ENABLED_STATE_SETprotected static final int[]ENABLED_WINDOW_FOCUSED_STATE_SETprotected static final int[]FOCUSED_SELECTED_STATE_SETprotected static final int[]FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SETprotected static final int[]FOCUSED_STATE_SETprotected static final int[]FOCUSED_WINDOW_FOCUSED_STATE_SETprotected static final int[]PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SETprotected static final int[]PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SETprotected static final int[]PRESSED_ENABLED_FOCUSED_STATE_SETprotected static final int[]PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SETprotected static final int[]PRESSED_ENABLED_SELECTED_STATE_SETprotected static final int[]PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SETprotected static final int[]PRESSED_ENABLED_STATE_SETprotected static final int[]PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SETprotected static final int[]PRESSED_FOCUSED_SELECTED_STATE_SETprotected static final int[]PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SETprotected static final int[]PRESSED_FOCUSED_STATE_SETprotected static final int[]PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SETprotected static final int[]PRESSED_SELECTED_STATE_SETprotected static final int[]PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SETprotected static final int[]PRESSED_STATE_SETprotected static final int[]PRESSED_WINDOW_FOCUSED_STATE_SETpublic static final Property<View, Float>ROTATIONpublic static final Property<View, Float>ROTATION_Xpublic static final Property<View, Float>ROTATION_Ypublic static final Property<View, Float>SCALE_Xpublic static final Property<View, Float>SCALE_Yprotected static final int[]SELECTED_STATE_SETprotected static final int[]SELECTED_WINDOW_FOCUSED_STATE_SETpublic static final Property<View, Float>TRANSLATION_Xpublic static final Property<View, Float>TRANSLATION_Ypublic static final Property<View, Float>TRANSLATION_Zprotected static final int[]WINDOW_FOCUSED_STATE_SETpublic static final Property<View, Float>Xpublic static final Property<View, Float>Ypublic static final Property<View, Float>ZPublic constructors
ActionLabel(Context context)ActionLabel(Context context, AttributeSet attrs)ActionLabel(Context context, AttributeSet attrs, int defStyleAttr)ActionLabel(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)Public methods
final intgetCurrentTextColor()Return the current color selected for normal text.
intgetGravity()Returns the horizontal and vertical alignment of this ActionLabel.
floatgetLineSpacingExtra()Gets the line spacing extra space
floatgetLineSpacingMultiplier()Gets the line spacing multiplier
intgetMaxLines()final ColorStateListgetTextColors()Gets the text colors for the different states (normal, selected, focused) of the TextView.
TypefacegetTypeface()voidonRtlPropertiesChanged(int layoutDirection)voidsetGravity(int gravity)Sets the horizontal alignment of the text and the vertical gravity that will be used when there is extra space in the ActionLabel beyond what is required for the text itself.
voidsetLineSpacing(float add, float mult)Sets line spacing for this TextView.
voidsetMaxLines(int lines)Limits the ActionLabel to no more than this many lines tall.
voidsetMaxTextSize(int unit, float size)Limits the text size to no larger than this value.
voidsetMaxTextSize(float size)Limits the text size to no larger than this value.
voidsetMinTextSize(int unit, float size)Limits the text size to no smaller than this value.
voidsetMinTextSize(float size)Limits the text size to no smaller than this value.
voidsetText(CharSequence text)Sets the text to be displayed by this label.
voidsetTextColor(int color)Sets the text color for all the states (normal, selected, focused) to be this color.
voidsetTextColor(ColorStateList colors)Sets the text color.
voidsetTypeface(Typeface tf, int style)Sets the typeface and style in which the text should be displayed, and turns on the fake bold and italic bits in the Paint if the Typeface that you provided does not have all the bits in the style that you specified.
voidsetTypeface(Typeface tf)Sets the typeface and style in which the text should be displayed.
Protected methods
voiddrawableStateChanged()voidonDraw(Canvas canvas)voidonMeasure(int widthMeasureSpec, int heightMeasureSpec)Inherited methods
From classandroid.view.ViewvoidaddChildrenForAccessibility(ArrayList<View> arg0)voidaddExtraDataToAccessibilityNodeInfo(AccessibilityNodeInfo arg0, String arg1, Bundle arg2)voidaddFocusables(ArrayList<View> arg0, int arg1)voidaddFocusables(ArrayList<View> arg0, int arg1, int arg2)voidaddKeyboardNavigationClusters(Collection<View> arg0, int arg1)voidaddOnAttachStateChangeListener(View.OnAttachStateChangeListener arg0)voidaddOnLayoutChangeListener(View.OnLayoutChangeListener arg0)voidaddOnUnhandledKeyEventListener(View.OnUnhandledKeyEventListener arg0)voidaddTouchables(ArrayList<View> arg0)ViewPropertyAnimatoranimate()voidannounceForAccessibility(CharSequence arg0)voidautofill(AutofillValue arg0)voidautofill(SparseArray<AutofillValue> arg0)booleanawakenScrollBars(int arg0, boolean arg1)booleanawakenScrollBars(int arg0)booleanawakenScrollBars()voidbringToFront()voidbuildDrawingCache(boolean arg0)voidbuildDrawingCache()voidbuildLayer()booleancallOnClick()booleancanResolveLayoutDirection()booleancanResolveTextAlignment()booleancanResolveTextDirection()booleancanScrollHorizontally(int arg0)booleancanScrollVertically(int arg0)final voidcancelDragAndDrop()voidcancelLongPress()final voidcancelPendingInputEvents()booleancheckInputConnectionProxy(View arg0)voidclearAnimation()voidclearFocus()voidclearViewTranslationCallback()static intcombineMeasuredStates(int arg0, int arg1)intcomputeHorizontalScrollExtent()intcomputeHorizontalScrollOffset()intcomputeHorizontalScrollRange()voidcomputeScroll()WindowInsetscomputeSystemWindowInsets(WindowInsets arg0, Rect arg1)intcomputeVerticalScrollExtent()intcomputeVerticalScrollOffset()intcomputeVerticalScrollRange()AccessibilityNodeInfocreateAccessibilityNodeInfo()voidcreateContextMenu(ContextMenu arg0)voiddestroyDrawingCache()WindowInsetsdispatchApplyWindowInsets(WindowInsets arg0)booleandispatchCapturedPointerEvent(MotionEvent arg0)voiddispatchConfigurationChanged(Configuration arg0)voiddispatchCreateViewTranslationRequest(Map<AutofillId, long[]> arg0, int[] arg1, TranslationCapability arg2, List<ViewTranslationRequest> arg3)voiddispatchDisplayHint(int arg0)booleandispatchDragEvent(DragEvent arg0)voiddispatchDraw(Canvas arg0)voiddispatchDrawableHotspotChanged(float arg0, float arg1)voiddispatchFinishTemporaryDetach()booleandispatchGenericFocusedEvent(MotionEvent arg0)booleandispatchGenericMotionEvent(MotionEvent arg0)booleandispatchGenericPointerEvent(MotionEvent arg0)booleandispatchHoverEvent(MotionEvent arg0)booleandispatchKeyEvent(KeyEvent arg0)booleandispatchKeyEventPreIme(KeyEvent arg0)booleandispatchKeyShortcutEvent(KeyEvent arg0)booleandispatchNestedFling(float arg0, float arg1, boolean arg2)booleandispatchNestedPreFling(float arg0, float arg1)booleandispatchNestedPrePerformAccessibilityAction(int arg0, Bundle arg1)booleandispatchNestedPreScroll(int arg0, int arg1, int[] arg2, int[] arg3)booleandispatchNestedScroll(int arg0, int arg1, int arg2, int arg3, int[] arg4)voiddispatchPointerCaptureChanged(boolean arg0)booleandispatchPopulateAccessibilityEvent(AccessibilityEvent arg0)voiddispatchProvideAutofillStructure(ViewStructure arg0, int arg1)voiddispatchProvideStructure(ViewStructure arg0)voiddispatchRestoreInstanceState(SparseArray<Parcelable> arg0)voiddispatchSaveInstanceState(SparseArray<Parcelable> arg0)voiddispatchScrollCaptureSearch(Rect arg0, Point arg1, Consumer<ScrollCaptureTarget> arg2)voiddispatchSetActivated(boolean arg0)voiddispatchSetPressed(boolean arg0)voiddispatchSetSelected(boolean arg0)voiddispatchStartTemporaryDetach()voiddispatchSystemUiVisibilityChanged(int arg0)booleandispatchTouchEvent(MotionEvent arg0)booleandispatchTrackballEvent(MotionEvent arg0)booleandispatchUnhandledMove(View arg0, int arg1)voiddispatchVisibilityChanged(View arg0, int arg1)voiddispatchWindowFocusChanged(boolean arg0)voiddispatchWindowInsetsAnimationEnd(WindowInsetsAnimation arg0)voiddispatchWindowInsetsAnimationPrepare(WindowInsetsAnimation arg0)WindowInsetsdispatchWindowInsetsAnimationProgress(WindowInsets arg0, List<WindowInsetsAnimation> arg1)WindowInsetsAnimation.BoundsdispatchWindowInsetsAnimationStart(WindowInsetsAnimation arg0, WindowInsetsAnimation.Bounds arg1)voiddispatchWindowSystemUiVisiblityChanged(int arg0)voiddispatchWindowVisibilityChanged(int arg0)voiddraw(Canvas arg0)voiddrawableHotspotChanged(float arg0, float arg1)voiddrawableStateChanged()ViewfindFocus()final <T extends View> TfindViewById(int arg0)final <T extends View> TfindViewWithTag(Object arg0)voidfindViewsWithText(ArrayList<View> arg0, CharSequence arg1, int arg2)booleanfitSystemWindows(Rect arg0)ViewfocusSearch(int arg0)voidforceHasOverlappingRendering(boolean arg0)voidforceLayout()booleangatherTransparentRegion(Region arg0)voidgenerateDisplayHash(String arg0, Rect arg1, Executor arg2, DisplayHashResultCallback arg3)static intgenerateViewId()CharSequencegetAccessibilityClassName()View.AccessibilityDelegategetAccessibilityDelegate()intgetAccessibilityLiveRegion()AccessibilityNodeProvidergetAccessibilityNodeProvider()CharSequencegetAccessibilityPaneTitle()intgetAccessibilityTraversalAfter()intgetAccessibilityTraversalBefore()floatgetAlpha()AnimationgetAnimation()MatrixgetAnimationMatrix()IBindergetApplicationWindowToken()int[]getAttributeResolutionStack(int arg0)Map<Integer, Integer>getAttributeSourceResourceMap()String[]getAutofillHints()final AutofillIdgetAutofillId()intgetAutofillType()AutofillValuegetAutofillValue()DrawablegetBackground()BlendModegetBackgroundTintBlendMode()ColorStateListgetBackgroundTintList()PorterDuff.ModegetBackgroundTintMode()intgetBaseline()final intgetBottom()floatgetBottomFadingEdgeStrength()intgetBottomPaddingOffset()floatgetCameraDistance()booleangetClipBounds(Rect arg0)RectgetClipBounds()final booleangetClipToOutline()final ContentCaptureSessiongetContentCaptureSession()CharSequencegetContentDescription()final ContextgetContext()ContextMenu.ContextMenuInfogetContextMenuInfo()final booleangetDefaultFocusHighlightEnabled()static intgetDefaultSize(int arg0, int arg1)DisplaygetDisplay()final int[]getDrawableState()BitmapgetDrawingCache()BitmapgetDrawingCache(boolean arg0)intgetDrawingCacheBackgroundColor()intgetDrawingCacheQuality()voidgetDrawingRect(Rect arg0)longgetDrawingTime()floatgetElevation()intgetExplicitStyle()booleangetFilterTouchesWhenObscured()booleangetFitsSystemWindows()intgetFocusable()ArrayList<View>getFocusables(int arg0)voidgetFocusedRect(Rect arg0)DrawablegetForeground()intgetForegroundGravity()BlendModegetForegroundTintBlendMode()ColorStateListgetForegroundTintList()PorterDuff.ModegetForegroundTintMode()final booleangetGlobalVisibleRect(Rect arg0)booleangetGlobalVisibleRect(Rect arg0, Point arg1)HandlergetHandler()final booleangetHasOverlappingRendering()final intgetHeight()voidgetHitRect(Rect arg0)intgetHorizontalFadingEdgeLength()intgetHorizontalScrollbarHeight()DrawablegetHorizontalScrollbarThumbDrawable()DrawablegetHorizontalScrollbarTrackDrawable()intgetId()intgetImportantForAccessibility()intgetImportantForAutofill()intgetImportantForContentCapture()booleangetKeepScreenOn()KeyEvent.DispatcherStategetKeyDispatcherState()intgetLabelFor()intgetLayerType()intgetLayoutDirection()ViewGroup.LayoutParamsgetLayoutParams()final intgetLeft()floatgetLeftFadingEdgeStrength()intgetLeftPaddingOffset()final booleangetLocalVisibleRect(Rect arg0)voidgetLocationInSurface(int[] arg0)voidgetLocationInWindow(int[] arg0)voidgetLocationOnScreen(int[] arg0)MatrixgetMatrix()final intgetMeasuredHeight()final intgetMeasuredHeightAndState()final intgetMeasuredState()final intgetMeasuredWidth()final intgetMeasuredWidthAndState()intgetMinimumHeight()intgetMinimumWidth()intgetNextClusterForwardId()intgetNextFocusDownId()intgetNextFocusForwardId()intgetNextFocusLeftId()intgetNextFocusRightId()intgetNextFocusUpId()View.OnFocusChangeListenergetOnFocusChangeListener()intgetOutlineAmbientShadowColor()ViewOutlineProvidergetOutlineProvider()intgetOutlineSpotShadowColor()intgetOverScrollMode()ViewOverlaygetOverlay()intgetPaddingBottom()intgetPaddingEnd()intgetPaddingLeft()intgetPaddingRight()intgetPaddingStart()intgetPaddingTop()final ViewParentgetParent()ViewParentgetParentForAccessibility()floatgetPivotX()floatgetPivotY()PointerIcongetPointerIcon()final List<Rect>getPreferKeepClearRects()String[]getReceiveContentMimeTypes()ResourcesgetResources()final booleangetRevealOnFocusHint()final intgetRight()floatgetRightFadingEdgeStrength()intgetRightPaddingOffset()AttachedSurfaceControlgetRootSurfaceControl()ViewgetRootView()WindowInsetsgetRootWindowInsets()floatgetRotation()floatgetRotationX()floatgetRotationY()floatgetScaleX()floatgetScaleY()intgetScrollBarDefaultDelayBeforeFade()intgetScrollBarFadeDuration()intgetScrollBarSize()intgetScrollBarStyle()intgetScrollCaptureHint()intgetScrollIndicators()final intgetScrollX()final intgetScrollY()intgetSolidColor()intgetSourceLayoutResId()final CharSequencegetStateDescription()StateListAnimatorgetStateListAnimator()intgetSuggestedMinimumHeight()intgetSuggestedMinimumWidth()List<Rect>getSystemGestureExclusionRects()intgetSystemUiVisibility()ObjectgetTag()ObjectgetTag(int arg0)intgetTextAlignment()intgetTextDirection()CharSequencegetTooltipText()final intgetTop()floatgetTopFadingEdgeStrength()intgetTopPaddingOffset()TouchDelegategetTouchDelegate()ArrayList<View>getTouchables()floatgetTransitionAlpha()StringgetTransitionName()floatgetTranslationX()floatgetTranslationY()floatgetTranslationZ()longgetUniqueDrawingId()intgetVerticalFadingEdgeLength()intgetVerticalScrollbarPosition()DrawablegetVerticalScrollbarThumbDrawable()DrawablegetVerticalScrollbarTrackDrawable()intgetVerticalScrollbarWidth()ViewTranslationResponsegetViewTranslationResponse()ViewTreeObservergetViewTreeObserver()intgetVisibility()final intgetWidth()intgetWindowAttachCount()WindowIdgetWindowId()WindowInsetsControllergetWindowInsetsController()intgetWindowSystemUiVisibility()IBindergetWindowToken()intgetWindowVisibility()voidgetWindowVisibleDisplayFrame(Rect arg0)floatgetX()floatgetY()floatgetZ()booleanhasExplicitFocusable()booleanhasFocus()booleanhasFocusable()booleanhasNestedScrollingParent()booleanhasOnClickListeners()booleanhasOnLongClickListeners()booleanhasOverlappingRendering()booleanhasPointerCapture()booleanhasTransientState()booleanhasWindowFocus()static Viewinflate(Context arg0, int arg1, ViewGroup arg2)voidinvalidate()voidinvalidate(Rect arg0)voidinvalidate(int arg0, int arg1, int arg2, int arg3)voidinvalidateDrawable(Drawable arg0)voidinvalidateOutline()booleanisAccessibilityFocused()booleanisAccessibilityHeading()booleanisActivated()booleanisAttachedToWindow()booleanisAutoHandwritingEnabled()booleanisClickable()booleanisContextClickable()booleanisDirty()booleanisDrawingCacheEnabled()booleanisDuplicateParentStateEnabled()booleanisEnabled()final booleanisFocusable()final booleanisFocusableInTouchMode()booleanisFocused()final booleanisFocusedByDefault()booleanisForceDarkAllowed()booleanisHapticFeedbackEnabled()booleanisHardwareAccelerated()booleanisHorizontalFadingEdgeEnabled()booleanisHorizontalScrollBarEnabled()booleanisHovered()booleanisImportantForAccessibility()final booleanisImportantForAutofill()final booleanisImportantForContentCapture()booleanisInEditMode()booleanisInLayout()booleanisInTouchMode()final booleanisKeyboardNavigationCluster()booleanisLaidOut()booleanisLayoutDirectionResolved()booleanisLayoutRequested()booleanisLongClickable()booleanisNestedScrollingEnabled()booleanisOpaque()booleanisPaddingOffsetRequired()booleanisPaddingRelative()booleanisPivotSet()final booleanisPreferKeepClear()booleanisPressed()booleanisSaveEnabled()booleanisSaveFromParentEnabled()booleanisScreenReaderFocusable()booleanisScrollContainer()booleanisScrollbarFadingEnabled()booleanisSelected()final booleanisShowingLayoutBounds()booleanisShown()booleanisSoundEffectsEnabled()final booleanisTemporarilyDetached()booleanisTextAlignmentResolved()booleanisTextDirectionResolved()booleanisVerticalFadingEdgeEnabled()booleanisVerticalScrollBarEnabled()booleanisVisibleToUserForAutofill(int arg0)voidjumpDrawablesToCurrentState()ViewkeyboardNavigationClusterSearch(View arg0, int arg1)voidlayout(int arg0, int arg1, int arg2, int arg3)final voidmeasure(int arg0, int arg1)static int[]mergeDrawableStates(int[] arg0, int[] arg1)voidoffsetLeftAndRight(int arg0)voidoffsetTopAndBottom(int arg0)voidonAnimationEnd()voidonAnimationStart()WindowInsetsonApplyWindowInsets(WindowInsets arg0)voidonAttachedToWindow()voidonCancelPendingInputEvents()booleanonCapturedPointerEvent(MotionEvent arg0)booleanonCheckIsTextEditor()voidonConfigurationChanged(Configuration arg0)voidonCreateContextMenu(ContextMenu arg0)int[]onCreateDrawableState(int arg0)InputConnectiononCreateInputConnection(EditorInfo arg0)voidonCreateViewTranslationRequest(int[] arg0, Consumer<ViewTranslationRequest> arg1)voidonCreateVirtualViewTranslationRequests(long[] arg0, int[] arg1, Consumer<ViewTranslationRequest> arg2)voidonDetachedFromWindow()voidonDisplayHint(int arg0)booleanonDragEvent(DragEvent arg0)voidonDraw(Canvas arg0)voidonDrawForeground(Canvas arg0)final voidonDrawScrollBars(Canvas arg0)booleanonFilterTouchEventForSecurity(MotionEvent arg0)voidonFinishInflate()voidonFinishTemporaryDetach()voidonFocusChanged(boolean arg0, int arg1, Rect arg2)booleanonGenericMotionEvent(MotionEvent arg0)voidonHoverChanged(boolean arg0)booleanonHoverEvent(MotionEvent arg0)voidonInitializeAccessibilityEvent(AccessibilityEvent arg0)voidonInitializeAccessibilityNodeInfo(AccessibilityNodeInfo arg0)booleanonKeyDown(int arg0, KeyEvent arg1)booleanonKeyLongPress(int arg0, KeyEvent arg1)booleanonKeyMultiple(int arg0, int arg1, KeyEvent arg2)booleanonKeyPreIme(int arg0, KeyEvent arg1)booleanonKeyShortcut(int arg0, KeyEvent arg1)booleanonKeyUp(int arg0, KeyEvent arg1)voidonLayout(boolean arg0, int arg1, int arg2, int arg3, int arg4)voidonMeasure(int arg0, int arg1)voidonOverScrolled(int arg0, int arg1, boolean arg2, boolean arg3)voidonPointerCaptureChange(boolean arg0)voidonPopulateAccessibilityEvent(AccessibilityEvent arg0)voidonProvideAutofillStructure(ViewStructure arg0, int arg1)voidonProvideAutofillVirtualStructure(ViewStructure arg0, int arg1)voidonProvideContentCaptureStructure(ViewStructure arg0, int arg1)voidonProvideStructure(ViewStructure arg0)voidonProvideVirtualStructure(ViewStructure arg0)ContentInfoonReceiveContent(ContentInfo arg0)PointerIcononResolvePointerIcon(MotionEvent arg0, int arg1)voidonRestoreInstanceState(Parcelable arg0)voidonRtlPropertiesChanged(int arg0)ParcelableonSaveInstanceState()voidonScreenStateChanged(int arg0)voidonScrollCaptureSearch(Rect arg0, Point arg1, Consumer<ScrollCaptureTarget> arg2)voidonScrollChanged(int arg0, int arg1, int arg2, int arg3)booleanonSetAlpha(int arg0)voidonSizeChanged(int arg0, int arg1, int arg2, int arg3)voidonStartTemporaryDetach()booleanonTouchEvent(MotionEvent arg0)booleanonTrackballEvent(MotionEvent arg0)voidonViewTranslationResponse(ViewTranslationResponse arg0)voidonVirtualViewTranslationResponses(LongSparseArray<ViewTranslationResponse> arg0)voidonVisibilityAggregated(boolean arg0)voidonVisibilityChanged(View arg0, int arg1)voidonWindowFocusChanged(boolean arg0)voidonWindowSystemUiVisibilityChanged(int arg0)voidonWindowVisibilityChanged(int arg0)booleanoverScrollBy(int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, boolean arg8)booleanperformAccessibilityAction(int arg0, Bundle arg1)booleanperformClick()booleanperformContextClick(float arg0, float arg1)booleanperformContextClick()booleanperformHapticFeedback(int arg0)booleanperformHapticFeedback(int arg0, int arg1)booleanperformLongClick(float arg0, float arg1)booleanperformLongClick()ContentInfoperformReceiveContent(ContentInfo arg0)voidplaySoundEffect(int arg0)booleanpost(Runnable arg0)booleanpostDelayed(Runnable arg0, long arg1)voidpostInvalidate()voidpostInvalidate(int arg0, int arg1, int arg2, int arg3)voidpostInvalidateDelayed(long arg0, int arg1, int arg2, int arg3, int arg4)voidpostInvalidateDelayed(long arg0)voidpostInvalidateOnAnimation(int arg0, int arg1, int arg2, int arg3)voidpostInvalidateOnAnimation()voidpostOnAnimation(Runnable arg0)voidpostOnAnimationDelayed(Runnable arg0, long arg1)voidrefreshDrawableState()voidreleasePointerCapture()booleanremoveCallbacks(Runnable arg0)voidremoveOnAttachStateChangeListener(View.OnAttachStateChangeListener arg0)voidremoveOnLayoutChangeListener(View.OnLayoutChangeListener arg0)voidremoveOnUnhandledKeyEventListener(View.OnUnhandledKeyEventListener arg0)voidrequestApplyInsets()voidrequestFitSystemWindows()final booleanrequestFocus(int arg0)final booleanrequestFocus()booleanrequestFocus(int arg0, Rect arg1)final booleanrequestFocusFromTouch()voidrequestLayout()voidrequestPointerCapture()booleanrequestRectangleOnScreen(Rect arg0)booleanrequestRectangleOnScreen(Rect arg0, boolean arg1)final voidrequestUnbufferedDispatch(int arg0)final voidrequestUnbufferedDispatch(MotionEvent arg0)final <T extends View> TrequireViewById(int arg0)voidresetPivot()static intresolveSize(int arg0, int arg1)static intresolveSizeAndState(int arg0, int arg1, int arg2)booleanrestoreDefaultFocus()voidrestoreHierarchyState(SparseArray<Parcelable> arg0)final voidsaveAttributeDataForStyleable(Context arg0, int[] arg1, AttributeSet arg2, TypedArray arg3, int arg4, int arg5)voidsaveHierarchyState(SparseArray<Parcelable> arg0)voidscheduleDrawable(Drawable arg0, Runnable arg1, long arg2)voidscrollBy(int arg0, int arg1)voidscrollTo(int arg0, int arg1)voidsendAccessibilityEvent(int arg0)voidsendAccessibilityEventUnchecked(AccessibilityEvent arg0)voidsetAccessibilityDelegate(View.AccessibilityDelegate arg0)voidsetAccessibilityHeading(boolean arg0)voidsetAccessibilityLiveRegion(int arg0)voidsetAccessibilityPaneTitle(CharSequence arg0)voidsetAccessibilityTraversalAfter(int arg0)voidsetAccessibilityTraversalBefore(int arg0)voidsetActivated(boolean arg0)voidsetAllowClickWhenDisabled(boolean arg0)voidsetAlpha(float arg0)voidsetAnimation(Animation arg0)voidsetAnimationMatrix(Matrix arg0)voidsetAutoHandwritingEnabled(boolean arg0)voidsetAutofillHints(String... arg0)voidsetAutofillId(AutofillId arg0)voidsetBackground(Drawable arg0)voidsetBackgroundColor(int arg0)voidsetBackgroundDrawable(Drawable arg0)voidsetBackgroundResource(int arg0)voidsetBackgroundTintBlendMode(BlendMode arg0)voidsetBackgroundTintList(ColorStateList arg0)voidsetBackgroundTintMode(PorterDuff.Mode arg0)final voidsetBottom(int arg0)voidsetCameraDistance(float arg0)voidsetClickable(boolean arg0)voidsetClipBounds(Rect arg0)voidsetClipToOutline(boolean arg0)voidsetContentCaptureSession(ContentCaptureSession arg0)voidsetContentDescription(CharSequence arg0)voidsetContextClickable(boolean arg0)voidsetDefaultFocusHighlightEnabled(boolean arg0)voidsetDrawingCacheBackgroundColor(int arg0)voidsetDrawingCacheEnabled(boolean arg0)voidsetDrawingCacheQuality(int arg0)voidsetDuplicateParentStateEnabled(boolean arg0)voidsetElevation(float arg0)voidsetEnabled(boolean arg0)voidsetFadingEdgeLength(int arg0)voidsetFilterTouchesWhenObscured(boolean arg0)voidsetFitsSystemWindows(boolean arg0)voidsetFocusable(boolean arg0)voidsetFocusable(int arg0)voidsetFocusableInTouchMode(boolean arg0)voidsetFocusedByDefault(boolean arg0)voidsetForceDarkAllowed(boolean arg0)voidsetForeground(Drawable arg0)voidsetForegroundGravity(int arg0)voidsetForegroundTintBlendMode(BlendMode arg0)voidsetForegroundTintList(ColorStateList arg0)voidsetForegroundTintMode(PorterDuff.Mode arg0)voidsetHapticFeedbackEnabled(boolean arg0)voidsetHasTransientState(boolean arg0)voidsetHorizontalFadingEdgeEnabled(boolean arg0)voidsetHorizontalScrollBarEnabled(boolean arg0)voidsetHorizontalScrollbarThumbDrawable(Drawable arg0)voidsetHorizontalScrollbarTrackDrawable(Drawable arg0)voidsetHovered(boolean arg0)voidsetId(int arg0)voidsetImportantForAccessibility(int arg0)voidsetImportantForAutofill(int arg0)voidsetImportantForContentCapture(int arg0)voidsetKeepScreenOn(boolean arg0)voidsetKeyboardNavigationCluster(boolean arg0)voidsetLabelFor(int arg0)voidsetLayerPaint(Paint arg0)voidsetLayerType(int arg0, Paint arg1)voidsetLayoutDirection(int arg0)voidsetLayoutParams(ViewGroup.LayoutParams arg0)final voidsetLeft(int arg0)final voidsetLeftTopRightBottom(int arg0, int arg1, int arg2, int arg3)voidsetLongClickable(boolean arg0)final voidsetMeasuredDimension(int arg0, int arg1)voidsetMinimumHeight(int arg0)voidsetMinimumWidth(int arg0)voidsetNestedScrollingEnabled(boolean arg0)voidsetNextClusterForwardId(int arg0)voidsetNextFocusDownId(int arg0)voidsetNextFocusForwardId(int arg0)voidsetNextFocusLeftId(int arg0)voidsetNextFocusRightId(int arg0)voidsetNextFocusUpId(int arg0)voidsetOnApplyWindowInsetsListener(View.OnApplyWindowInsetsListener arg0)voidsetOnCapturedPointerListener(View.OnCapturedPointerListener arg0)voidsetOnClickListener(View.OnClickListener arg0)voidsetOnContextClickListener(View.OnContextClickListener arg0)voidsetOnCreateContextMenuListener(View.OnCreateContextMenuListener arg0)voidsetOnDragListener(View.OnDragListener arg0)voidsetOnFocusChangeListener(View.OnFocusChangeListener arg0)voidsetOnGenericMotionListener(View.OnGenericMotionListener arg0)voidsetOnHoverListener(View.OnHoverListener arg0)voidsetOnKeyListener(View.OnKeyListener arg0)voidsetOnLongClickListener(View.OnLongClickListener arg0)voidsetOnReceiveContentListener(String[] arg0, OnReceiveContentListener arg1)voidsetOnScrollChangeListener(View.OnScrollChangeListener arg0)voidsetOnSystemUiVisibilityChangeListener(View.OnSystemUiVisibilityChangeListener arg0)voidsetOnTouchListener(View.OnTouchListener arg0)voidsetOutlineAmbientShadowColor(int arg0)voidsetOutlineProvider(ViewOutlineProvider arg0)voidsetOutlineSpotShadowColor(int arg0)voidsetOverScrollMode(int arg0)voidsetPadding(int arg0, int arg1, int arg2, int arg3)voidsetPaddingRelative(int arg0, int arg1, int arg2, int arg3)voidsetPivotX(float arg0)voidsetPivotY(float arg0)voidsetPointerIcon(PointerIcon arg0)final voidsetPreferKeepClear(boolean arg0)final voidsetPreferKeepClearRects(List<Rect> arg0)voidsetPressed(boolean arg0)voidsetRenderEffect(RenderEffect arg0)final voidsetRevealOnFocusHint(boolean arg0)final voidsetRight(int arg0)voidsetRotation(float arg0)voidsetRotationX(float arg0)voidsetRotationY(float arg0)voidsetSaveEnabled(boolean arg0)voidsetSaveFromParentEnabled(boolean arg0)voidsetScaleX(float arg0)voidsetScaleY(float arg0)voidsetScreenReaderFocusable(boolean arg0)voidsetScrollBarDefaultDelayBeforeFade(int arg0)voidsetScrollBarFadeDuration(int arg0)voidsetScrollBarSize(int arg0)voidsetScrollBarStyle(int arg0)final voidsetScrollCaptureCallback(ScrollCaptureCallback arg0)voidsetScrollCaptureHint(int arg0)voidsetScrollContainer(boolean arg0)voidsetScrollIndicators(int arg0, int arg1)voidsetScrollIndicators(int arg0)voidsetScrollX(int arg0)voidsetScrollY(int arg0)voidsetScrollbarFadingEnabled(boolean arg0)voidsetSelected(boolean arg0)voidsetSoundEffectsEnabled(boolean arg0)voidsetStateDescription(CharSequence arg0)voidsetStateListAnimator(StateListAnimator arg0)voidsetSystemGestureExclusionRects(List<Rect> arg0)voidsetSystemUiVisibility(int arg0)voidsetTag(int arg0, Object arg1)voidsetTag(Object arg0)voidsetTextAlignment(int arg0)voidsetTextDirection(int arg0)voidsetTooltipText(CharSequence arg0)final voidsetTop(int arg0)voidsetTouchDelegate(TouchDelegate arg0)voidsetTransitionAlpha(float arg0)final voidsetTransitionName(String arg0)voidsetTransitionVisibility(int arg0)voidsetTranslationX(float arg0)voidsetTranslationY(float arg0)voidsetTranslationZ(float arg0)voidsetVerticalFadingEdgeEnabled(boolean arg0)voidsetVerticalScrollBarEnabled(boolean arg0)voidsetVerticalScrollbarPosition(int arg0)voidsetVerticalScrollbarThumbDrawable(Drawable arg0)voidsetVerticalScrollbarTrackDrawable(Drawable arg0)voidsetViewTranslationCallback(ViewTranslationCallback arg0)voidsetVisibility(int arg0)voidsetWillNotCacheDrawing(boolean arg0)voidsetWillNotDraw(boolean arg0)voidsetWindowInsetsAnimationCallback(WindowInsetsAnimation.Callback arg0)voidsetX(float arg0)voidsetY(float arg0)voidsetZ(float arg0)booleanshowContextMenu()booleanshowContextMenu(float arg0, float arg1)ActionModestartActionMode(ActionMode.Callback arg0, int arg1)ActionModestartActionMode(ActionMode.Callback arg0)voidstartAnimation(Animation arg0)final booleanstartDrag(ClipData arg0, View.DragShadowBuilder arg1, Object arg2, int arg3)final booleanstartDragAndDrop(ClipData arg0, View.DragShadowBuilder arg1, Object arg2, int arg3)booleanstartNestedScroll(int arg0)voidstopNestedScroll()StringtoString()voidtransformMatrixToGlobal(Matrix arg0)voidtransformMatrixToLocal(Matrix arg0)voidunscheduleDrawable(Drawable arg0, Runnable arg1)voidunscheduleDrawable(Drawable arg0)final voidupdateDragShadow(View.DragShadowBuilder arg0)booleanverifyDrawable(Drawable arg0)booleanwillNotCacheDrawing()booleanwillNotDraw()From classjava.lang.ObjectObjectclone()booleanequals(Object arg0)voidfinalize()final Class<?>getClass()inthashCode()final voidnotify()final voidnotifyAll()StringtoString()final voidwait(long arg0, int arg1)final voidwait(long arg0)final voidwait()From interfaceandroid.view.KeyEvent.Callbackabstract booleanonKeyDown(int arg0, KeyEvent arg1)abstract booleanonKeyLongPress(int arg0, KeyEvent arg1)abstract booleanonKeyMultiple(int arg0, int arg1, KeyEvent arg2)abstract booleanonKeyUp(int arg0, KeyEvent arg1)From interfaceandroid.view.accessibility.AccessibilityEventSourceabstract voidsendAccessibilityEvent(int arg0)abstract voidsendAccessibilityEventUnchecked(AccessibilityEvent arg0)Public constructors
ActionLabel
public ActionLabel (Context context, AttributeSet attrs)
Parameters contextContextattrsAttributeSetActionLabel
public ActionLabel (Context context, AttributeSet attrs, int defStyleAttr)
Parameters contextContextattrsAttributeSetdefStyleAttrintActionLabel
public ActionLabel (Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Parameters contextContextattrsAttributeSetdefStyleAttrintdefStyleResintPublic methods
getCurrentTextColor
public final int getCurrentTextColor ()
Return the current color selected for normal text.
Returns intReturns the current text color. getGravity
public int getGravity ()
Returns the horizontal and vertical alignment of this ActionLabel.
Returns intSee also:
getLineSpacingExtra
public float getLineSpacingExtra ()
Gets the line spacing extra space
Returns floatthe extra space that is added to the height of each lines of this TextView. getLineSpacingMultiplier
public float getLineSpacingMultiplier ()
Gets the line spacing multiplier
Returns floatthe value by which each line's height is multiplied to get its actual height. getMaxLines
public int getMaxLines ()
Returns intgetTextColors
public final ColorStateList getTextColors ()
Gets the text colors for the different states (normal, selected, focused) of the TextView.
Returns ColorStateListgetTypeface
public Typeface getTypeface ()
Returns Typefacethe current typeface and style in which the text is being displayed. See also:
onRtlPropertiesChanged
public void onRtlPropertiesChanged (int layoutDirection)
Parameters layoutDirectionintsetGravity
public void setGravity (int gravity)
Sets the horizontal alignment of the text and the vertical gravity that will be used when there is extra space in the ActionLabel beyond what is required for the text itself.
Parameters gravityintSee also:
setLineSpacing
public void setLineSpacing (float add, float mult)Sets line spacing for this TextView. Each line will have its height multiplied by
multand haveaddadded to it.Parameters addfloatmultfloatsetMaxLines
public void setMaxLines (int lines)
Limits the ActionLabel to no more than this many lines tall.
Parameters linesintsetMaxTextSize
public void setMaxTextSize (int unit, float size)Limits the text size to no larger than this value. Text will try to be this size if possible, then be reduced in size until it fits available space.
Parameters unitintsizefloatsetMaxTextSize
public void setMaxTextSize (float size)
Limits the text size to no larger than this value. Text will try to be this size if possible, then be reduced in size until it fits available space.
Parameters sizefloatsetMinTextSize
public void setMinTextSize (int unit, float size)Limits the text size to no smaller than this value. Text size is decreased until the content can be rendered within the available space.
Parameters unitintsizefloatsetMinTextSize
public void setMinTextSize (float size)
Limits the text size to no smaller than this value. Text size is decreased until the content can be rendered within the available space.
Parameters sizefloat: interpreted as "scaled pixel" unitssetText
public void setText (CharSequence text)
Sets the text to be displayed by this label.
Parameters textCharSequencesetTextColor
public void setTextColor (int color)
Sets the text color for all the states (normal, selected, focused) to be this color.
Parameters colorintsetTextColor
public void setTextColor (ColorStateList colors)
Sets the text color.
Parameters colorsColorStateListSee also:
setTypeface
public void setTypeface (Typeface tf, int style)
Sets the typeface and style in which the text should be displayed, and turns on the fake bold and italic bits in the Paint if the Typeface that you provided does not have all the bits in the style that you specified.
Parameters tfTypefacestyleintsetTypeface
public void setTypeface (Typeface tf)
Sets the typeface and style in which the text should be displayed. Note that not all Typeface families actually have bold and italic variants, so you may need to use
setTypeface(Typeface, int)to get the appearance that you actually want.Parameters tfTypefaceSee also:
Protected methods
drawableStateChanged
protected void drawableStateChanged ()
onMeasure
protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec)Parameters widthMeasureSpecintheightMeasureSpecint