show the call status below the other sides name
This commit is contained in:
parent
6be6b546f5
commit
b02468e5db
|
@ -118,6 +118,16 @@ class CallActivity : SimpleActivity() {
|
||||||
Call.STATE_ACTIVE -> callStarted()
|
Call.STATE_ACTIVE -> callStarted()
|
||||||
Call.STATE_DISCONNECTED -> endCall()
|
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() {
|
private fun acceptCall() {
|
||||||
|
|
|
@ -29,6 +29,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/call_status_label"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/normal_margin"
|
||||||
|
android:alpha="0.8"
|
||||||
|
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="Is Calling" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/ongoing_call_holder"
|
android:id="@+id/ongoing_call_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
<dimen name="incoming_call_button_size">72dp</dimen>
|
<dimen name="incoming_call_button_size">72dp</dimen>
|
||||||
<dimen name="call_notification_button_size">30dp</dimen>
|
<dimen name="call_notification_button_size">30dp</dimen>
|
||||||
|
|
||||||
<dimen name="caller_name_text_size">28sp</dimen>
|
<dimen name="caller_name_text_size">34sp</dimen>
|
||||||
|
<dimen name="call_status_text_size">20sp</dimen>
|
||||||
<dimen name="dialpad_text_size">34sp</dimen>
|
<dimen name="dialpad_text_size">34sp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="package_name">com.simplemobiletools.contacts.pro</string>
|
<string name="package_name">com.simplemobiletools.contacts.pro</string>
|
||||||
|
<string name="empty"></string>
|
||||||
|
|
||||||
<string name="im">IM</string>
|
<string name="im">IM</string>
|
||||||
<string name="aim">AIM</string>
|
<string name="aim">AIM</string>
|
||||||
|
|
|
@ -114,6 +114,10 @@
|
||||||
<string name="accept">Accept</string>
|
<string name="accept">Accept</string>
|
||||||
<string name="decline">Decline</string>
|
<string name="decline">Decline</string>
|
||||||
<string name="unknown_caller">Unknown caller</string>
|
<string name="unknown_caller">Unknown caller</string>
|
||||||
|
<string name="is_calling">Is Calling</string>
|
||||||
|
<string name="is_called">Is Called</string>
|
||||||
|
<string name="call_ended">Call Ended</string>
|
||||||
|
<string name="call_ending">Call Ending</string>
|
||||||
|
|
||||||
<!-- Speed dial -->
|
<!-- Speed dial -->
|
||||||
<string name="speed_dial">Speed dial</string>
|
<string name="speed_dial">Speed dial</string>
|
||||||
|
|
Loading…
Reference in New Issue