mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
show the callers number at the call screen below name
This commit is contained in:
@ -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)
|
||||
|
@ -30,6 +30,18 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/caller_avatar"
|
||||
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
|
||||
android:id="@+id/call_status_label"
|
||||
android:layout_width="wrap_content"
|
||||
@ -39,7 +51,7 @@
|
||||
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"
|
||||
app:layout_constraintTop_toBottomOf="@+id/caller_number_label"
|
||||
tools:text="Is Calling" />
|
||||
|
||||
<ImageView
|
||||
|
Reference in New Issue
Block a user