From b02468e5db4fd16251b333536b5d6dac36ab43a7 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 1 May 2020 17:01:27 +0200 Subject: [PATCH] show the call status below the other sides name --- .../contacts/pro/activities/CallActivity.kt | 10 ++++++++++ app/src/main/res/layout/activity_call.xml | 12 ++++++++++++ app/src/main/res/values/dimens.xml | 3 ++- app/src/main/res/values/donottranslate.xml | 1 + app/src/main/res/values/strings.xml | 4 ++++ 5 files changed, 29 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/CallActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/CallActivity.kt index b4ba46ae..8017e63d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/CallActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/CallActivity.kt @@ -118,6 +118,16 @@ class CallActivity : SimpleActivity() { Call.STATE_ACTIVE -> callStarted() Call.STATE_DISCONNECTED -> endCall() } + + val statusTextId = when (state) { + Call.STATE_RINGING -> R.string.is_calling + Call.STATE_DIALING -> R.string.is_called + Call.STATE_DISCONNECTED -> R.string.call_ended + Call.STATE_DISCONNECTING -> R.string.call_ending + else -> R.string.empty + } + + call_status_label.text = getString(statusTextId) } private fun acceptCall() { diff --git a/app/src/main/res/layout/activity_call.xml b/app/src/main/res/layout/activity_call.xml index 5f558130..9e28e024 100644 --- a/app/src/main/res/layout/activity_call.xml +++ b/app/src/main/res/layout/activity_call.xml @@ -29,6 +29,18 @@ app:layout_constraintTop_toBottomOf="@+id/caller_avatar" tools:text="Caller name" /> + + 72dp 30dp - 28sp + 34sp + 20sp 34sp diff --git a/app/src/main/res/values/donottranslate.xml b/app/src/main/res/values/donottranslate.xml index 41c8cb99..d13bc3e1 100644 --- a/app/src/main/res/values/donottranslate.xml +++ b/app/src/main/res/values/donottranslate.xml @@ -1,6 +1,7 @@ com.simplemobiletools.contacts.pro + IM AIM diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2bcb5b2f..fedec9f0 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -114,6 +114,10 @@ Accept Decline Unknown caller + Is Calling + Is Called + Call Ended + Call Ending Speed dial