<commit_before>package com.wpp.study.tablayout;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;

import com.wpp.study.R;

import butterknife.BindView;
import butterknife.ButterKnife;

public class TabLayoutActivity extends AppCompatActivity {

    @BindView(R.id.activity_tablayout_layout_tablayout)
    TabLayout mTabLayout;

    @BindView(R.id.activity_tablayout_layout_viewpager)
    ViewPager mViewPager;

    private String[] mTitles = {"头条","本地"};//,"娱乐","体育","财经","科技","推荐"
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_tablayout_layout);
        ButterKnife.bind(this);

        mViewPager.setAdapter(new MyViewPagerAdapter(getSupportFragmentManager()));
        mTabLayout.setupWithViewPager(mViewPager);

    }

    class MyViewPagerAdapter extends FragmentPagerAdapter{

        public MyViewPagerAdapter(FragmentManager fm) {
            super(fm);
        }

        @Override<commit_msg>tablayout<commit_after>package com.wpp.study.tablayout;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;

import com.wpp.study.R;

import butterknife.BindView;
import butterknife.ButterKnife;

public class TabLayoutActivity extends AppCompatActivity {

    @BindView(R.id.activity_tablayout_layout_tablayout)
    TabLayout mTabLayout;

    @BindView(R.id.activity_tablayout_layout_viewpager)
    ViewPager mViewPager;

    private String[] mTitles = {"头条","本地","娱乐","体育","财经","科技","推荐"};//
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_tablayout_layout);
        ButterKnife.bind(this);

        mViewPager.setAdapter(new MyViewPagerAdapter(getSupportFragmentManager()));
        mTabLayout.setupWithViewPager(mViewPager);
//        mTabLayout.addTab(mTabLayout.newTab().setText("").setIcon(R.mipmap.ic_launcher_round));

    }

    class MyViewPagerAdapter extends FragmentPagerAdapter{

        public MyViewPagerAdapter(FragmentManager fm) {
            super(fm);
        }

        @Override
{'fraction_non_alphanumeric': 0.10409057706355003, 'fraction_numerical': 0.003652300949598247, 'mean_word_length': 4.544534412955466, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7391140', 'n_tokens_mistral': 874, 'n_tokens_neox': 867, 'n_words': 120}