| | |
| | | package safeluck.drive.evaluation.fragment; |
| | | |
| | | import android.os.Bundle; |
| | | import android.os.Handler; |
| | | import android.support.annotation.NonNull; |
| | | import android.support.annotation.Nullable; |
| | | import android.view.LayoutInflater; |
| | | import android.view.View; |
| | | import android.view.ViewGroup; |
| | | import android.widget.ListView; |
| | | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import me.yokeyword.fragmentation.SupportFragment; |
| | | import safeluck.drive.evaluation.R; |
| | | import safeluck.drive.evaluation.adapter.ScoreAdapter; |
| | | import safeluck.drive.evaluation.bean.ScoreBean; |
| | | |
| | | /** |
| | | * MyApplication2 |
| | |
| | | * All Rights Saved! Chongqing AnYun Tech co. LTD |
| | | */ |
| | | public class NetWorkTrainFragment extends SupportFragment { |
| | | |
| | | private ListView mListView ; |
| | | private ScoreAdapter mScoreAdapter; |
| | | |
| | | private List<ScoreBean> mArrayList = new ArrayList<>(); |
| | | |
| | | public static SupportFragment newInstance() { |
| | | return new NetWorkTrainFragment(); |
| | | } |
| | |
| | | @Nullable |
| | | @Override |
| | | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { |
| | | View view = inflater.inflate(R.layout.layout_net_train,container,false); |
| | | View view = inflater.inflate(R.layout.layout_stu_score,container,false); |
| | | initView(view); |
| | | return view; |
| | | } |
| | | |
| | | private void initView(View view) { |
| | | mListView = view.findViewById(R.id.lv); |
| | | mScoreAdapter = new ScoreAdapter(_mActivity); |
| | | mListView.setAdapter(mScoreAdapter); |
| | | mListView.addHeaderView(LayoutInflater.from(_mActivity).inflate(R.layout.layout_score_item,null)); |
| | | mArrayList.add(new ScoreBean(12,"直角转弯","后轮胎压线")); |
| | | mArrayList.add(new ScoreBean(100,"倒车入库","未系安全带")); |
| | | mArrayList.add(new ScoreBean(10,"坡道起步","一次熄火")); |
| | | mArrayList.add(new ScoreBean(0,"","")); |
| | | mArrayList.add(new ScoreBean(0,"","")); |
| | | |
| | | mScoreAdapter.addDatas(mArrayList); |
| | | |
| | | } |
| | | } |