endian11
2019-09-26 f4b92800b86383d7abe4e2cbf04f4083d0ce8d03
app/src/main/java/safeluck/drive/evaluation/fragment/TrainFragment.java
@@ -22,7 +22,7 @@
 * 邮箱:632393724@qq.com
 * All Rights Saved! Chongqing AnYun Tech co. LTD
 */
public class TrainFragment extends SupportFragment {
public class TrainFragment extends SupportFragment implements View.OnClickListener {
    private ListView mListView ;
    private ScoreAdapter mScoreAdapter;
@@ -42,6 +42,7 @@
    }
    private void initView(View view) {
        mListView = view.findViewById(R.id.lv);
        view.findViewById(R.id.view_map).setOnClickListener(this);
        mScoreAdapter = new ScoreAdapter(_mActivity);
        mListView.setAdapter(mScoreAdapter);
        mListView.addHeaderView(LayoutInflater.from(_mActivity).inflate(R.layout.layout_score_item,null));
@@ -51,4 +52,19 @@
        mScoreAdapter.addDatas(mArrayList);
    }
    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.view_map:
                MapFragment passwordFragment = findFragment(MapFragment.class);
                if (passwordFragment == null) {
                    passwordFragment = (MapFragment) MapFragment.newInstance();
                    start(passwordFragment);
                } else {
                    start(passwordFragment);
                }
                break;
        }
    }
}