// Path: app/src/main/java/com/kong/home/tab/OnTabItemSelectedListener.java
// public interface OnTabItemSelectedListener {
// 
//     void onSelected(int index, int old);
// 
//     void onSelectRepeat(int index);
// }
// 
// Path: app/src/main/java/com/kong/home/tab/adapter/BottomTabAdapter.java
// public class BottomTabAdapter extends BaseTabAdapter<TabItemModel> {
// 
//     private static final String TAG = "BottomTabAdapter";
// 
//     public BottomTabAdapter(Context context, List<TabItemModel> tabItemModels) {
//         super(context, tabItemModels);
//     }
// 
//     @Override
//     public View getView(final int position) {
//         final TabItemView itemView = new TabItemView(getContext());
//         final TabItemModel info = getItem(position);
//         itemView.initialize(info.drawable, info.checkedDrawable, info.text);
//         return itemView;
//     }
// }
// 
// Path: app/src/main/java/com/kong/home/tab/event/SelectRepeatEvent.java
// public class SelectRepeatEvent {
//     public static final int HOMEINDEX = 0;
//     public static final int BLOGINDEX = 1;
//     public static final int GANKINDEX = 2;
//     public int type;
// 
//     public SelectRepeatEvent(int type) {
//         this.type = type;
//     }
// }


import android.content.Context;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.util.Log;
import android.util.SparseArray;
import android.view.Gravity;
import android.view.View;
import android.widget.LinearLayout;
import com.kong.home.tab.OnTabItemSelectedListener;
import com.kong.home.tab.adapter.BottomTabAdapter;
import com.kong.home.tab.event.SelectRepeatEvent;
import org.greenrobot.eventbus.EventBus;
import java.util.ArrayList;
import java.util.List;
package com.kong.home.tab.widget;






/**
 * Created by CaoPengfei on 16/4/11.
 */
public class BottomTabLayout extends LinearLayout {

    private static final String TAG = "BottomTabLayout";
    private int mSelectedIndex = -1;
    private BottomTabAdapter mBottomTabAdapter;

    private Context mContext;
    private TabViewPager mViewPager;

    private SparseArray<View> mTabViews;
// Path: app/src/main/java/com/kong/home/tab/OnTabItemSelectedListener.java
// public interface OnTabItemSelectedListener {
// 
//     void onSelected(int index, int old);
// 
//     void onSelectRepeat(int index);
// }
// 
// Path: app/src/main/java/com/kong/home/tab/adapter/BottomTabAdapter.java
// public class BottomTabAdapter extends BaseTabAdapter<TabItemModel> {
// 
//     private static final String TAG = "BottomTabAdapter";
// 
//     public BottomTabAdapter(Context context, List<TabItemModel> tabItemModels) {
//         super(context, tabItemModels);
//     }
// 
//     @Override
//     public View getView(final int position) {
//         final TabItemView itemView = new TabItemView(getContext());
//         final TabItemModel info = getItem(position);
//         itemView.initialize(info.drawable, info.checkedDrawable, info.text);
//         return itemView;
//     }
// }
// 
// Path: app/src/main/java/com/kong/home/tab/event/SelectRepeatEvent.java
// public class SelectRepeatEvent {
//     public static final int HOMEINDEX = 0;
//     public static final int BLOGINDEX = 1;
//     public static final int GANKINDEX = 2;
//     public int type;
// 
//     public SelectRepeatEvent(int type) {
//         this.type = type;
//     }
// }


// Path: app/src/main/java/com/kong/home/tab/widget/BottomTabLayout.java
import android.content.Context;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.util.Log;
import android.util.SparseArray;
import android.view.Gravity;
import android.view.View;
import android.widget.LinearLayout;
import com.kong.home.tab.OnTabItemSelectedListener;
import com.kong.home.tab.adapter.BottomTabAdapter;
import com.kong.home.tab.event.SelectRepeatEvent;
import org.greenrobot.eventbus.EventBus;
import java.util.ArrayList;
import java.util.List;

package com.kong.home.tab.widget;






/**
 * Created by CaoPengfei on 16/4/11.
 */
public class BottomTabLayout extends LinearLayout {

    private static final String TAG = "BottomTabLayout";
    private int mSelectedIndex = -1;
    private BottomTabAdapter mBottomTabAdapter;

    private Context mContext;
    private TabViewPager mViewPager;

    private SparseArray<View> mTabViews;
    private List<OnTabItemSelectedListener> mListeners = new ArrayList<>();