|
@@ -12,7 +12,6 @@ import androidx.recyclerview.widget.RecyclerView;
|
12
|
12
|
import com.fusi24.rfid.R;
|
13
|
13
|
import com.fusi24.rfid.data.model.DataProblems;
|
14
|
14
|
import com.fusi24.rfid.util.DateHelper;
|
15
|
|
-import com.google.gson.Gson;
|
16
|
15
|
|
17
|
16
|
import java.util.ArrayList;
|
18
|
17
|
import java.util.List;
|
|
@@ -24,18 +23,13 @@ public class ScanResultAdapter extends RecyclerView.Adapter<ScanResultAdapter.Vi
|
24
|
23
|
|
25
|
24
|
private Context context;
|
26
|
25
|
private List<DataProblems> problemsList;
|
27
|
|
- private Gson gson = new Gson();
|
28
|
26
|
|
29
|
27
|
public ScanResultAdapter(Context context) {
|
30
|
28
|
this.context = context;
|
31
|
29
|
this.problemsList = new ArrayList<>();
|
32
|
30
|
}
|
33
|
31
|
|
34
|
|
- public List<DataProblems> getProblemsList() {
|
35
|
|
- return problemsList;
|
36
|
|
- }
|
37
|
|
-
|
38
|
|
- public void setProblemsList(List<DataProblems> problemsList) {
|
|
32
|
+ private void setProblemsList(List<DataProblems> problemsList) {
|
39
|
33
|
this.problemsList = problemsList;
|
40
|
34
|
}
|
41
|
35
|
|
|
@@ -70,12 +64,8 @@ public class ScanResultAdapter extends RecyclerView.Adapter<ScanResultAdapter.Vi
|
70
|
64
|
@Override
|
71
|
65
|
public void onBindViewHolder(@NonNull ScanResultAdapter.ViewHolder holder, int position) {
|
72
|
66
|
|
73
|
|
- System.out.println("DEVELOPER 3 : " + gson.toJson(problemsList));
|
74
|
|
-
|
75
|
67
|
DataProblems problems = problemsList.get(position);
|
76
|
68
|
|
77
|
|
- System.out.println("DEVELOPER 4 : " + gson.toJson(problems));
|
78
|
|
-
|
79
|
69
|
holder.tvDocumentName.setText(problems.getDataDocumentType().getName());
|
80
|
70
|
holder.tvDocumentStatus.setText(problems.getReason());
|
81
|
71
|
holder.tvDocumentDate.setText(DateHelper.convertDateToReadableDate(problems.getDataDocumentType().getUpdateDate()));
|