diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2019-10-17 23:18:17 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2019-10-17 23:18:17 +0000 |
commit | d2803c1da78dfde25ce57f00d4379a01fa220fb3 (patch) | |
tree | b3d2619d7b0878f5d8faaea689836a2890905c4f | |
parent | 751d0a293d7452cded823a8c8b813ed71d27bdd4 (diff) | |
parent | aa46e68e2201b776869a5240536e6092c27b8877 (diff) | |
download | platform_packages_apps_Car_Dialer-d2803c1da78dfde25ce57f00d4379a01fa220fb3.tar.gz platform_packages_apps_Car_Dialer-d2803c1da78dfde25ce57f00d4379a01fa220fb3.tar.bz2 platform_packages_apps_Car_Dialer-d2803c1da78dfde25ce57f00d4379a01fa220fb3.zip |
Snap for 5948990 from aa46e68e2201b776869a5240536e6092c27b8877 to qt-qpr1-aml-release
Change-Id: Ib2badc921d46a245e2c059081d0e79b0736c7f5e
-rw-r--r-- | res/layout/call_history_list_item.xml | 2 | ||||
-rw-r--r-- | res/values/styles.xml | 6 | ||||
-rw-r--r-- | src/com/android/car/dialer/ui/calllog/CallLogViewHolder.java | 18 |
3 files changed, 17 insertions, 9 deletions
diff --git a/res/layout/call_history_list_item.xml b/res/layout/call_history_list_item.xml index 72806ec0..813a5e1b 100644 --- a/res/layout/call_history_list_item.xml +++ b/res/layout/call_history_list_item.xml @@ -77,7 +77,6 @@ limitations under the License. android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="@dimen/call_history_icons_margin" - android:textAppearance="?android:attr/textAppearanceSmall" android:singleLine="true" app:layout_constraintTop_toBottomOf="@id/title" app:layout_constraintStart_toEndOf="@id/call_type_icons" @@ -89,7 +88,6 @@ limitations under the License. android:layout_height="wrap_content" android:layout_marginStart="@dimen/call_history_icons_margin" android:layout_marginEnd="@dimen/call_history_text_margin_end" - android:textAppearance="?android:attr/textAppearanceSmall" android:singleLine="true" app:layout_constraintTop_toBottomOf="@id/title" app:layout_constraintBottom_toBottomOf="parent" diff --git a/res/values/styles.xml b/res/values/styles.xml index 9a3a9452..ac49ed15 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -118,6 +118,12 @@ <style name="TextAppearance.CallLogTitleDefault" parent="@style/TextAppearance.Body1"/> <!-- Customized text color for missed calls can be added here --> <style name="TextAppearance.CallLogTitleMissedCall" parent="@style/TextAppearance.Body1"/> + <style name="TextAppearance.CallLogCallCountDefault" parent="@style/TextAppearance.Body3"/> + <!-- Customized text color for missed calls can be added here --> + <style name="TextAppearance.CallLogCallCountMissedCall" parent="@style/TextAppearance.Body3"/> + <style name="TextAppearance.CallLogTimestampDefault" parent="@style/TextAppearance.Body3"/> + <!-- Customized text color for missed calls can be added here --> + <style name="TextAppearance.CallLogTimestampMissedCall" parent="@style/TextAppearance.Body3"/> <!-- Contact details --> <style name="TextAppearance.ContactDetailsTitle" parent="@style/TextAppearance.Display2"/> diff --git a/src/com/android/car/dialer/ui/calllog/CallLogViewHolder.java b/src/com/android/car/dialer/ui/calllog/CallLogViewHolder.java index cb89e12a..f28761a2 100644 --- a/src/com/android/car/dialer/ui/calllog/CallLogViewHolder.java +++ b/src/com/android/car/dialer/ui/calllog/CallLogViewHolder.java @@ -75,22 +75,26 @@ public class CallLogViewHolder extends RecyclerView.ViewHolder { mAvatarView, uiCallLog.getAvatarUri(), uiCallLog.getTitle()); - mTitleView.setText(uiCallLog.getTitle()); - if (uiCallLog.getMostRecentCallType() == CallHistoryLiveData.CallType.MISSED_TYPE) { - mTitleView.setTextAppearance(R.style.TextAppearance_CallLogTitleMissedCall); - } else { - mTitleView.setTextAppearance(R.style.TextAppearance_CallLogTitleDefault); - } + mTitleView.setText(uiCallLog.getTitle()); for (PhoneCallLog.Record record : uiCallLog.getCallRecords()) { mCallTypeIconsView.add(record.getCallType()); } - mCallCountTextView.setText(mCallTypeIconsView.getCallCountText()); mCallCountTextView.setVisibility( mCallTypeIconsView.getCallCountText() == null ? View.GONE : View.VISIBLE); mTextView.setText(uiCallLog.getText()); + if (uiCallLog.getMostRecentCallType() == CallHistoryLiveData.CallType.MISSED_TYPE) { + mTitleView.setTextAppearance(R.style.TextAppearance_CallLogTitleMissedCall); + mCallCountTextView.setTextAppearance(R.style.TextAppearance_CallLogCallCountMissedCall); + mTextView.setTextAppearance(R.style.TextAppearance_CallLogTimestampMissedCall); + } else { + mTitleView.setTextAppearance(R.style.TextAppearance_CallLogTitleDefault); + mCallCountTextView.setTextAppearance(R.style.TextAppearance_CallLogCallCountDefault); + mTextView.setTextAppearance(R.style.TextAppearance_CallLogTimestampDefault); + } + mPlaceCallView.setOnClickListener( view -> UiCallManager.get().placeCall(uiCallLog.getNumber())); |