gt:                 boolean bl = view2 == view;
context: /*
   * Decompiled with CFR 0_115.
   * 
   * Could not load the following classes:
   *  android.content.Context
   *  android.content.res.Configuration
   *  android.content.res.Resources
   *  android.graphics.drawable.Drawable
   *  android.os.Build
   *  android.os.Build$VERSION
   *  android.text.TextUtils
   *  android.text.TextUtils$TruncateAt
   *  android.util.AttributeSet
   *  android.util.DisplayMetrics
   *  android.view.View
   *  android.view.View$MeasureSpec
   *  android.view.View$OnClickListener
   *  android.view.View$OnLongClickListener
   *  android.view.ViewGroup
   *  android.view.ViewGroup$LayoutParams
   *  android.view.ViewParent
   *  android.view.accessibility.AccessibilityEvent
   *  android.view.accessibility.AccessibilityNodeInfo
   *  android.view.animation.DecelerateInterpolator
   *  android.view.animation.Interpolator
   *  android.widget.AbsListView
   *  android.widget.AbsListView$LayoutParams
   *  android.widget.AdapterView
   *  android.widget.AdapterView$OnItemSelectedListener
   *  android.widget.BaseAdapter
   *  android.widget.HorizontalScrollView
   *  android.widget.ImageView
   *  android.widget.Spinner
   *  android.widget.SpinnerAdapter
   *  android.widget.TextView
   *  android.widget.Toast
   */
  package android.support.v7.widget;
  
  import android.content.Context;
  import android.content.res.Configuration;
  import android.content.res.Resources;
  import android.graphics.drawable.Drawable;
  import android.os.Build;
  import android.support.annotation.RestrictTo;
  import android.support.v4.view.ViewCompat;
  import android.support.v4.view.ViewPropertyAnimatorCompat;
  import android.support.v4.view.ViewPropertyAnimatorListener;
  import android.support.v7.app.ActionBar;
  import android.support.v7.appcompat.R;
  import android.support.v7.view.ActionBarPolicy;
  import android.support.v7.widget.AppCompatImageView;
  import android.support.v7.widget.AppCompatSpinner;
  import android.support.v7.widget.AppCompatTextView;
  import android.support.v7.widget.LinearLayoutCompat;
  import android.support.v7.widget.TintTypedArray;
  import android.text.TextUtils;
  import android.util.AttributeSet;
  import android.util.DisplayMetrics;
  import android.view.View;
  import android.view.ViewGroup;
  import android.view.ViewParent;
  import android.view.accessibility.AccessibilityEvent;
  import android.view.accessibility.AccessibilityNodeInfo;
  import android.view.animation.DecelerateInterpolator;
  import android.view.animation.Interpolator;
  import android.widget.AbsListView;
  import android.widget.AdapterView;
  import android.widget.BaseAdapter;
  import android.widget.HorizontalScrollView;
  import android.widget.ImageView;
  import android.widget.Spinner;
  import android.widget.SpinnerAdapter;
  import android.widget.TextView;
  import android.widget.Toast;
  
  @RestrictTo(value={RestrictTo.Scope.GROUP_ID})
  public class ScrollingTabContainerView
  extends HorizontalScrollView
  implements AdapterView.OnItemSelectedListener {
      private static final int FADE_DURATION = 200;
      private static final String TAG = "ScrollingTabContainerView";
      private static final Interpolator sAlphaInterpolator = new DecelerateInterpolator();
      private boolean mAllowCollapse;
      private int mContentHeight;
      int mMaxTabWidth;
      private int mSelectedTabIndex;
      int mStackedTabMaxWidth;
      private TabClickListener mTabClickListener;
      LinearLayoutCompat mTabLayout;
      Runnable mTabSelector;
      private Spinner mTabSpinner;
      protected final VisibilityAnimListener mVisAnimListener;
      protected ViewPropertyAnimatorCompat mVisibilityAnim;
  
      public ScrollingTabContainerView(Context object) {
          super((Context)object);
          this.mVisAnimListener = new VisibilityAnimListener();
          this.setHorizontalScrollBarEnabled(false);
          object = ActionBarPolicy.get((Context)object);
          this.setContentHeight(object.getTabContainerHeight());
          this.mStackedTabMaxWidth = object.getStackedTabMaxWidth();
          this.mTabLayout = this.createTabLayout();
          this.addView((View)this.mTabLayout, new ViewGroup.LayoutParams(-2, -1));
      }
  
      private Spinner createSpinner() {
          AppCompatSpinner appCompatSpinner = new AppCompatSpinner(this.getContext(), null, R.attr.actionDropDownStyle);
          appCompatSpinner.setLayoutParams((ViewGroup.LayoutParams)new LinearLayoutCompat.LayoutParams(-2, -1));
          appCompatSpinner.setOnItemSelectedListener((AdapterView.OnItemSelectedListener)this);
          return appCompatSpinner;
      }
  
      private LinearLayoutCompat createTabLayout() {
          LinearLayoutCompat linearLayoutCompat = new LinearLayoutCompat(this.getContext(), null, R.attr.actionBarTabBarStyle);
          linearLayoutCompat.setMeasureWithLargestChildEnabled(true);
          linearLayoutCompat.setGravity(17);
          linearLayoutCompat.setLayoutParams((ViewGroup.LayoutParams)new LinearLayoutCompat.LayoutParams(-2, -1));
          return linearLayoutCompat;
      }
  
      private boolean isCollapsed() {
          if (this.mTabSpinner != null && this.mTabSpinner.getParent() == this) {
              return true;
          }
          return false;
      }
  
      private void performCollapse() {
          if (this.isCollapsed()) {
              return;
          }
          if (this.mTabSpinner == null) {
              this.mTabSpinner = this.createSpinner();
          }
          this.removeView((View)this.mTabLayout);
          this.addView((View)this.mTabSpinner, new ViewGroup.LayoutParams(-2, -1));
          if (this.mTabSpinner.getAdapter() == null) {
              this.mTabSpinner.setAdapter((SpinnerAdapter)new TabAdapter());
          }
          if (this.mTabSelector != null) {
              this.removeCallbacks(this.mTabSelector);
              this.mTabSelector = null;
          }
          this.mTabSpinner.setSelection(this.mSelectedTabIndex);
      }
  
      private boolean performExpand() {
          if (!this.isCollapsed()) {
              return false;
          }
          this.removeView((View)this.mTabSpinner);
          this.addView((View)this.mTabLayout, new ViewGroup.LayoutParams(-2, -1));
          this.setTabSelected(this.mTabSpinner.getSelectedItemPosition());
          return false;
      }
  
      public void addTab(ActionBar.Tab object, int n2, boolean bl) {
          object = this.createTabView((ActionBar.Tab)object, false);
          this.mTabLayout.addView((View)object, n2, (ViewGroup.LayoutParams)new LinearLayoutCompat.LayoutParams(0, -1, 1.0f));
          if (this.mTabSpinner != null) {
              ((TabAdapter)this.mTabSpinner.getAdapter()).notifyDataSetChanged();
          }
          if (bl) {
              object.setSelected(true);
          }
          if (this.mAllowCollapse) {
              this.requestLayout();
          }
      }
  
      public void addTab(ActionBar.Tab object, boolean bl) {
          object = this.createTabView((ActionBar.Tab)object, false);
          this.mTabLayout.addView((View)object, (ViewGroup.LayoutParams)new LinearLayoutCompat.LayoutParams(0, -1, 1.0f));
          if (this.mTabSpinner != null) {
              ((TabAdapter)this.mTabSpinner.getAdapter()).notifyDataSetChanged();
          }
          if (bl) {
              object.setSelected(true);
          }
          if (this.mAllowCollapse) {
              this.requestLayout();
          }
      }
  
      public void animateToTab(int n2) {
          final View view = this.mTabLayout.getChildAt(n2);
          if (this.mTabSelector != null) {
              this.removeCallbacks(this.mTabSelector);
          }
          this.mTabSelector = new Runnable(){
  
              @Override
              public void run() {
                  int n2 = view.getLeft();
                  int n3 = (ScrollingTabContainerView.this.getWidth() - view.getWidth()) / 2;
                  ScrollingTabContainerView.this.smoothScrollTo(n2 - n3, 0);
                  ScrollingTabContainerView.this.mTabSelector = null;
              }
          };
          this.post(this.mTabSelector);
      }
  
      public void animateToVisibility(int n2) {
          if (this.mVisibilityAnim != null) {
              this.mVisibilityAnim.cancel();
          }
          if (n2 == 0) {
              if (this.getVisibility() != 0) {
                  ViewCompat.setAlpha((View)this, 0.0f);
              }
              ViewPropertyAnimatorCompat viewPropertyAnimatorCompat = ViewCompat.animate((View)this).alpha(1.0f);
              viewPropertyAnimatorCompat.setDuration(200);
              viewPropertyAnimatorCompat.setInterpolator(sAlphaInterpolator);
              viewPropertyAnimatorCompat.setListener(this.mVisAnimListener.withFinalVisibility(viewPropertyAnimatorCompat, n2));
              viewPropertyAnimatorCompat.start();
              return;
          }
          ViewPropertyAnimatorCompat viewPropertyAnimatorCompat = ViewCompat.animate((View)this).alpha(0.0f);
          viewPropertyAnimatorCompat.setDuration(200);
          viewPropertyAnimatorCompat.setInterpolator(sAlphaInterpolator);
          viewPropertyAnimatorCompat.setListener(this.mVisAnimListener.withFinalVisibility(viewPropertyAnimatorCompat, n2));
          viewPropertyAnimatorCompat.start();
      }
  
      TabView createTabView(ActionBar.Tab object, boolean bl) {
          object = new TabView(this.getContext(), (ActionBar.Tab)object, bl);
          if (bl) {
              object.setBackgroundDrawable(null);
              object.setLayoutParams((ViewGroup.LayoutParams)new AbsListView.LayoutParams(-1, this.mContentHeight));
              return object;
          }
          object.setFocusable(true);
          if (this.mTabClickListener == null) {
              this.mTabClickListener = new TabClickListener();
          }
          object.setOnClickListener((View.OnClickListener)this.mTabClickListener);
          return object;
      }
  
      public void onAttachedToWindow() {
          super.onAttachedToWindow();
          if (this.mTabSelector != null) {
              this.post(this.mTabSelector);
          }
      }
  
      protected void onConfigurationChanged(Configuration object) {
          super.onConfigurationChanged((Configuration)object);
          object = ActionBarPolicy.get(this.getContext());
          this.setContentHeight(object.getTabContainerHeight());
          this.mStackedTabMaxWidth = object.getStackedTabMaxWidth();
      }
  
      public void onDetachedFromWindow() {
          super.onDetachedFromWindow();
          if (this.mTabSelector != null) {
              this.removeCallbacks(this.mTabSelector);
          }
      }
  
      public void onItemSelected(AdapterView<?> adapterView, View view, int n2, long l2) {
          ((TabView)view).getTab().select();
      }
  
      /*
       * Enabled aggressive block sorting
       */
      public void onMeasure(int n2, int n3) {
          n3 = View.MeasureSpec.getMode((int)n2);
          boolean bl = n3 == 1073741824;
          this.setFillViewport(bl);
          int n4 = this.mTabLayout.getChildCount();
          if (n4 > 1 && (n3 == 1073741824 || n3 == Integer.MIN_VALUE)) {
              this.mMaxTabWidth = n4 > 2 ? (int)((float)View.MeasureSpec.getSize((int)n2) * 0.4f) : View.MeasureSpec.getSize((int)n2) / 2;
              this.mMaxTabWidth = Math.min(this.mMaxTabWidth, this.mStackedTabMaxWidth);
          } else {
              this.mMaxTabWidth = -1;
          }
          n4 = View.MeasureSpec.makeMeasureSpec((int)this.mContentHeight, (int)1073741824);
          n3 = !bl && this.mAllowCollapse ? 1 : 0;
          if (n3 != 0) {
              this.mTabLayout.measure(0, n4);
              if (this.mTabLayout.getMeasuredWidth() > View.MeasureSpec.getSize((int)n2)) {
                  this.performCollapse();
              } else {
                  this.performExpand();
              }
          } else {
              this.performExpand();
          }
          n3 = this.getMeasuredWidth();
          super.onMeasure(n2, n4);
          n2 = this.getMeasuredWidth();
          if (bl && n3 != n2) {
              this.setTabSelected(this.mSelectedTabIndex);
          }
      }
  
      public void onNothingSelected(AdapterView<?> adapterView) {
      }
  
      public void removeAllTabs() {
          this.mTabLayout.removeAllViews();
          if (this.mTabSpinner != null) {
              ((TabAdapter)this.mTabSpinner.getAdapter()).notifyDataSetChanged();
          }
          if (this.mAllowCollapse) {
              this.requestLayout();
          }
      }
  
      public void removeTabAt(int n2) {
          this.mTabLayout.removeViewAt(n2);
          if (this.mTabSpinner != null) {
              ((TabAdapter)this.mTabSpinner.getAdapter()).notifyDataSetChanged();
          }
          if (this.mAllowCollapse) {
              this.requestLayout();
          }
      }
  
      public void setAllowCollapse(boolean bl) {
          this.mAllowCollapse = bl;
      }
  
      public void setContentHeight(int n2) {
          this.mContentHeight = n2;
          this.requestLayout();
      }
  
      /*
       * Enabled aggressive block sorting
       */
      public void setTabSelected(int n2) {
          this.mSelectedTabIndex = n2;
          int n3 = this.mTabLayout.getChildCount();
          for (int i2 = 0; i2 < n3; ++i2) {
              View view = this.mTabLayout.getChildAt(i2);
              boolean bl = i2 == n2;
              view.setSelected(bl);
              if (!bl) continue;
              this.animateToTab(n2);
          }
          if (this.mTabSpinner != null && n2 >= 0) {
              this.mTabSpinner.setSelection(n2);
          }
      }
  
      public void updateTab(int n2) {
          ((TabView)this.mTabLayout.getChildAt(n2)).update();
          if (this.mTabSpinner != null) {
              ((TabAdapter)this.mTabSpinner.getAdapter()).notifyDataSetChanged();
          }
          if (this.mAllowCollapse) {
              this.requestLayout();
          }
      }
  
      private class TabAdapter
      extends BaseAdapter {
          TabAdapter() {
          }
  
          public int getCount() {
              return ScrollingTabContainerView.this.mTabLayout.getChildCount();
          }
  
          public Object getItem(int n2) {
              return ((TabView)ScrollingTabContainerView.this.mTabLayout.getChildAt(n2)).getTab();
          }
  
          public long getItemId(int n2) {
              return n2;
          }
  
          public View getView(int n2, View view, ViewGroup viewGroup) {
              if (view == null) {
                  return ScrollingTabContainerView.this.createTabView((ActionBar.Tab)this.getItem(n2), true);
              }
              ((TabView)view).bindTab((ActionBar.Tab)this.getItem(n2));
              return view;
          }
      }
  
      private class TabClickListener
      implements View.OnClickListener {
          TabClickListener() {
          }
  
          /*
           * Enabled aggressive block sorting
           */
          public void onClick(View view) {
              ((TabView)view).getTab().select();
              int n2 = ScrollingTabContainerView.this.mTabLayout.getChildCount();
              int n3 = 0;
              while (n3 < n2) {
                  View view2 = ScrollingTabContainerView.this.mTabLayout.getChildAt(n3);
  