| @ -0,0 +1,61 @@ | |||
| package com.qhclh.ytzh.bean; | |||
| /** | |||
| * Created by 青花瓷 on 2017/12/4. | |||
| */ | |||
| public class ProductionDailyBean { | |||
| private int id; | |||
| private String productionbatch; | |||
| private String productionaddrs; | |||
| private String ptime; | |||
| public ProductionDailyBean(int id, String productionbatch, String productionaddrs, String ptime) { | |||
| this.id = id; | |||
| this.productionbatch = productionbatch; | |||
| this.productionaddrs = productionaddrs; | |||
| this.ptime = ptime; | |||
| } | |||
| public int getId() { | |||
| return id; | |||
| } | |||
| public void setId(int id) { | |||
| this.id = id; | |||
| } | |||
| public String getProductionbatch() { | |||
| return productionbatch; | |||
| } | |||
| public void setProductionbatch(String productionbatch) { | |||
| this.productionbatch = productionbatch; | |||
| } | |||
| public String getProductionaddrs() { | |||
| return productionaddrs; | |||
| } | |||
| public void setProductionaddrs(String productionaddrs) { | |||
| this.productionaddrs = productionaddrs; | |||
| } | |||
| public String getPtime() { | |||
| return ptime; | |||
| } | |||
| public void setPtime(String ptime) { | |||
| this.ptime = ptime; | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return "ProductionDailyBean{" + | |||
| "id=" + id + | |||
| ", productionbatch='" + productionbatch + '\'' + | |||
| ", productionaddrs='" + productionaddrs + '\'' + | |||
| ", ptime='" + ptime + '\'' + | |||
| '}'; | |||
| } | |||
| } | |||
| @ -0,0 +1,76 @@ | |||
| package com.qhclh.ytzh.work.productiondaily; | |||
| 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.ProductionDailyBean; | |||
| import java.util.List; | |||
| /** | |||
| * Created by 青花瓷 on 2017/12/4. | |||
| */ | |||
| public class ProductiondailyAdapter extends BaseAdapter { | |||
| private Context context; | |||
| private List<ProductionDailyBean> list; | |||
| private LayoutInflater layoutInflater; | |||
| public ProductiondailyAdapter(Context context, List<ProductionDailyBean> 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; | |||
| ProductionDailyBean message = list.get(i); | |||
| if (view == null){ | |||
| view = layoutInflater.inflate(R.layout.item_productiondaily,viewGroup,false); | |||
| viewHolder = new ViewHolder(); | |||
| viewHolder.productiondaily_batch = view.findViewById(R.id.productiondaily_batch); | |||
| viewHolder.productiondaily_addrs = view.findViewById(R.id.productiondaily_addrs); | |||
| viewHolder.productiondaily_time = view.findViewById(R.id.productiondaily_time); | |||
| view.setTag(viewHolder); | |||
| }else { | |||
| viewHolder = (ViewHolder) view.getTag(); | |||
| } | |||
| viewHolder.productiondaily_batch.setText(message.getProductionbatch()); | |||
| viewHolder.productiondaily_addrs.setText(message.getProductionaddrs()); | |||
| viewHolder.productiondaily_time.setText(message.getPtime()); | |||
| return view; | |||
| } | |||
| private class ViewHolder{ | |||
| private TextView productiondaily_batch; | |||
| private TextView productiondaily_addrs; | |||
| private TextView productiondaily_time; | |||
| } | |||
| } | |||
| @ -0,0 +1,42 @@ | |||
| package com.qhclh.ytzh.work.productiondaily; | |||
| import android.support.v7.widget.Toolbar; | |||
| import android.view.View; | |||
| import com.qhclh.ytzh.R; | |||
| import com.qhclh.ytzh.base.BaseActivity; | |||
| import butterknife.BindView; | |||
| /** | |||
| * Created by 青花瓷 on 2017/12/4. | |||
| */ | |||
| public class ProductiondailyInfoActivity extends BaseActivity { | |||
| @BindView(R.id.toolbar) | |||
| Toolbar mToolbar; | |||
| @Override | |||
| protected int setLayoutId() { | |||
| return R.layout.act_productiondaily_info; | |||
| } | |||
| @Override | |||
| protected void initView() { | |||
| initToolbar(mToolbar, "生产日报详细", new View.OnClickListener() { | |||
| @Override | |||
| public void onClick(View view) { | |||
| finish(); | |||
| } | |||
| }); | |||
| } | |||
| @Override | |||
| protected void initData() { | |||
| } | |||
| @Override | |||
| protected void initOper() { | |||
| } | |||
| } | |||
| @ -0,0 +1,11 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
| android:orientation="vertical" | |||
| android:background="@color/greyf4f4f4" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="match_parent"> | |||
| <include layout="@layout/include_tool_bar"/> | |||
| </LinearLayout> | |||
| @ -0,0 +1,34 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:orientation="vertical"> | |||
| <TextView | |||
| android:id="@+id/productiondaily_batch" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:layout_margin="@dimen/dp_10" | |||
| android:textColor="@color/black303030" | |||
| android:textSize="@dimen/text_size_20" /> | |||
| <TextView | |||
| android:id="@+id/productiondaily_addrs" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:layout_below="@id/productiondaily_batch" | |||
| android:layout_margin="@dimen/dp_10" | |||
| android:textColor="@color/grey666666" | |||
| android:textSize="@dimen/text_size_20" /> | |||
| <TextView | |||
| android:id="@+id/productiondaily_time" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:layout_alignParentRight="true" | |||
| android:layout_alignTop="@id/productiondaily_addrs" | |||
| android:layout_marginRight="@dimen/dp_10" | |||
| android:textColor="@color/grey888888" | |||
| android:textSize="@dimen/text_size_18" /> | |||
| </RelativeLayout> | |||
| @ -0,0 +1,9 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <menu xmlns:android="http://schemas.android.com/apk/res/android" | |||
| xmlns:app="http://schemas.android.com/apk/res-auto"> | |||
| <item android:id="@+id/chose_time" | |||
| android:title="@string/chosedate" | |||
| android:icon="@drawable/riqi_3x" | |||
| android:orderInCategory="70" | |||
| app:showAsAction="always" /> | |||
| </menu> | |||