Class TabLayout.TabView

All Implemented Interfaces:
Drawable.Callback, ViewManager, ViewParent
Enclosing class:
TabLayout

public final class TabLayout.TabView extends LinearLayout
A LinearLayout containing TabLayout.Tab instances for use with TabLayout.
  • Constructor Details

  • Method Details

    • drawableStateChanged

      protected void drawableStateChanged()
      Description copied from class: View
      This function is called whenever the state of the view changes in such a way that it impacts the state of drawables being shown.

      If the View has a StateListAnimator, it will also be called to run necessary state change animations.

      Be sure to call through to the superclass when overriding this function.

      Overrides:
      drawableStateChanged in class ViewGroup
      See Also:
    • performClick

      public boolean performClick()
      Description copied from class: View
      Call this view's OnClickListener, if it is defined. Performs all normal actions associated with clicking: reporting accessibility event, playing a sound, etc.
      Overrides:
      performClick in class View
      Returns:
      True there was an assigned OnClickListener that was called, false otherwise is returned.
    • setSelected

      public void setSelected(boolean selected)
      Description copied from class: View
      Changes the selection state of this view. A view can be selected or not. Note that selection is not the same as focus. Views are typically selected in the context of an AdapterView like ListView or GridView; the selected view is the view that is highlighted.
      Overrides:
      setSelected in class View
      Parameters:
      selected - true if the view must be selected, false otherwise
    • onMeasure

      public void onMeasure(int origWidthMeasureSpec, int origHeightMeasureSpec)
      Description copied from class: View
      Measure the view and its content to determine the measured width and the measured height. This method is invoked by View.measure(int, int) and should be overridden by subclasses to provide accurate and efficient measurement of their contents.

      CONTRACT: When overriding this method, you must call View.setMeasuredDimension(int, int) to store the measured width and height of this view. Failure to do so will trigger an IllegalStateException, thrown by View.measure(int, int). Calling super.onMeasure() is a valid use.

      The base class implementation of measure defaults to the background size, unless a larger size is allowed by the MeasureSpec. Subclasses should override the base one to provide better measurements of their content.

      Overrides:
      onMeasure in class LinearLayout
      Parameters:
      origWidthMeasureSpec - width measure specification imposed by the parent MeasureSpec
      origHeightMeasureSpec - height measure specification imposed by the parent MeasureSpec
    • getTab

      @Nullable public TabLayout.Tab getTab()