From c863f711817c7a87aaf1bf3d8707a4b4353894ac Mon Sep 17 00:00:00 2001 From: zachh Date: Fri, 12 Jan 2018 20:38:49 -0800 Subject: Fixed recycling issues in new call log. -Reset the text appearance when recycling -Clear the secondary call types when recycling Test: unit PiperOrigin-RevId: 181824011 Change-Id: I92cf2c570754e60f3559ad6b47157b3538c6e2cc --- java/com/android/dialer/calllog/ui/NewCallLogViewHolder.java | 4 ++++ java/com/android/dialer/calllog/ui/res/values/styles.xml | 11 +++++++++++ 2 files changed, 15 insertions(+) (limited to 'java') diff --git a/java/com/android/dialer/calllog/ui/NewCallLogViewHolder.java b/java/com/android/dialer/calllog/ui/NewCallLogViewHolder.java index 7c33c8721..2938d083b 100644 --- a/java/com/android/dialer/calllog/ui/NewCallLogViewHolder.java +++ b/java/com/android/dialer/calllog/ui/NewCallLogViewHolder.java @@ -105,6 +105,9 @@ final class NewCallLogViewHolder extends RecyclerView.ViewHolder { primaryTextView.setTextAppearance(R.style.primary_textview_new_call); // TODO(zachh): Styling for call type icons when the call is new. secondaryTextView.setTextAppearance(R.style.secondary_textview_new_call); + } else { + primaryTextView.setTextAppearance(R.style.primary_textview); + secondaryTextView.setTextAppearance(R.style.secondary_textview); } setNumberCalls(row); @@ -158,6 +161,7 @@ final class NewCallLogViewHolder extends RecyclerView.ViewHolder { private void setSecondaryCallTypes(CoalescedRow row) { // Only call type icon is shown before the secondary text. + secondaryCallTypeIconsView.clear(); secondaryCallTypeIconsView.add(row.callType()); // TODO(zachh): Per new mocks, may need to add method to CallTypeIconsView to disable coloring. diff --git a/java/com/android/dialer/calllog/ui/res/values/styles.xml b/java/com/android/dialer/calllog/ui/res/values/styles.xml index 23cb93e1a..f8502370a 100644 --- a/java/com/android/dialer/calllog/ui/res/values/styles.xml +++ b/java/com/android/dialer/calllog/ui/res/values/styles.xml @@ -16,10 +16,21 @@ --> + + + +