summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorzachh <zachh@google.com>2018-01-12 20:38:49 -0800
committerCopybara-Service <copybara-piper@google.com>2018-01-12 20:41:15 -0800
commitc863f711817c7a87aaf1bf3d8707a4b4353894ac (patch)
treea9ba1a68c4c0ce03c99f65408ff35bcb10fee0ba /java
parent7f909de2ff58747e4756a1b9c0128f0602c9bb61 (diff)
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
Diffstat (limited to 'java')
-rw-r--r--java/com/android/dialer/calllog/ui/NewCallLogViewHolder.java4
-rw-r--r--java/com/android/dialer/calllog/ui/res/values/styles.xml11
2 files changed, 15 insertions, 0 deletions
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 @@
-->
<resources>
+ <style name="primary_textview">
+ <item name="android:textColor">@color/primary_text_color</item>
+ <item name="android:fontFamily">sans-serif</item>
+ </style>
+
<style name="primary_textview_new_call">
+ <item name="android:textColor">@color/primary_text_color</item>
<item name="android:fontFamily">sans-serif-medium</item>
</style>
+ <style name="secondary_textview">
+ <item name="android:textColor">@color/secondary_text_color</item>
+ <item name="android:fontFamily">sans-serif</item>
+ </style>
+
<style name="secondary_textview_new_call">
<item name="android:textColor">@color/missed_call</item>
<item name="android:fontFamily">sans-serif-medium</item>