<commit_before>package com.iped_system.iped.app.main;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;

import com.iped_system.iped.R;
import com.iped_system.iped.app.common.app.RetainFragment;
import com.iped_system.iped.app.common.os.ApiAsyncTask;
import com.iped_system.iped.common.main.TalkValue;
import com.iped_system.iped.common.main.TalksNewRequest;
import com.iped_system.iped.common.main.TalksNewResponse;
import com.iped_system.iped.common.main.TalksRequest;
import com.iped_system.iped.common.main.TalksResponse;

import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;

public class InterviewFragment extends Fragment implements MainActivity.RefreshObserver, PictogramFragment.OnFragmentInteractionListener {
    private static final String TAG = InterviewFragment.class.getName();
    private final InterviewFragment self = this;

    private Date lastUpdate;
    private ListView interviewListView;
    private Timer reloadTimer;
    private Handler handler = new Handler();

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.fragment_interview, container, false);

        /* 変数初期化 */
        this.lastUpdate = null;

        /* コマンド */
        Button postButton = (Button) rootView.findViewById(R.id.postButton);
        postButton.setOnClickListener(new PostListener());
        Button pictogramButton = (Button) rootView.findViewById(R.id.pictogramButton);
        pictogramButton.setOnClickListener(new PictogramListener());

        /* リストビュー */
        this.interviewListView = (ListView) rootView.findViewById(R.id.interviewListView);
        RetainFragment retainFragment = RetainFragment.findOrCreateRetainFragment(getFragmentManager());
        InterviewAdapter adapter = new InterviewAdapter(getActivity(), 0, retainFragment);
        this.interviewListView.setAdapter(adapter);

        return rootView;
    }

    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);
        ((MainActivity) activity).addObserver("interview", this);
    }

    @Override
    public void onStart() {
        super.onStart();
        this.reloadTimer = new Timer(true);<commit_msg>close #26 インタビュータブを開いた時に読み込む処理を追加<commit_after>package com.iped_system.iped.app.main;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;

import com.iped_system.iped.R;
import com.iped_system.iped.app.common.app.RetainFragment;
import com.iped_system.iped.app.common.os.ApiAsyncTask;
import com.iped_system.iped.common.main.TalkValue;
import com.iped_system.iped.common.main.TalksNewRequest;
import com.iped_system.iped.common.main.TalksNewResponse;
import com.iped_system.iped.common.main.TalksRequest;
import com.iped_system.iped.common.main.TalksResponse;

import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;

public class InterviewFragment extends Fragment implements MainActivity.RefreshObserver, PictogramFragment.OnFragmentInteractionListener {
    private static final String TAG = InterviewFragment.class.getName();
    private final InterviewFragment self = this;

    private Date lastUpdate;
    private ListView interviewListView;
    private Timer reloadTimer;
    private Handler handler = new Handler();

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.fragment_interview, container, false);

        /* 変数初期化 */
        this.lastUpdate = null;

        /* コマンド */
        Button postButton = (Button) rootView.findViewById(R.id.postButton);
        postButton.setOnClickListener(new PostListener());
        Button pictogramButton = (Button) rootView.findViewById(R.id.pictogramButton);
        pictogramButton.setOnClickListener(new PictogramListener());

        /* リストビュー */
        this.interviewListView = (ListView) rootView.findViewById(R.id.interviewListView);
        RetainFragment retainFragment = RetainFragment.findOrCreateRetainFragment(getFragmentManager());
        InterviewAdapter adapter = new InterviewAdapter(getActivity(), 0, retainFragment);
        this.interviewListView.setAdapter(adapter);

        return rootView;
    }

    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);
        ((MainActivity) activity).addObserver("interview", this);
    }

    @Override
    public void onStart() {
        super.onStart();
        this.reloadTalks();
        this.reloadTimer = new Timer(true);
{'fraction_non_alphanumeric': 0.09472693032015066, 'fraction_numerical': 0.0015065913370998117, 'mean_word_length': 4.062917063870353, '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': '7661328', 'n_tokens_mistral': 1579, 'n_tokens_neox': 1498, 'n_words': 290}