ImojiBrowserTabLayout.java 2.52 KB
package com.bitstrips.imoji.browser.views;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.design.widget.TabLayout;
import android.support.design.widget.TabLayout.OnTabSelectedListener;
import android.support.design.widget.TabLayout.Tab;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;

public class ImojiBrowserTabLayout
  extends TabLayout
{
  private static final int[] n = { 2130837746, 2130837935, 2130837938, 2130837941, 2130837944, 2130837947, 2130837950 };
  private static final int[] o = { 2130837745, 2130837933, 2130837936, 2130837939, 2130837942, 2130837945, 2130837948 };
  
  public ImojiBrowserTabLayout(Context paramContext)
  {
    super(paramContext);
  }
  
  public ImojiBrowserTabLayout(Context paramContext, AttributeSet paramAttributeSet)
  {
    super(paramContext, paramAttributeSet);
  }
  
  public void addTab(@NonNull TabLayout.Tab paramTab, int paramInt, boolean paramBoolean)
  {
    super.addTab(paramTab, paramInt, paramBoolean);
    if (paramBoolean)
    {
      paramTab.setIcon(n[paramInt]);
      return;
    }
    paramTab.setIcon(o[paramInt]);
  }
  
  public int getTabCount()
  {
    return 7;
  }
  
  public void setupWithViewPager(@NonNull ViewPager paramViewPager, boolean paramBoolean)
  {
    if (paramViewPager.getAdapter() == null) {
      return;
    }
    super.setupWithViewPager(paramViewPager, paramBoolean);
    setSelectedTabIndicatorColor(-1);
    addOnTabSelectedListener(new TabLayout.OnTabSelectedListener()
    {
      public final void onTabReselected(TabLayout.Tab paramAnonymousTab)
      {
        if (paramAnonymousTab.getPosition() == -1) {
          return;
        }
        paramAnonymousTab.setIcon(ImojiBrowserTabLayout.b()[paramAnonymousTab.getPosition()]);
      }
      
      public final void onTabSelected(TabLayout.Tab paramAnonymousTab)
      {
        if (paramAnonymousTab.getPosition() == -1) {
          return;
        }
        paramAnonymousTab.setIcon(ImojiBrowserTabLayout.b()[paramAnonymousTab.getPosition()]);
      }
      
      public final void onTabUnselected(TabLayout.Tab paramAnonymousTab)
      {
        if (paramAnonymousTab.getPosition() == -1) {
          return;
        }
        paramAnonymousTab.setIcon(ImojiBrowserTabLayout.c()[paramAnonymousTab.getPosition()]);
      }
    });
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/browser/views/ImojiBrowserTabLayout.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */