summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/voicemail/listui/NewVoicemailCallLogViewHolder.java
diff options
context:
space:
mode:
authoruabdullah <uabdullah@google.com>2017-09-29 15:38:38 -0700
committerEric Erfanian <erfanian@google.com>2017-10-03 10:39:52 -0700
commit259c569c371f6b24ab940a90a9a4c504f0b6fe3b (patch)
tree4baee256af9e94083dec4b69a738878f6633516a /java/com/android/dialer/voicemail/listui/NewVoicemailCallLogViewHolder.java
parentf7f9f3ba0f255ce8f9023ffb0aa61f927695da0a (diff)
Create UI support for voicemail transcription, location, date and duration.
Screenshot:http://screen/dwihQaaeaQC Bug: 64882313,33006245 Test: NewVoicemailCallLogViewHolderTest, NewVoicemailCallLogAdapterTest PiperOrigin-RevId: 170542645 Change-Id: I00c145c5856c3f1f53d12b0fd7bd80c63bb8a094
Diffstat (limited to 'java/com/android/dialer/voicemail/listui/NewVoicemailCallLogViewHolder.java')
-rw-r--r--java/com/android/dialer/voicemail/listui/NewVoicemailCallLogViewHolder.java19
1 files changed, 17 insertions, 2 deletions
diff --git a/java/com/android/dialer/voicemail/listui/NewVoicemailCallLogViewHolder.java b/java/com/android/dialer/voicemail/listui/NewVoicemailCallLogViewHolder.java
index 239c94633..9ec768464 100644
--- a/java/com/android/dialer/voicemail/listui/NewVoicemailCallLogViewHolder.java
+++ b/java/com/android/dialer/voicemail/listui/NewVoicemailCallLogViewHolder.java
@@ -18,18 +18,33 @@ package com.android.dialer.voicemail.listui;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;
+import com.android.dialer.voicemail.datasources.VoicemailData;
/** {@link RecyclerView.ViewHolder} for the new voicemail call log. */
final class NewVoicemailCallLogViewHolder extends RecyclerView.ViewHolder {
private final TextView primaryTextView;
+ private final TextView secondaryTextView;
+ private final TextView transcriptionTextView;
NewVoicemailCallLogViewHolder(View view) {
super(view);
primaryTextView = (TextView) view.findViewById(R.id.primary_text);
+ secondaryTextView = (TextView) view.findViewById(R.id.secondary_text);
+ transcriptionTextView = (TextView) view.findViewById(R.id.transcription_text);
}
- public void setPrimaryText(String name) {
- this.primaryTextView.setText(name);
+ void bind(VoicemailData voicemailData) {
+ primaryTextView.setText(voicemailData.name());
+ secondaryTextView.setText(getVoicemailLocationDateAndDuration(voicemailData));
+ transcriptionTextView.setText(voicemailData.transcription());
+ }
+
+ private String getVoicemailLocationDateAndDuration(VoicemailData voicemailData) {
+ return voicemailData.location()
+ + " · "
+ + voicemailData.date()
+ + " · "
+ + voicemailData.duration();
}
}