TaskShipItem.java
969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package com.huaheng.mobilewms.view;
import android.content.Context;
import android.graphics.Color;
import android.support.constraint.ConstraintLayout;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.huaheng.mobilewms.R;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class TaskShipItem extends ConstraintLayout {
@BindView(R.id.tasklabel)
TextView label;
@BindView(R.id.taskInfo)
TextView info;
public TaskShipItem(Context context, String l, String i){
super(context);
LayoutInflater.from(context).inflate(R.layout.task_ship_item_view, this);
ButterKnife.bind(this);
this.label.setText(l);
this.info.setText(i);
}
public void setDone(){
label.setTextColor(Color.rgb(125, 125, 125));
info.setTextColor(Color.rgb(125, 125, 125));
}
}