| @ -0,0 +1,61 @@ | |||
| package com.qhclh.ytzh.work.weighingsingle; | |||
| /** | |||
| * Created by 青花瓷 on 2018/3/12. | |||
| */ | |||
| public class WeightBean { | |||
| private long ID; | |||
| private String BreedFactory_Name; | |||
| private String Car_Name; | |||
| private int CarNumber; | |||
| public WeightBean(long ID, String breedFactory_Name, String car_Name, int carNumber) { | |||
| this.ID = ID; | |||
| BreedFactory_Name = breedFactory_Name; | |||
| Car_Name = car_Name; | |||
| CarNumber = carNumber; | |||
| } | |||
| public long getID() { | |||
| return ID; | |||
| } | |||
| public void setID(long ID) { | |||
| this.ID = ID; | |||
| } | |||
| public String getBreedFactory_Name() { | |||
| return BreedFactory_Name; | |||
| } | |||
| public void setBreedFactory_Name(String breedFactory_Name) { | |||
| BreedFactory_Name = breedFactory_Name; | |||
| } | |||
| public String getCar_Name() { | |||
| return Car_Name; | |||
| } | |||
| public void setCar_Name(String car_Name) { | |||
| Car_Name = car_Name; | |||
| } | |||
| public int getCarNumber() { | |||
| return CarNumber; | |||
| } | |||
| public void setCarNumber(int carNumber) { | |||
| CarNumber = carNumber; | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return "WeightBean{" + | |||
| "ID=" + ID + | |||
| ", BreedFactory_Name='" + BreedFactory_Name + '\'' + | |||
| ", Car_Name='" + Car_Name + '\'' + | |||
| ", CarNumber=" + CarNumber + | |||
| '}'; | |||
| } | |||
| } | |||
| @ -0,0 +1,45 @@ | |||
| package com.qhclh.ytzh.work.weighingsingle; | |||
| import android.content.Context; | |||
| import android.view.LayoutInflater; | |||
| import android.view.View; | |||
| import android.view.ViewGroup; | |||
| import android.widget.BaseAdapter; | |||
| import java.util.List; | |||
| /** | |||
| * Created by 青花瓷 on 2018/3/12. | |||
| */ | |||
| public class WeightlistAdapter extends BaseAdapter { | |||
| private Context context; | |||
| private List<WeightBean> list; | |||
| private LayoutInflater layoutInflater; | |||
| public WeightlistAdapter(Context context, List<WeightBean> 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) { | |||
| return null; | |||
| } | |||
| } | |||
| @ -0,0 +1,36 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
| android:id="@+id/item_weight_all" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:orientation="horizontal" | |||
| android:padding="@dimen/dp_10"> | |||
| <TextView | |||
| android:id="@+id/item_weight_item1" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_weight="1" | |||
| android:textColor="@color/black303030" | |||
| android:textSize="@dimen/text_size_14" /> | |||
| <TextView | |||
| android:id="@+id/item_weight_item2" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_weight="1" | |||
| android:textColor="@color/black303030" | |||
| android:textSize="@dimen/text_size_14" /> | |||
| <TextView | |||
| android:id="@+id/item_weight_item3" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_weight="1" | |||
| android:paddingLeft="@dimen/dp_20" | |||
| android:textColor="@color/black303030" | |||
| android:textSize="@dimen/text_size_14" /> | |||
| </LinearLayout> | |||