Factorized & improved code for call & conference layouts
This commit is contained in:
parent
c6b49080af
commit
a6cb6fb975
8 changed files with 388 additions and 539 deletions
|
@ -83,7 +83,7 @@ class ConferenceCallFragment : GenericFragment<VoipConferenceCallFragmentBinding
|
|||
viewLifecycleOwner
|
||||
) {
|
||||
if (it) {
|
||||
startTimer(R.id.grid_conference_timer)
|
||||
startTimer(R.id.active_conference_timer)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ class ConferenceCallFragment : GenericFragment<VoipConferenceCallFragmentBinding
|
|||
viewLifecycleOwner
|
||||
) {
|
||||
if (it) {
|
||||
startTimer(R.id.active_speaker_conference_timer)
|
||||
startTimer(R.id.active_conference_timer)
|
||||
|
||||
if (conferenceViewModel.conferenceExists.value == true) {
|
||||
Log.i("[Conference Call] Local participant is in conference and current layout is active speaker, updating Core's native window id")
|
||||
|
@ -111,7 +111,7 @@ class ConferenceCallFragment : GenericFragment<VoipConferenceCallFragmentBinding
|
|||
viewLifecycleOwner
|
||||
) {
|
||||
if (it) {
|
||||
startTimer(R.id.audio_only_conference_timer)
|
||||
startTimer(R.id.active_conference_timer)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -206,21 +206,21 @@ class ConferenceCallFragment : GenericFragment<VoipConferenceCallFragmentBinding
|
|||
Log.i("[Conference Call] Active speaker conference layout inflated")
|
||||
val binding = DataBindingUtil.bind<ViewDataBinding>(inflated)
|
||||
binding?.lifecycleOwner = viewLifecycleOwner
|
||||
startTimer(R.id.active_speaker_conference_timer)
|
||||
startTimer(R.id.active_conference_timer)
|
||||
}
|
||||
|
||||
binding.stubbedConferenceGridLayout.setOnInflateListener { _, inflated ->
|
||||
Log.i("[Conference Call] Mosaic conference layout inflated")
|
||||
val binding = DataBindingUtil.bind<ViewDataBinding>(inflated)
|
||||
binding?.lifecycleOwner = viewLifecycleOwner
|
||||
startTimer(R.id.grid_conference_timer)
|
||||
startTimer(R.id.active_conference_timer)
|
||||
}
|
||||
|
||||
binding.stubbedConferenceAudioOnlyLayout.setOnInflateListener { _, inflated ->
|
||||
Log.i("[Conference Call] Audio only conference layout inflated")
|
||||
val binding = DataBindingUtil.bind<ViewDataBinding>(inflated)
|
||||
binding?.lifecycleOwner = viewLifecycleOwner
|
||||
startTimer(R.id.audio_only_conference_timer)
|
||||
startTimer(R.id.active_conference_timer)
|
||||
}
|
||||
|
||||
binding.stubbedAudioRoutes.setOnInflateListener { _, inflated ->
|
||||
|
|
|
@ -3,13 +3,17 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="conferenceViewModel"
|
||||
type="org.linphone.activities.voip.viewmodels.ConferenceViewModel" />
|
||||
|
||||
<variable
|
||||
name="controlsViewModel"
|
||||
type="org.linphone.activities.voip.viewmodels.ControlsViewModel" />
|
||||
|
||||
<variable
|
||||
name="inflatedVisibility"
|
||||
type="Integer" />
|
||||
|
@ -18,8 +22,8 @@
|
|||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="@{inflatedVisibility}"
|
||||
android:layout_margin="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? @dimen/voip_remote_margin_full_screen : @dimen/voip_remote_margin, default=@dimen/voip_remote_margin}">
|
||||
android:layout_margin="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? @dimen/voip_remote_margin_full_screen : @dimen/voip_remote_margin, default=@dimen/voip_remote_margin}"
|
||||
android:visibility="@{inflatedVisibility}">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -27,94 +31,27 @@
|
|||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
<include
|
||||
android:id="@+id/header"
|
||||
layout="@layout/voip_conference_header"
|
||||
android:visibility="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? View.GONE : View.VISIBLE}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/voip_call_header_height"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
app:conferenceViewModel="@{conferenceViewModel}" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/call_header_title"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:text="@{conferenceViewModel.subject, default=@string/conference_default_title}"/>
|
||||
|
||||
<Chronometer
|
||||
android:id="@+id/grid_conference_timer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/call_header_subtitle" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:onClick="@{() -> conferenceViewModel.toggleRecording()}"
|
||||
android:selected="@{conferenceViewModel.isRecording}"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="40dp"
|
||||
android:background="@drawable/button_call_recording_background"
|
||||
android:src="@drawable/icon_call_record"
|
||||
android:contentDescription="@string/content_description_toggle_recording"
|
||||
android:padding="7dp"
|
||||
android:layout_marginEnd="10dp"/>
|
||||
|
||||
<ImageView
|
||||
android:onClick="@{() -> conferenceViewModel.pauseConference()}"
|
||||
android:selected="@{conferenceViewModel.isConferenceLocallyPaused}"
|
||||
android:enabled="@{!conferenceViewModel.conferenceCreationPending}"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="40dp"
|
||||
android:background="@drawable/button_toggle_background"
|
||||
android:src="@drawable/icon_pause"
|
||||
android:contentDescription="@string/content_description_pause_call"
|
||||
android:padding="5dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="@{conferenceViewModel.isRemotelyRecorded ? View.VISIBLE : View.GONE, default=gone}"
|
||||
<include
|
||||
android:id="@+id/remote_recording"
|
||||
layout="@layout/voip_remote_recording"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/shape_remote_recording_background">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/voip_remote_recording"
|
||||
android:contentDescription="@null"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
style="@style/call_remote_recording_font"
|
||||
android:layout_marginStart="10dp"
|
||||
android:text="@string/call_remote_recording"/>
|
||||
|
||||
</LinearLayout>
|
||||
android:visibility="@{conferenceViewModel.isRemotelyRecorded ? View.VISIBLE : View.GONE, default=gone}" />
|
||||
|
||||
<org.linphone.activities.voip.views.GridBoxLayout
|
||||
android:layout_margin="5dp"
|
||||
android:onClick="@{() -> controlsViewModel.toggleFullScreen()}"
|
||||
centerContent="@{true}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:onClick="@{() -> controlsViewModel.toggleFullScreen()}"
|
||||
app:entries="@{conferenceViewModel.conferenceParticipantDevices}"
|
||||
app:layout="@{@layout/voip_conference_participant_remote_grid}"
|
||||
centerContent="@{true}"
|
||||
/>
|
||||
app:layout="@{@layout/voip_conference_participant_remote_grid}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -3,13 +3,17 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="conferenceViewModel"
|
||||
type="org.linphone.activities.voip.viewmodels.ConferenceViewModel" />
|
||||
|
||||
<variable
|
||||
name="controlsViewModel"
|
||||
type="org.linphone.activities.voip.viewmodels.ControlsViewModel" />
|
||||
|
||||
<variable
|
||||
name="inflatedVisibility"
|
||||
type="Integer" />
|
||||
|
@ -18,131 +22,63 @@
|
|||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="@{inflatedVisibility}"
|
||||
android:layout_margin="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? @dimen/voip_remote_margin_full_screen : @dimen/voip_remote_margin, default=@dimen/voip_remote_margin}">
|
||||
android:layout_margin="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? @dimen/voip_remote_margin_full_screen : @dimen/voip_remote_margin, default=@dimen/voip_remote_margin}"
|
||||
android:visibility="@{inflatedVisibility}">
|
||||
|
||||
<LinearLayout
|
||||
<include
|
||||
android:id="@+id/header"
|
||||
layout="@layout/voip_conference_header"
|
||||
android:visibility="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? View.GONE : View.VISIBLE}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/voip_call_header_height"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
app:conferenceViewModel="@{conferenceViewModel}" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/call_header_title"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:text="@{conferenceViewModel.subject, default=@string/conference_default_title}"/>
|
||||
|
||||
<Chronometer
|
||||
android:id="@+id/active_speaker_conference_timer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/call_header_subtitle" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:onClick="@{() -> conferenceViewModel.toggleRecording()}"
|
||||
android:selected="@{conferenceViewModel.isRecording}"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="40dp"
|
||||
android:background="@drawable/button_call_recording_background"
|
||||
android:src="@drawable/icon_call_record"
|
||||
android:contentDescription="@string/content_description_toggle_recording"
|
||||
android:padding="7dp"
|
||||
android:layout_marginEnd="10dp"/>
|
||||
|
||||
<ImageView
|
||||
android:onClick="@{() -> conferenceViewModel.pauseConference()}"
|
||||
android:selected="@{conferenceViewModel.isConferenceLocallyPaused}"
|
||||
android:enabled="@{!conferenceViewModel.conferenceCreationPending}"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="40dp"
|
||||
android:background="@drawable/button_toggle_background"
|
||||
android:src="@drawable/icon_pause"
|
||||
android:contentDescription="@string/content_description_pause_call"
|
||||
android:padding="5dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
<include
|
||||
android:id="@+id/remote_recording"
|
||||
android:visibility="@{conferenceViewModel.isRemotelyRecorded ? View.VISIBLE : View.GONE, default=gone}"
|
||||
layout="@layout/voip_remote_recording"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/header"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/shape_remote_recording_background">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/voip_remote_recording"
|
||||
android:contentDescription="@null"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
style="@style/call_remote_recording_font"
|
||||
android:layout_marginStart="10dp"
|
||||
android:text="@string/call_remote_recording"/>
|
||||
|
||||
</LinearLayout>
|
||||
android:visibility="@{conferenceViewModel.isRemotelyRecorded ? View.VISIBLE : View.GONE, default=gone}" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:onClick="@{() -> controlsViewModel.toggleFullScreen()}"
|
||||
android:background="@drawable/shape_remote_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@id/miniatures"
|
||||
android:layout_below="@id/remote_recording"
|
||||
android:layout_above="@id/miniatures">
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/shape_remote_background"
|
||||
android:onClick="@{() -> controlsViewModel.toggleFullScreen()}">
|
||||
|
||||
<include
|
||||
layout="@layout/voip_contact_avatar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHeight_max="200dp"
|
||||
app:data="@{conferenceViewModel.speakingParticipant}"
|
||||
layout="@layout/voip_contact_avatar"/>
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_max="200dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<org.linphone.activities.voip.views.RoundCornersTextureView
|
||||
android:id="@+id/conference_active_speaker_remote_video"
|
||||
android:visibility="@{!conferenceViewModel.isConferenceLocallyPaused && conferenceViewModel.speakingParticipant.videoEnabled ? View.VISIBLE : View.GONE}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:visibility="@{!conferenceViewModel.isConferenceLocallyPaused && conferenceViewModel.speakingParticipant.videoEnabled ? View.VISIBLE : View.GONE}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:text="@{conferenceViewModel.speakingParticipant.contact.fullName ?? conferenceViewModel.speakingParticipant.displayName}"
|
||||
style="@style/call_remote_name_font"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="@{conferenceViewModel.speakingParticipant.contact.fullName ?? conferenceViewModel.speakingParticipant.displayName}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
@ -170,8 +106,8 @@
|
|||
android:id="@+id/scroll_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
app:dotColor="@color/voip_gray_background"
|
||||
|
|
|
@ -4,13 +4,17 @@
|
|||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="conferenceViewModel"
|
||||
type="org.linphone.activities.voip.viewmodels.ConferenceViewModel" />
|
||||
|
||||
<variable
|
||||
name="controlsViewModel"
|
||||
type="org.linphone.activities.voip.viewmodels.ControlsViewModel" />
|
||||
|
||||
<variable
|
||||
name="inflatedVisibility"
|
||||
type="Integer" />
|
||||
|
@ -19,120 +23,53 @@
|
|||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="@{inflatedVisibility}"
|
||||
android:layout_margin="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? @dimen/voip_remote_margin_full_screen : @dimen/voip_remote_margin, default=@dimen/voip_remote_margin}">
|
||||
android:layout_margin="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? @dimen/voip_remote_margin_full_screen : @dimen/voip_remote_margin, default=@dimen/voip_remote_margin}"
|
||||
android:visibility="@{inflatedVisibility}">
|
||||
|
||||
<LinearLayout
|
||||
<include
|
||||
android:id="@+id/header"
|
||||
layout="@layout/voip_conference_header"
|
||||
android:visibility="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? View.GONE : View.VISIBLE}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/voip_call_header_height"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
app:conferenceViewModel="@{conferenceViewModel}" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/call_header_title"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:text="@{conferenceViewModel.subject, default=@string/conference_default_title}"/>
|
||||
|
||||
<Chronometer
|
||||
android:id="@+id/audio_only_conference_timer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/call_header_subtitle" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:onClick="@{() -> conferenceViewModel.toggleRecording()}"
|
||||
android:selected="@{conferenceViewModel.isRecording}"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="40dp"
|
||||
android:background="@drawable/button_call_recording_background"
|
||||
android:src="@drawable/icon_call_record"
|
||||
android:contentDescription="@string/content_description_toggle_recording"
|
||||
android:padding="7dp"
|
||||
android:layout_marginEnd="10dp"/>
|
||||
|
||||
<ImageView
|
||||
android:onClick="@{() -> conferenceViewModel.pauseConference()}"
|
||||
android:selected="@{conferenceViewModel.isConferenceLocallyPaused}"
|
||||
android:enabled="@{!conferenceViewModel.conferenceCreationPending}"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="40dp"
|
||||
android:background="@drawable/button_toggle_background"
|
||||
android:src="@drawable/icon_pause"
|
||||
android:contentDescription="@string/content_description_pause_call"
|
||||
android:padding="5dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
<include
|
||||
android:id="@+id/remote_recording"
|
||||
android:visibility="@{conferenceViewModel.isRemotelyRecorded ? View.VISIBLE : View.GONE, default=gone}"
|
||||
layout="@layout/voip_remote_recording"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/header"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/shape_remote_recording_background">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/voip_remote_recording"
|
||||
android:contentDescription="@null"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
style="@style/call_remote_recording_font"
|
||||
android:layout_marginStart="10dp"
|
||||
android:text="@string/call_remote_recording"/>
|
||||
|
||||
</LinearLayout>
|
||||
android:layout_margin="10dp"
|
||||
android:visibility="@{conferenceViewModel.isRemotelyRecorded ? View.VISIBLE : View.GONE, default=gone}" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:background="@drawable/shape_remote_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@id/miniatures"
|
||||
android:layout_below="@id/remote_recording"
|
||||
android:layout_above="@id/miniatures">
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/shape_remote_background">
|
||||
|
||||
<include
|
||||
layout="@layout/voip_contact_avatar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHeight_max="200dp"
|
||||
app:data="@{conferenceViewModel.speakingParticipant}"
|
||||
layout="@layout/voip_contact_avatar"/>
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_max="200dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:text="@{conferenceViewModel.speakingParticipant.contact.fullName ?? conferenceViewModel.speakingParticipant.displayName}"
|
||||
style="@style/call_remote_name_font"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="@{conferenceViewModel.speakingParticipant.contact.fullName ?? conferenceViewModel.speakingParticipant.displayName}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
|
|
@ -3,13 +3,17 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="conferenceViewModel"
|
||||
type="org.linphone.activities.voip.viewmodels.ConferenceViewModel" />
|
||||
|
||||
<variable
|
||||
name="controlsViewModel"
|
||||
type="org.linphone.activities.voip.viewmodels.ControlsViewModel" />
|
||||
|
||||
<variable
|
||||
name="inflatedVisibility"
|
||||
type="Integer" />
|
||||
|
@ -18,8 +22,8 @@
|
|||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="@{inflatedVisibility}"
|
||||
android:layout_margin="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? @dimen/voip_remote_margin_full_screen : @dimen/voip_remote_margin, default=@dimen/voip_remote_margin}">
|
||||
android:layout_margin="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? @dimen/voip_remote_margin_full_screen : @dimen/voip_remote_margin, default=@dimen/voip_remote_margin}"
|
||||
android:visibility="@{inflatedVisibility}">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -27,94 +31,27 @@
|
|||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
<include
|
||||
android:id="@+id/header"
|
||||
layout="@layout/voip_conference_header"
|
||||
android:visibility="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? View.GONE : View.VISIBLE}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/voip_call_header_height"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
app:conferenceViewModel="@{conferenceViewModel}" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/call_header_title"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:text="@{conferenceViewModel.subject, default=@string/conference_default_title}"/>
|
||||
|
||||
<Chronometer
|
||||
android:id="@+id/grid_conference_timer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/call_header_subtitle" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:onClick="@{() -> conferenceViewModel.toggleRecording()}"
|
||||
android:selected="@{conferenceViewModel.isRecording}"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="40dp"
|
||||
android:background="@drawable/button_call_recording_background"
|
||||
android:src="@drawable/icon_call_record"
|
||||
android:contentDescription="@string/content_description_toggle_recording"
|
||||
android:padding="7dp"
|
||||
android:layout_marginEnd="10dp"/>
|
||||
|
||||
<ImageView
|
||||
android:onClick="@{() -> conferenceViewModel.pauseConference()}"
|
||||
android:selected="@{conferenceViewModel.isConferenceLocallyPaused}"
|
||||
android:enabled="@{!conferenceViewModel.conferenceCreationPending}"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="40dp"
|
||||
android:background="@drawable/button_toggle_background"
|
||||
android:src="@drawable/icon_pause"
|
||||
android:contentDescription="@string/content_description_pause_call"
|
||||
android:padding="5dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="@{conferenceViewModel.isRemotelyRecorded ? View.VISIBLE : View.GONE, default=gone}"
|
||||
<include
|
||||
android:id="@+id/remote_recording"
|
||||
layout="@layout/voip_remote_recording"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/shape_remote_recording_background">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/voip_remote_recording"
|
||||
android:contentDescription="@null"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
style="@style/call_remote_recording_font"
|
||||
android:layout_marginStart="10dp"
|
||||
android:text="@string/call_remote_recording"/>
|
||||
|
||||
</LinearLayout>
|
||||
android:visibility="@{conferenceViewModel.isRemotelyRecorded ? View.VISIBLE : View.GONE, default=gone}" />
|
||||
|
||||
<org.linphone.activities.voip.views.GridBoxLayout
|
||||
android:layout_margin="5dp"
|
||||
android:onClick="@{() -> controlsViewModel.toggleFullScreen()}"
|
||||
centerContent="@{true}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:onClick="@{() -> controlsViewModel.toggleFullScreen()}"
|
||||
app:entries="@{conferenceViewModel.conferenceParticipantDevices}"
|
||||
app:layout="@{@layout/voip_conference_participant_remote_grid}"
|
||||
centerContent="@{true}"
|
||||
/>
|
||||
app:layout="@{@layout/voip_conference_participant_remote_grid}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
75
app/src/main/res/layout/voip_conference_header.xml
Normal file
75
app/src/main/res/layout/voip_conference_header.xml
Normal file
|
@ -0,0 +1,75 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="conferenceViewModel"
|
||||
type="org.linphone.activities.voip.viewmodels.ConferenceViewModel" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/group"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="remote_name,active_conference_timer,toggle_conference_recording,toggle_pause_conference" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/remote_name"
|
||||
style="@style/call_header_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="@{conferenceViewModel.subject, default=@string/conference_default_title}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Chronometer
|
||||
android:id="@+id/active_conference_timer"
|
||||
style="@style/call_header_subtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/remote_name" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/toggle_pause_conference"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/button_toggle_background"
|
||||
android:contentDescription="@string/content_description_pause_call"
|
||||
android:enabled="@{!conferenceViewModel.conferenceCreationPending}"
|
||||
android:onClick="@{() -> conferenceViewModel.pauseConference()}"
|
||||
android:padding="5dp"
|
||||
android:selected="@{conferenceViewModel.isConferenceLocallyPaused}"
|
||||
android:src="@drawable/icon_pause"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/toggle_conference_recording"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="@drawable/button_call_recording_background"
|
||||
android:contentDescription="@string/content_description_toggle_recording"
|
||||
android:onClick="@{() -> conferenceViewModel.toggleRecording()}"
|
||||
android:padding="7dp"
|
||||
android:selected="@{conferenceViewModel.isRecording}"
|
||||
android:src="@drawable/icon_call_record"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/toggle_pause_conference"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
52
app/src/main/res/layout/voip_remote_recording.xml
Normal file
52
app/src/main/res/layout/voip_remote_recording.xml
Normal file
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/remote_recording_background"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/shape_remote_recording_background"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/remote_recording_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/voip_remote_recording"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/remote_recording_text"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/remote_recording_text"
|
||||
style="@style/call_remote_recording_font"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/call_remote_recording"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/remote_recording_icon"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
|
@ -4,17 +4,23 @@
|
|||
xmlns:bind="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<import type="com.google.android.flexbox.FlexDirection" />
|
||||
|
||||
<variable
|
||||
name="controlsViewModel"
|
||||
type="org.linphone.activities.voip.viewmodels.ControlsViewModel" />
|
||||
|
||||
<variable
|
||||
name="callsViewModel"
|
||||
type="org.linphone.activities.voip.viewmodels.CallsViewModel" />
|
||||
|
||||
<variable
|
||||
name="conferenceViewModel"
|
||||
type="org.linphone.activities.voip.viewmodels.ConferenceViewModel" />
|
||||
|
||||
<variable
|
||||
name="statsViewModel"
|
||||
type="org.linphone.activities.voip.viewmodels.StatisticsListViewModel" />
|
||||
|
@ -31,293 +37,262 @@
|
|||
android:layout_height="match_parent"
|
||||
android:background="@{controlsViewModel.fullScreenMode ? @color/black_color : @color/transparent_color}">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/call_header"
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/group"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? View.GONE : View.VISIBLE}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/voip_call_header_height"
|
||||
android:layout_margin="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
app:constraint_referenced_ids="remote_name,active_call_timer,remote_address" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/remote_name"
|
||||
style="@style/call_header_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@{(callsViewModel.currentCallData.contact.fullName ?? callsViewModel.currentCallData.displayName) + ` - `, default=`John Doe - `}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<Chronometer
|
||||
android:id="@+id/active_call_timer"
|
||||
style="@style/call_header_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
app:layout_constraintStart_toEndOf="@id/remote_name"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/call_header_title"
|
||||
android:text="@{callsViewModel.currentCallData.contact.fullName ?? callsViewModel.currentCallData.displayName}"/>
|
||||
<TextView
|
||||
android:id="@+id/remote_address"
|
||||
style="@style/call_header_subtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="@{callsViewModel.currentCallData.address, default=`sip:johndoe@sip.linphone.org`}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/remote_name" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/call_header_title"
|
||||
android:text=" - "/>
|
||||
|
||||
<Chronometer
|
||||
android:id="@+id/active_call_timer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/call_header_title" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
style="@style/call_header_subtitle"
|
||||
android:text="@{callsViewModel.currentCallData.address}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
<include
|
||||
android:id="@+id/remotely_recorded"
|
||||
android:visibility="@{callsViewModel.currentCallData.isRemotelyRecorded ? View.VISIBLE : View.GONE, default=gone}"
|
||||
layout="@layout/voip_remote_recording"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:visibility="@{callsViewModel.currentCallData.isRemotelyRecorded ? View.VISIBLE : View.GONE, default=gone}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/call_header"
|
||||
app:layout_constraintWidth_max="@dimen/voip_views_max_width"
|
||||
android:background="@drawable/shape_remote_recording_background">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/voip_remote_recording"
|
||||
android:contentDescription="@null"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
style="@style/call_remote_recording_font"
|
||||
android:layout_marginStart="10dp"
|
||||
android:text="@string/call_remote_recording"/>
|
||||
|
||||
</LinearLayout>
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/remote_address" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/call_header_barrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="call_header,remotely_recorded" />
|
||||
app:constraint_referenced_ids="remote_address,remotely_recorded" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<View
|
||||
android:id="@+id/background"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? @dimen/voip_remote_margin_full_screen : @dimen/voip_remote_margin, default=@dimen/voip_remote_margin}"
|
||||
android:background="@drawable/shape_remote_background"
|
||||
app:layout_constraintTop_toBottomOf="@id/call_header_barrier"
|
||||
app:layout_constraintBottom_toTopOf="@id/primary_buttons"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintWidth_max="@dimen/voip_views_max_width">
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/call_header_barrier" />
|
||||
|
||||
<include
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHeight_max="200dp"
|
||||
app:data="@{callsViewModel.currentCallData}"
|
||||
layout="@layout/voip_contact_avatar"/>
|
||||
<include
|
||||
layout="@layout/voip_contact_avatar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="20dp"
|
||||
app:data="@{callsViewModel.currentCallData}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_max="200dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:text="@{callsViewModel.currentCallData.contact.fullName ?? callsViewModel.currentCallData.displayName}"
|
||||
style="@style/call_remote_name_font"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
<TextView
|
||||
style="@style/call_remote_name_font"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:text="@{callsViewModel.currentCallData.contact.fullName ?? callsViewModel.currentCallData.displayName}"
|
||||
app:layout_constraintBottom_toBottomOf="@id/background"
|
||||
app:layout_constraintStart_toStartOf="@id/background" />
|
||||
|
||||
<org.linphone.activities.voip.views.RoundCornersTextureView
|
||||
android:id="@+id/remote_video_surface"
|
||||
android:onClick="@{() -> controlsViewModel.toggleFullScreen()}"
|
||||
android:visibility="@{controlsViewModel.isVideoEnabled && controlsViewModel.isVideoSendReceive && !callsViewModel.currentCallData.isRemotelyPaused ? View.VISIBLE : View.GONE, default=gone}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
<org.linphone.activities.voip.views.RoundCornersTextureView
|
||||
android:id="@+id/remote_video_surface"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:onClick="@{() -> controlsViewModel.toggleFullScreen()}"
|
||||
android:visibility="@{controlsViewModel.isVideoEnabled && controlsViewModel.isVideoSendReceive && !callsViewModel.currentCallData.isRemotelyPaused ? View.VISIBLE : View.GONE, default=gone}"
|
||||
app:layout_constraintBottom_toBottomOf="@id/background"
|
||||
app:layout_constraintEnd_toEndOf="@id/background"
|
||||
app:layout_constraintStart_toStartOf="@id/background"
|
||||
app:layout_constraintTop_toTopOf="@id/background" />
|
||||
|
||||
<ImageView
|
||||
android:onClick="@{() -> callsViewModel.currentCallData.toggleRecording()}"
|
||||
android:selected="@{callsViewModel.currentCallData.isRecording}"
|
||||
android:visibility="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? View.GONE : View.VISIBLE}"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="40dp"
|
||||
android:background="@drawable/button_call_recording_background"
|
||||
android:src="@drawable/icon_call_record"
|
||||
android:contentDescription="@string/content_description_toggle_recording"
|
||||
android:padding="7dp"
|
||||
android:layout_margin="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="20dp"
|
||||
android:background="@drawable/button_call_recording_background"
|
||||
android:contentDescription="@string/content_description_toggle_recording"
|
||||
android:onClick="@{() -> callsViewModel.currentCallData.toggleRecording()}"
|
||||
android:padding="7dp"
|
||||
android:selected="@{callsViewModel.currentCallData.isRecording}"
|
||||
android:src="@drawable/icon_call_record"
|
||||
android:visibility="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? View.GONE : View.VISIBLE}"
|
||||
app:layout_constraintStart_toStartOf="@id/background"
|
||||
app:layout_constraintTop_toTopOf="@id/background" />
|
||||
|
||||
<ImageView
|
||||
android:onClick="@{() -> callsViewModel.currentCallData.togglePause()}"
|
||||
android:selected="@{callsViewModel.currentCallData.isPaused}"
|
||||
android:enabled="@{callsViewModel.currentCallData.isPaused || callsViewModel.currentCallData.canBePaused}"
|
||||
android:visibility="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? View.GONE : View.VISIBLE}"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="40dp"
|
||||
android:background="@drawable/button_toggle_background"
|
||||
android:src="@drawable/icon_pause"
|
||||
android:contentDescription="@string/content_description_pause_call"
|
||||
android:padding="5dp"
|
||||
android:layout_margin="10dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="20dp"
|
||||
android:background="@drawable/button_toggle_background"
|
||||
android:contentDescription="@string/content_description_pause_call"
|
||||
android:enabled="@{callsViewModel.currentCallData.isPaused || callsViewModel.currentCallData.canBePaused}"
|
||||
android:onClick="@{() -> callsViewModel.currentCallData.togglePause()}"
|
||||
android:padding="5dp"
|
||||
android:selected="@{callsViewModel.currentCallData.isPaused}"
|
||||
android:src="@drawable/icon_pause"
|
||||
android:visibility="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? View.GONE : View.VISIBLE}"
|
||||
app:layout_constraintEnd_toEndOf="@id/background"
|
||||
app:layout_constraintTop_toTopOf="@id/background" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:onTouch="@{controlsViewModel.previewTouchListener}"
|
||||
android:visibility="@{controlsViewModel.isVideoEnabled && !callsViewModel.currentCallData.isRemotelyPaused ? View.VISIBLE : View.GONE}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="25dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/primary_buttons">
|
||||
android:onTouch="@{controlsViewModel.previewTouchListener}"
|
||||
android:visibility="@{controlsViewModel.isVideoEnabled && !callsViewModel.currentCallData.isRemotelyPaused ? View.VISIBLE : View.GONE}"
|
||||
app:layout_constraintBottom_toTopOf="@id/primary_buttons"
|
||||
app:layout_constraintEnd_toEndOf="@id/background">
|
||||
|
||||
<org.linphone.activities.voip.views.RoundCornersTextureView
|
||||
android:id="@+id/local_preview_video_surface"
|
||||
android:layout_size="@{controlsViewModel.pipMode ? @dimen/video_preview_pip_max_size : @dimen/video_preview_max_size}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintHeight_max="200dp"
|
||||
app:layout_constraintWidth_max="200dp"
|
||||
android:layout_size="@{controlsViewModel.pipMode ? @dimen/video_preview_pip_max_size : @dimen/video_preview_max_size}"
|
||||
app:alignTopRight="true"
|
||||
app:displayMode="black_bars"
|
||||
app:layout_constraintHeight_max="200dp"
|
||||
app:layout_constraintWidth_max="200dp"
|
||||
bind:ignore="MissingConstraints" />
|
||||
|
||||
<ImageView
|
||||
android:onClick="@{() -> controlsViewModel.switchCamera()}"
|
||||
android:visibility="@{controlsViewModel.isSwitchCameraAvailable && !controlsViewModel.pipMode ? View.VISIBLE : View.GONE, default=gone}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:contentDescription="@string/content_description_switch_camera"
|
||||
android:onClick="@{() -> controlsViewModel.switchCamera()}"
|
||||
android:padding="10dp"
|
||||
android:src="@drawable/icon_call_camera_switch"
|
||||
android:contentDescription="@string/content_description_switch_camera"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
android:visibility="@{controlsViewModel.isSwitchCameraAvailable && !controlsViewModel.pipMode ? View.VISIBLE : View.GONE, default=gone}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/stubbed_audio_routes"
|
||||
android:layout="@layout/voip_buttons_audio_routes"
|
||||
android:visibility="@{controlsViewModel.audioRoutesEnabled ? View.VISIBLE : View.GONE}"
|
||||
app:inflatedVisibility="@{controlsViewModel.audioRoutesEnabled ? View.VISIBLE : View.GONE}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginStart="12dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout="@layout/voip_buttons_audio_routes"
|
||||
android:visibility="@{controlsViewModel.audioRoutesEnabled ? View.VISIBLE : View.GONE}"
|
||||
app:controlsViewModel="@{controlsViewModel}"
|
||||
app:inflatedVisibility="@{controlsViewModel.audioRoutesEnabled ? View.VISIBLE : View.GONE}"
|
||||
app:layout_constraintBottom_toTopOf="@id/primary_buttons"
|
||||
app:controlsViewModel="@{controlsViewModel}"/>
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<include
|
||||
android:id="@+id/primary_buttons"
|
||||
android:visibility="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? View.GONE : View.VISIBLE}"
|
||||
layout="@layout/voip_buttons"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/voip_buttons_fragment_size"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintWidth_max="@dimen/voip_buttons_max_width"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:visibility="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? View.GONE : View.VISIBLE}"
|
||||
app:callsViewModel="@{callsViewModel}"
|
||||
app:controlsViewModel="@{controlsViewModel}"
|
||||
app:callsViewModel="@{callsViewModel}" />
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_max="@dimen/voip_buttons_max_width" />
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/stubbed_remotely_paused_call"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout="@layout/voip_call_paused_by_remote"
|
||||
android:visibility="@{callsViewModel.currentCallData.isRemotelyPaused ? View.VISIBLE : View.GONE, default=gone}"
|
||||
app:inflatedVisibility="@{callsViewModel.currentCallData.isRemotelyPaused ? View.VISIBLE : View.GONE}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/primary_buttons" />
|
||||
app:layout_constraintBottom_toTopOf="@id/primary_buttons"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/stubbed_paused_call"
|
||||
android:layout="@layout/voip_call_paused"
|
||||
android:visibility="@{callsViewModel.currentCallData.isPaused ? View.VISIBLE : View.GONE, default=gone}"
|
||||
app:inflatedVisibility="@{callsViewModel.currentCallData.isPaused ? View.VISIBLE : View.GONE}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout="@layout/voip_call_paused"
|
||||
android:visibility="@{callsViewModel.currentCallData.isPaused ? View.VISIBLE : View.GONE, default=gone}"
|
||||
app:data="@{callsViewModel.currentCallData}"
|
||||
app:inflatedVisibility="@{callsViewModel.currentCallData.isPaused ? View.VISIBLE : View.GONE}"
|
||||
app:layout_constraintBottom_toTopOf="@id/primary_buttons"
|
||||
app:data="@{callsViewModel.currentCallData}" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:onClick="@{() -> controlsViewModel.hideExtraButtons(false)}"
|
||||
android:visibility="@{controlsViewModel.showExtras ? View.VISIBLE : View.GONE, default=gone}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/voip_translucent_popup_background" />
|
||||
android:background="@color/voip_translucent_popup_background"
|
||||
android:onClick="@{() -> controlsViewModel.hideExtraButtons(false)}"
|
||||
android:visibility="@{controlsViewModel.showExtras ? View.VISIBLE : View.GONE, default=gone}" />
|
||||
|
||||
<include
|
||||
layout="@layout/voip_buttons_extra"
|
||||
android:translationY="@{controlsViewModel.extraButtonsMenuTranslateY, default=@dimen/voip_call_extra_buttons_translate_y}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/voip_call_extra_buttons_height"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintWidth_max="@dimen/voip_extra_menu_max_width"
|
||||
app:controlsViewModel="@{controlsViewModel}"
|
||||
android:translationY="@{controlsViewModel.extraButtonsMenuTranslateY, default=@dimen/voip_call_extra_buttons_translate_y}"
|
||||
app:callsViewModel="@{callsViewModel}"
|
||||
app:conferenceViewModel="@{conferenceViewModel}"/>
|
||||
app:conferenceViewModel="@{conferenceViewModel}"
|
||||
app:controlsViewModel="@{controlsViewModel}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_max="@dimen/voip_extra_menu_max_width" />
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/stubbed_call_stats"
|
||||
android:layout="@layout/voip_call_stats"
|
||||
android:visibility="@{controlsViewModel.callStatsVisible ? View.VISIBLE : View.GONE, default=gone}"
|
||||
app:inflatedVisibility="@{controlsViewModel.callStatsVisible ? View.VISIBLE : View.GONE}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:statsViewModel="@{statsViewModel}"
|
||||
app:controlsViewModel="@{controlsViewModel}"/>
|
||||
android:layout="@layout/voip_call_stats"
|
||||
android:visibility="@{controlsViewModel.callStatsVisible ? View.VISIBLE : View.GONE, default=gone}"
|
||||
app:controlsViewModel="@{controlsViewModel}"
|
||||
app:inflatedVisibility="@{controlsViewModel.callStatsVisible ? View.VISIBLE : View.GONE}"
|
||||
app:statsViewModel="@{statsViewModel}" />
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/stubbed_numpad"
|
||||
android:layout="@layout/voip_numpad"
|
||||
android:visibility="@{controlsViewModel.numpadVisible ? View.VISIBLE : View.GONE, default=gone}"
|
||||
app:inflatedVisibility="@{controlsViewModel.numpadVisible ? View.VISIBLE : View.GONE}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:controlsViewModel="@{controlsViewModel}"/>
|
||||
android:layout="@layout/voip_numpad"
|
||||
android:visibility="@{controlsViewModel.numpadVisible ? View.VISIBLE : View.GONE, default=gone}"
|
||||
app:controlsViewModel="@{controlsViewModel}"
|
||||
app:inflatedVisibility="@{controlsViewModel.numpadVisible ? View.VISIBLE : View.GONE}" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
|
Loading…
Reference in a new issue