diff options
author | uabdullah <uabdullah@google.com> | 2017-09-29 15:38:38 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-10-03 10:39:52 -0700 |
commit | 259c569c371f6b24ab940a90a9a4c504f0b6fe3b (patch) | |
tree | 4baee256af9e94083dec4b69a738878f6633516a /java/com/android/dialer/voicemail/listui/NewVoicemailCallLogAdapter.java | |
parent | f7f9f3ba0f255ce8f9023ffb0aa61f927695da0a (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/NewVoicemailCallLogAdapter.java')
-rw-r--r-- | java/com/android/dialer/voicemail/listui/NewVoicemailCallLogAdapter.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/java/com/android/dialer/voicemail/listui/NewVoicemailCallLogAdapter.java b/java/com/android/dialer/voicemail/listui/NewVoicemailCallLogAdapter.java index 63dae20d9..b40c8630e 100644 --- a/java/com/android/dialer/voicemail/listui/NewVoicemailCallLogAdapter.java +++ b/java/com/android/dialer/voicemail/listui/NewVoicemailCallLogAdapter.java @@ -20,23 +20,23 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.android.dialer.common.LogUtil; +import com.android.dialer.voicemail.datasources.VoicemailData; import java.util.List; /** {@link RecyclerView.Adapter} for the new voicemail call log fragment. */ final class NewVoicemailCallLogAdapter extends RecyclerView.Adapter<NewVoicemailCallLogViewHolder> { - private final List<String> values; + private final List<VoicemailData> voicemailData; - NewVoicemailCallLogAdapter(List<String> myDataset) { - values = myDataset; + NewVoicemailCallLogAdapter(List<VoicemailData> dataSet) { + voicemailData = dataSet; } @Override public NewVoicemailCallLogViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) { LayoutInflater inflater = LayoutInflater.from(viewGroup.getContext()); - View v = inflater.inflate(R.layout.voicemail_call_log_entry, viewGroup, false); - + View v = inflater.inflate(R.layout.new_voicemail_call_log_entry, viewGroup, false); NewVoicemailCallLogViewHolder newVoicemailCallLogViewHolder = new NewVoicemailCallLogViewHolder(v); return newVoicemailCallLogViewHolder; @@ -45,12 +45,11 @@ final class NewVoicemailCallLogAdapter extends RecyclerView.Adapter<NewVoicemail @Override public void onBindViewHolder(NewVoicemailCallLogViewHolder viewHolder, int position) { LogUtil.i("onBindViewHolder", "position" + position); - String name = values.get(position); - viewHolder.setPrimaryText(name); + viewHolder.bind(voicemailData.get(position)); } @Override public int getItemCount() { - return values.size(); + return voicemailData.size(); } } |