MCPcopy Create free account
hub / github.com/M66B/FairEmail / ViewHolder

Class ViewHolder

app/src/main/java/eu/faircode/email/AdapterLog.java:60–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 private DateFormat TF;
59
60 public class ViewHolder extends RecyclerView.ViewHolder {
61 private TextView tvTime;
62 private TextView tvData;
63
64 ViewHolder(View itemView) {
65 super(itemView);
66
67 tvTime = itemView.findViewById(R.id.tvTime);
68 tvData = itemView.findViewById(R.id.tvData);
69 }
70
71 private void bindTo(EntityLog log) {
72 tvTime.setText(TF.format(log.time));
73 SpannableStringBuilder ssb = new SpannableStringBuilderEx(log.data);
74
75 Integer color = log.getColor(context);
76 if (color != null)
77 ssb.setSpan(new ForegroundColorSpan(color), 0, ssb.length(), 0);
78
79 tvData.setText(ssb);
80 }
81 }
82
83 AdapterLog(Fragment parentFragment) {
84 this.parentFragment = parentFragment;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected