Commit 99b54f00 authored by Christophe Deschamps's avatar Christophe Deschamps
Browse files

Call view adjustements


Former-commit-id: 942a1eabbc63ed5fcb769431677879b5fe4e2cbc
parent 1ce1601c
......@@ -40,8 +40,8 @@ class CallViewModel(val call: Call) : ViewModel() {
val videoContent: MutableLiveData<Boolean> = MutableLiveData(false)
val videoFullScreen: MutableLiveData<Boolean> = MutableLiveData(false)
val speakerEnabled: MutableLiveData<Boolean> =
MutableLiveData(coreContext.core.outputAudioDevice?.type == AudioDevice.Type.Speaker)
val speakerDisabled: MutableLiveData<Boolean> =
MutableLiveData(coreContext.core.outputAudioDevice?.type != AudioDevice.Type.Speaker)
val microphoneMuted: MutableLiveData<Boolean> = MutableLiveData(!coreContext.core.micEnabled())
private var historyEvent: HistoryEvent
......@@ -143,10 +143,10 @@ class CallViewModel(val call: Call) : ViewModel() {
val audioDevice = coreContext.core.outputAudioDevice
if (audioDevice?.type == AudioDevice.Type.Speaker) {
coreContext.core.forceEarpieceAudioRoute()
speakerEnabled.value = false
speakerDisabled.value = true
} else {
coreContext.core.forceSpeakerAudioRoute()
speakerEnabled.value = true
speakerDisabled.value = false
}
}
......
......@@ -57,11 +57,11 @@
android:layout_weight="1"
bind:backgroundeffect='@{"incall_call_button"}'
bind:icon='@{"icons/speaker"}'
bind:off="@{callmodel.speakerEnabled}"
bind:off="@{callmodel.speakerDisabled}"
bind:onClick="@{()->callmodel.toggleSpeaker()}"
bind:outline='@{true}'
bind:text='@{"call_button_enable_speaker"}'
bind:textOff='@{"call_button_disable_speaker"}'
bind:text='@{"call_button_disable_speaker"}'
bind:textOff='@{"call_button_enable_speaker"}'
bind:tint='@{"color_c"}' />
</LinearLayout>
......
......@@ -18,9 +18,11 @@
<include
layout="@layout/widget_call_button"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginEnd="50dp"
android:layout_marginEnd="25dp"
android:layout_marginStart="25dp"
bind:backgroundeffect='@{"decline_call_button"}'
bind:icon='@{"icons/decline"}'
bind:onClick="@{()->callmodel.decline()}"
......@@ -30,9 +32,11 @@
<include
layout="@layout/widget_call_button"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginStart="50dp"
android:layout_marginStart="25dp"
android:layout_marginEnd="25dp"
bind:backgroundeffect='@{"accept_call_button"}'
bind:icon='@{"icons/phone"}'
bind:onClick="@{()->callmodel.extendedAccept()}"
......
......@@ -31,7 +31,7 @@
</data>
<LinearLayout
android:layout_width="100dp"
android:layout_width="120dp"
android:layout_height="100dp"
android:gravity="center"
android:orientation="vertical">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment