| @ -0,0 +1,149 @@ | |||||
| package com.qhclh.ytzh.bean; | |||||
| /** | |||||
| * Created by 青花瓷 on 2017/11/30. | |||||
| */ | |||||
| public class ScanBean { | |||||
| private int id; | |||||
| private String infos_carname; | |||||
| private String infos_driver; | |||||
| private String infos_phone; | |||||
| private String infos_batch; | |||||
| private String infos_addrs; | |||||
| private String infos_time; | |||||
| private String infos_number; | |||||
| private String infos_immune; | |||||
| private String infos_uniformity; | |||||
| private String infos_startime; | |||||
| private String infos_endtime; | |||||
| public ScanBean(int id, String infos_carname, String infos_driver, String infos_phone, String infos_batch, String infos_addrs, String infos_time, String infos_number, String infos_immune, String infos_uniformity, String infos_startime, String infos_endtime) { | |||||
| this.id = id; | |||||
| this.infos_carname = infos_carname; | |||||
| this.infos_driver = infos_driver; | |||||
| this.infos_phone = infos_phone; | |||||
| this.infos_batch = infos_batch; | |||||
| this.infos_addrs = infos_addrs; | |||||
| this.infos_time = infos_time; | |||||
| this.infos_number = infos_number; | |||||
| this.infos_immune = infos_immune; | |||||
| this.infos_uniformity = infos_uniformity; | |||||
| this.infos_startime = infos_startime; | |||||
| this.infos_endtime = infos_endtime; | |||||
| } | |||||
| public int getId() { | |||||
| return id; | |||||
| } | |||||
| public void setId(int id) { | |||||
| this.id = id; | |||||
| } | |||||
| public String getInfos_carname() { | |||||
| return infos_carname; | |||||
| } | |||||
| public void setInfos_carname(String infos_carname) { | |||||
| this.infos_carname = infos_carname; | |||||
| } | |||||
| public String getInfos_driver() { | |||||
| return infos_driver; | |||||
| } | |||||
| public void setInfos_driver(String infos_driver) { | |||||
| this.infos_driver = infos_driver; | |||||
| } | |||||
| public String getInfos_phone() { | |||||
| return infos_phone; | |||||
| } | |||||
| public void setInfos_phone(String infos_phone) { | |||||
| this.infos_phone = infos_phone; | |||||
| } | |||||
| public String getInfos_batch() { | |||||
| return infos_batch; | |||||
| } | |||||
| public void setInfos_batch(String infos_batch) { | |||||
| this.infos_batch = infos_batch; | |||||
| } | |||||
| public String getInfos_addrs() { | |||||
| return infos_addrs; | |||||
| } | |||||
| public void setInfos_addrs(String infos_addrs) { | |||||
| this.infos_addrs = infos_addrs; | |||||
| } | |||||
| public String getInfos_time() { | |||||
| return infos_time; | |||||
| } | |||||
| public void setInfos_time(String infos_time) { | |||||
| this.infos_time = infos_time; | |||||
| } | |||||
| public String getInfos_number() { | |||||
| return infos_number; | |||||
| } | |||||
| public void setInfos_number(String infos_number) { | |||||
| this.infos_number = infos_number; | |||||
| } | |||||
| public String getInfos_immune() { | |||||
| return infos_immune; | |||||
| } | |||||
| public void setInfos_immune(String infos_immune) { | |||||
| this.infos_immune = infos_immune; | |||||
| } | |||||
| public String getInfos_uniformity() { | |||||
| return infos_uniformity; | |||||
| } | |||||
| public void setInfos_uniformity(String infos_uniformity) { | |||||
| this.infos_uniformity = infos_uniformity; | |||||
| } | |||||
| public String getInfos_startime() { | |||||
| return infos_startime; | |||||
| } | |||||
| public void setInfos_startime(String infos_startime) { | |||||
| this.infos_startime = infos_startime; | |||||
| } | |||||
| public String getInfos_endtime() { | |||||
| return infos_endtime; | |||||
| } | |||||
| public void setInfos_endtime(String infos_endtime) { | |||||
| this.infos_endtime = infos_endtime; | |||||
| } | |||||
| @Override | |||||
| public String toString() { | |||||
| return "ScanBean{" + | |||||
| "id=" + id + | |||||
| ", infos_carname='" + infos_carname + '\'' + | |||||
| ", infos_driver='" + infos_driver + '\'' + | |||||
| ", infos_phone='" + infos_phone + '\'' + | |||||
| ", infos_batch='" + infos_batch + '\'' + | |||||
| ", infos_addrs='" + infos_addrs + '\'' + | |||||
| ", infos_time='" + infos_time + '\'' + | |||||
| ", infos_number='" + infos_number + '\'' + | |||||
| ", infos_immune='" + infos_immune + '\'' + | |||||
| ", infos_uniformity='" + infos_uniformity + '\'' + | |||||
| ", infos_startime='" + infos_startime + '\'' + | |||||
| ", infos_endtime='" + infos_endtime + '\'' + | |||||
| '}'; | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,98 @@ | |||||
| package com.qhclh.ytzh.work.scan; | |||||
| import android.content.Context; | |||||
| import android.view.LayoutInflater; | |||||
| import android.view.View; | |||||
| import android.view.ViewGroup; | |||||
| import android.widget.BaseAdapter; | |||||
| import android.widget.TextView; | |||||
| import com.qhclh.ytzh.R; | |||||
| import com.qhclh.ytzh.bean.ScanBean; | |||||
| import java.util.List; | |||||
| /** | |||||
| * Created by 青花瓷 on 2017/11/30. | |||||
| */ | |||||
| public class ScanAdapter extends BaseAdapter { | |||||
| private Context context; | |||||
| private List<ScanBean> list; | |||||
| private LayoutInflater layoutInflater; | |||||
| public ScanAdapter(Context context, List<ScanBean> list) { | |||||
| this.context = context; | |||||
| this.list = list; | |||||
| layoutInflater = LayoutInflater.from(context); | |||||
| } | |||||
| @Override | |||||
| public int getCount() { | |||||
| return list.size(); | |||||
| } | |||||
| @Override | |||||
| public Object getItem(int i) { | |||||
| return list.get(i); | |||||
| } | |||||
| @Override | |||||
| public long getItemId(int i) { | |||||
| return list.get(i).getId(); | |||||
| } | |||||
| @Override | |||||
| public View getView(int i, View view, ViewGroup viewGroup) { | |||||
| ViewHolder viewHolder; | |||||
| ScanBean message = list.get(i); | |||||
| if (view == null){ | |||||
| view = layoutInflater.inflate(R.layout.item_infos,viewGroup,false); | |||||
| viewHolder = new ViewHolder(); | |||||
| viewHolder.infos_carname = view.findViewById(R.id.infos_carname); | |||||
| viewHolder.infos_driver = view.findViewById(R.id.infos_driver); | |||||
| viewHolder.infos_phone = view.findViewById(R.id.infos_phone); | |||||
| viewHolder.infos_batch = view.findViewById(R.id.infos_batch); | |||||
| viewHolder.infos_addrs = view.findViewById(R.id.infos_addrs); | |||||
| viewHolder.infos_time = view.findViewById(R.id.infos_time); | |||||
| viewHolder.infos_number = view.findViewById(R.id.infos_number); | |||||
| viewHolder.infos_immune = view.findViewById(R.id.infos_immune); | |||||
| viewHolder.infos_uniformity = view.findViewById(R.id.infos_uniformity); | |||||
| viewHolder.infos_startime = view.findViewById(R.id.infos_startime); | |||||
| viewHolder.infos_endtime = view.findViewById(R.id.infos_endtime); | |||||
| view.setTag(viewHolder); | |||||
| }else { | |||||
| viewHolder = (ViewHolder) view.getTag(); | |||||
| } | |||||
| viewHolder.infos_carname.setText(message.getInfos_carname()); | |||||
| viewHolder.infos_driver.setText(message.getInfos_driver()); | |||||
| viewHolder.infos_phone.setText(message.getInfos_phone()); | |||||
| viewHolder.infos_batch.setText(message.getInfos_batch()); | |||||
| viewHolder.infos_addrs.setText(message.getInfos_addrs()); | |||||
| viewHolder.infos_time.setText(message.getInfos_time()); | |||||
| viewHolder.infos_number.setText(message.getInfos_number()); | |||||
| viewHolder.infos_immune.setText(message.getInfos_immune()); | |||||
| viewHolder.infos_uniformity.setText(message.getInfos_uniformity()); | |||||
| viewHolder.infos_startime.setText(message.getInfos_startime()); | |||||
| viewHolder.infos_endtime.setText(message.getInfos_endtime()); | |||||
| return view; | |||||
| } | |||||
| private class ViewHolder{ | |||||
| private TextView infos_carname; | |||||
| private TextView infos_driver; | |||||
| private TextView infos_phone; | |||||
| private TextView infos_batch; | |||||
| private TextView infos_addrs; | |||||
| private TextView infos_time; | |||||
| private TextView infos_number; | |||||
| private TextView infos_immune; | |||||
| private TextView infos_uniformity; | |||||
| private TextView infos_startime; | |||||
| private TextView infos_endtime; | |||||
| } | |||||
| } | |||||
| @ -1,8 +1,28 @@ | |||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||||
| android:orientation="vertical" | |||||
| android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
| android:layout_height="match_parent"> | |||||
| android:layout_height="match_parent" | |||||
| android:background="@color/greyf4f4f4" | |||||
| android:orientation="vertical"> | |||||
| <include layout="@layout/include_tool_bar"></include> | |||||
| <TextView | |||||
| android:id="@+id/type" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content" | |||||
| android:background="@color/white" | |||||
| android:text="@string/app_name" | |||||
| android:padding="@dimen/dp_10" | |||||
| android:textSize="@dimen/text_size_16" /> | |||||
| <ListView | |||||
| android:id="@+id/lv_infos" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content" | |||||
| android:scrollbars="none"> | |||||
| </ListView> | |||||
| </LinearLayout> | </LinearLayout> | ||||
| @ -0,0 +1,254 @@ | |||||
| <?xml version="1.0" encoding="utf-8"?> | |||||
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
| android:orientation="vertical" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="match_parent"> | |||||
| <LinearLayout | |||||
| android:orientation="horizontal" | |||||
| android:padding="@dimen/dp_10" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content"> | |||||
| <TextView | |||||
| android:text="@string/carname" | |||||
| android:textSize="@dimen/text_size_18" | |||||
| android:textColor="@color/grey888888" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" /> | |||||
| <TextView | |||||
| android:id="@+id/infos_carname" | |||||
| android:textColor="@color/black303030" | |||||
| android:textSize="@dimen/text_size_20" | |||||
| android:text="@string/addrs" | |||||
| android:layout_marginLeft="@dimen/dp_5" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" /> | |||||
| </LinearLayout> | |||||
| <LinearLayout | |||||
| android:orientation="horizontal" | |||||
| android:padding="@dimen/dp_10" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content"> | |||||
| <TextView | |||||
| android:text="@string/driver" | |||||
| android:textSize="@dimen/text_size_18" | |||||
| android:textColor="@color/grey888888" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" /> | |||||
| <TextView | |||||
| android:id="@+id/infos_driver" | |||||
| android:textColor="@color/black303030" | |||||
| android:textSize="@dimen/text_size_20" | |||||
| android:text="@string/addrs" | |||||
| android:layout_marginLeft="@dimen/dp_5" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" /> | |||||
| </LinearLayout> | |||||
| <LinearLayout | |||||
| android:orientation="horizontal" | |||||
| android:padding="@dimen/dp_10" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content"> | |||||
| <TextView | |||||
| android:text="@string/phone" | |||||
| android:textSize="@dimen/text_size_18" | |||||
| android:textColor="@color/grey888888" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" /> | |||||
| <TextView | |||||
| android:id="@+id/infos_phone" | |||||
| android:textColor="@color/black303030" | |||||
| android:textSize="@dimen/text_size_20" | |||||
| android:text="@string/addrs" | |||||
| android:layout_marginLeft="@dimen/dp_5" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" /> | |||||
| </LinearLayout> | |||||
| <LinearLayout | |||||
| android:orientation="horizontal" | |||||
| android:padding="@dimen/dp_10" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content"> | |||||
| <TextView | |||||
| android:text="@string/batch" | |||||
| android:textSize="@dimen/text_size_18" | |||||
| android:textColor="@color/grey888888" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" /> | |||||
| <TextView | |||||
| android:id="@+id/infos_batch" | |||||
| android:textColor="@color/black303030" | |||||
| android:textSize="@dimen/text_size_20" | |||||
| android:text="@string/addrs" | |||||
| android:layout_marginLeft="@dimen/dp_5" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" /> | |||||
| </LinearLayout> | |||||
| <LinearLayout | |||||
| android:orientation="horizontal" | |||||
| android:padding="@dimen/dp_10" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content"> | |||||
| <TextView | |||||
| android:text="@string/addrs" | |||||
| android:textSize="@dimen/text_size_18" | |||||
| android:textColor="@color/grey888888" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" /> | |||||
| <TextView | |||||
| android:id="@+id/infos_addrs" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" | |||||
| android:layout_marginLeft="@dimen/dp_5" | |||||
| android:text="@string/addrs" | |||||
| android:textColor="@color/black303030" | |||||
| android:textSize="@dimen/text_size_20" /> | |||||
| </LinearLayout> | |||||
| <LinearLayout | |||||
| android:orientation="horizontal" | |||||
| android:padding="@dimen/dp_10" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content"> | |||||
| <TextView | |||||
| android:text="@string/time" | |||||
| android:textSize="@dimen/text_size_18" | |||||
| android:textColor="@color/grey888888" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" /> | |||||
| <TextView | |||||
| android:id="@+id/infos_time" | |||||
| android:textColor="@color/black303030" | |||||
| android:textSize="@dimen/text_size_20" | |||||
| android:text="@string/addrs" | |||||
| android:layout_marginLeft="@dimen/dp_5" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" /> | |||||
| </LinearLayout> | |||||
| <LinearLayout | |||||
| android:orientation="horizontal" | |||||
| android:padding="@dimen/dp_10" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content"> | |||||
| <TextView | |||||
| android:text="@string/number" | |||||
| android:textSize="@dimen/text_size_18" | |||||
| android:textColor="@color/grey888888" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" /> | |||||
| <TextView | |||||
| android:id="@+id/infos_number" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" | |||||
| android:layout_marginLeft="@dimen/dp_5" | |||||
| android:text="@string/addrs" | |||||
| android:textColor="@color/black303030" | |||||
| android:textSize="@dimen/text_size_20" /> | |||||
| </LinearLayout> | |||||
| <LinearLayout | |||||
| android:orientation="horizontal" | |||||
| android:padding="@dimen/dp_10" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content"> | |||||
| <TextView | |||||
| android:text="@string/immune" | |||||
| android:textSize="@dimen/text_size_18" | |||||
| android:textColor="@color/grey888888" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" /> | |||||
| <TextView | |||||
| android:id="@+id/infos_immune" | |||||
| android:textColor="@color/black303030" | |||||
| android:textSize="@dimen/text_size_20" | |||||
| android:text="@string/addrs" | |||||
| android:layout_marginLeft="@dimen/dp_5" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" /> | |||||
| </LinearLayout> | |||||
| <LinearLayout | |||||
| android:orientation="horizontal" | |||||
| android:padding="@dimen/dp_10" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content"> | |||||
| <TextView | |||||
| android:text="@string/Uniformity" | |||||
| android:textSize="@dimen/text_size_18" | |||||
| android:textColor="@color/grey888888" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" /> | |||||
| <TextView | |||||
| android:id="@+id/infos_uniformity" | |||||
| android:textColor="@color/black303030" | |||||
| android:textSize="@dimen/text_size_20" | |||||
| android:text="@string/addrs" | |||||
| android:layout_marginLeft="@dimen/dp_5" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" /> | |||||
| </LinearLayout> | |||||
| <LinearLayout | |||||
| android:orientation="horizontal" | |||||
| android:padding="@dimen/dp_10" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content"> | |||||
| <TextView | |||||
| android:text="@string/startime" | |||||
| android:textSize="@dimen/text_size_18" | |||||
| android:textColor="@color/grey888888" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" /> | |||||
| <TextView | |||||
| android:id="@+id/infos_startime" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" | |||||
| android:layout_marginLeft="@dimen/dp_5" | |||||
| android:text="@string/addrs" | |||||
| android:textColor="@color/black303030" | |||||
| android:textSize="@dimen/text_size_20" /> | |||||
| </LinearLayout> | |||||
| <LinearLayout | |||||
| android:orientation="horizontal" | |||||
| android:padding="@dimen/dp_10" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content"> | |||||
| <TextView | |||||
| android:text="@string/endtime" | |||||
| android:textSize="@dimen/text_size_18" | |||||
| android:textColor="@color/grey888888" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" /> | |||||
| <TextView | |||||
| android:id="@+id/infos_endtime" | |||||
| android:textColor="@color/black303030" | |||||
| android:textSize="@dimen/text_size_20" | |||||
| android:text="@string/addrs" | |||||
| android:layout_marginLeft="@dimen/dp_5" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" /> | |||||
| </LinearLayout> | |||||
| </LinearLayout> | |||||