From e497df7a650c842825b7db71809ad09293ed67bf Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 31 May 2020 10:42:09 +0200 Subject: [PATCH] show the callers number at the call screen below name --- .../dialer/activities/CallActivity.kt | 5 +++++ app/src/main/res/layout/activity_call.xml | 14 +++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/dialer/activities/CallActivity.kt b/app/src/main/kotlin/com/simplemobiletools/dialer/activities/CallActivity.kt index 08cac7ad..5989de58 100644 --- a/app/src/main/kotlin/com/simplemobiletools/dialer/activities/CallActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/dialer/activities/CallActivity.kt @@ -190,6 +190,11 @@ class CallActivity : SimpleActivity() { } caller_name_label.text = if (callContact!!.name.isNotEmpty()) callContact!!.name else getString(R.string.unknown_caller) + if (callContact!!.number.isNotEmpty() && callContact!!.number != callContact!!.name) { + caller_number_label.text = callContact!!.number + } else { + caller_number_label.beGone() + } if (callContactAvatar != null) { caller_avatar.setImageBitmap(callContactAvatar) diff --git a/app/src/main/res/layout/activity_call.xml b/app/src/main/res/layout/activity_call.xml index 1b7cf4d1..6cd89d7b 100644 --- a/app/src/main/res/layout/activity_call.xml +++ b/app/src/main/res/layout/activity_call.xml @@ -30,6 +30,18 @@ app:layout_constraintTop_toBottomOf="@+id/caller_avatar" tools:text="Caller name" /> + +