<commit_before>package io.keybase.android.components;

import android.graphics.Color;
import android.os.SystemClock;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.uimanager.CatalystStylesDiffMap;
import com.facebook.react.uimanager.ThemedReactContext;
import com.facebook.react.uimanager.UIProp;
import com.facebook.react.uimanager.ViewGroupManager;
import com.facebook.react.uimanager.events.NativeGestureUtil;
import com.facebook.react.uimanager.events.RCTEventEmitter;

import java.util.ArrayList;

public class TabBarManager extends ViewGroupManager<LinearLayout> {

    private static final String REACT_CLASS = "TabBar";
    private final ArrayList<View> tabs = new ArrayList<>();
    private final ArrayList<String> titles = new ArrayList<>();
    private final ArrayList<Boolean> selectedStates = new ArrayList<>();
    private int selectedItem;

    @Override
    public String getName() {
        return REACT_CLASS;
    }

    @UIProp(UIProp.Type.ARRAY)
    public static final String PROP_TITLES = "titles";

    @UIProp(UIProp.Type.ARRAY)
    public static final String PROP_selectedStates = "selectedStates";

    @Override
    public boolean needsCustomLayoutForChildren() {
        return false;
    }

    @Override
    public void addView(final LinearLayout parent, final View child, final int index) {
        tabs.add(child);
        //TODO Clean up this getChildAt business
        SlidingTabLayout tabBar = (SlidingTabLayout) parent.getChildAt(0);
        ViewPager viewPager = (ViewPager) parent.getChildAt(1);
        viewPager.getAdapter().notifyDataSetChanged();
        tabBar.setViewPager(viewPager);
<commit_msg>Add Tag for logging of TabBarManager<commit_after>package io.keybase.android.components;

import android.graphics.Color;
import android.os.SystemClock;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.uimanager.CatalystStylesDiffMap;
import com.facebook.react.uimanager.ThemedReactContext;
import com.facebook.react.uimanager.UIProp;
import com.facebook.react.uimanager.ViewGroupManager;
import com.facebook.react.uimanager.events.NativeGestureUtil;
import com.facebook.react.uimanager.events.RCTEventEmitter;

import java.util.ArrayList;

public class TabBarManager extends ViewGroupManager<LinearLayout> {

    private static final String REACT_CLASS = "TabBar";
    private final ArrayList<View> tabs = new ArrayList<>();
    private final ArrayList<String> titles = new ArrayList<>();
    private final ArrayList<Boolean> selectedStates = new ArrayList<>();
    private int selectedItem;

    private static final String TAG = TabBarManager.class.getName();
    public String getName() {
        return REACT_CLASS;
    }

    @UIProp(UIProp.Type.ARRAY)
    public static final String PROP_TITLES = "titles";

    @UIProp(UIProp.Type.ARRAY)
    public static final String PROP_selectedStates = "selectedStates";

    @Override
    public boolean needsCustomLayoutForChildren() {
        return false;
    }

    @Override
    public void addView(final LinearLayout parent, final View child, final int index) {
        tabs.add(child);
        //TODO Clean up this getChildAt business
        SlidingTabLayout tabBar = (SlidingTabLayout) parent.getChildAt(0);
        ViewPager viewPager = (ViewPager) parent.getChildAt(1);
        viewPager.getAdapter().notifyDataSetChanged();
        tabBar.setViewPager(viewPager);

{'fraction_non_alphanumeric': 0.09286243516917757, 'fraction_numerical': 0.001975796492961225, 'mean_word_length': 4.5479452054794525, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5632741', 'n_tokens_mistral': 1165, 'n_tokens_neox': 1149, 'n_words': 262}