show the callers number at the call screen below name

This commit is contained in:
tibbi
2020-05-31 10:42:09 +02:00
parent ece538e9c2
commit e497df7a65
2 changed files with 18 additions and 1 deletions

View File

@ -190,6 +190,11 @@ class CallActivity : SimpleActivity() {
} }
caller_name_label.text = if (callContact!!.name.isNotEmpty()) callContact!!.name else getString(R.string.unknown_caller) 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) { if (callContactAvatar != null) {
caller_avatar.setImageBitmap(callContactAvatar) caller_avatar.setImageBitmap(callContactAvatar)

View File

@ -30,6 +30,18 @@
app:layout_constraintTop_toBottomOf="@+id/caller_avatar" app:layout_constraintTop_toBottomOf="@+id/caller_avatar"
tools:text="Caller name" /> tools:text="Caller name" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/caller_number_label"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/normal_margin"
android:gravity="center_horizontal"
android:textSize="@dimen/call_status_text_size"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/caller_name_label"
tools:text="0912 345 678" />
<com.simplemobiletools.commons.views.MyTextView <com.simplemobiletools.commons.views.MyTextView
android:id="@+id/call_status_label" android:id="@+id/call_status_label"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -39,7 +51,7 @@
android:textSize="@dimen/call_status_text_size" android:textSize="@dimen/call_status_text_size"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/caller_name_label" app:layout_constraintTop_toBottomOf="@+id/caller_number_label"
tools:text="Is Calling" /> tools:text="Is Calling" />
<ImageView <ImageView