content: package com.jennifer.andy.simpleeyes.widget.tab;
  
  import android.annotation.SuppressLint;
  import android.content.Context;
  import android.graphics.drawable.Drawable;
  import androidx.appcompat.widget.TintTypedArray;
  import android.util.AttributeSet;
  import android.view.View;
  
  import com.jennifer.andy.simpleeyes.R;
  
  /**
   * Author:  andy.xwt
   * Date:    2018/7/4 13:49
   * Description:
   */
  
  public final class TabItem extends View {
      final CharSequence mText;
      final Drawable mIcon;
      final int mCustomLayout;
  
      public TabItem(Context context) {
          this(context, null);
      }
  
      @SuppressLint("RestrictedApi")
      public TabItem(Context context, AttributeSet attrs) {
          super(context, attrs);
  
          @SuppressLint("RestrictedApi") final TintTypedArray a = TintTypedArray.obtainStyledAttributes(context, attrs,
                  R.styleable.TabItem);
          mText = a.getText(R.styleable.TabItem_android_text);
          mIcon = a.getDrawable(R.styleable.TabItem_android_icon);
          mCustomLayout = a.getResourceId(R.styleable.TabItem_android_layout, 0);
          a.recycle();
      }
  }