Updated conference layouts to adapt like single call when foldable device is folded

This commit is contained in:
Sylvain Berfini 2022-07-01 16:02:10 +02:00
parent 6406eb9d7b
commit 4ab54a50c1
11 changed files with 426 additions and 165 deletions

View file

@ -27,6 +27,7 @@ import android.view.View
import android.widget.Chronometer
import android.widget.Toast
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.constraintlayout.widget.ConstraintSet
import androidx.databinding.DataBindingUtil
import androidx.databinding.ViewDataBinding
import androidx.navigation.navGraphViewModels
@ -89,10 +90,8 @@ class ConferenceCallFragment : GenericFragment<VoipConferenceCallFragmentBinding
if (displayMode == ConferenceDisplayMode.ACTIVE_SPEAKER) {
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")
val layout =
binding.root.findViewById<ConstraintLayout>(R.id.conference_active_speaker_layout)
val window =
layout?.findViewById<RoundCornersTextureView>(R.id.conference_active_speaker_remote_video)
binding.root.findViewById<RoundCornersTextureView>(R.id.conference_active_speaker_remote_video)
coreContext.core.nativeVideoWindowId = window
} else {
Log.i("[Conference Call] Either not in conference or current layout isn't active speaker, updating Core's native window id")
@ -330,21 +329,21 @@ class ConferenceCallFragment : GenericFragment<VoipConferenceCallFragmentBinding
private fun updateHingeRelatedConstraints(state: FoldingFeature.State) {
Log.i("[Conference Call] Updating constraint layout hinges: $state")
/*val constraintLayout =
binding.root.findViewById<ConstraintLayout>(R.id.conference_active_speaker_layout)
constraintLayout ?: return
val constraintLayout = binding.root.findViewById<ConstraintLayout>(R.id.conference_constraint_layout)
?: return
val set = ConstraintSet()
set.clone(constraintLayout)
if (state == FoldingFeature.State.HALF_OPENED) {
set.setGuidelinePercent(R.id.hinge_top, 0.5f)
set.setGuidelinePercent(R.id.hinge_bottom, 0.5f)
controlsViewModel.folded.value = true
} else {
set.setGuidelinePercent(R.id.hinge_top, 0f)
set.setGuidelinePercent(R.id.hinge_bottom, 1f)
controlsViewModel.folded.value = false
}
set.applyTo(constraintLayout)*/
set.applyTo(constraintLayout)
}
}

View file

@ -20,37 +20,103 @@
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/conference_constraint_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
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/margin_0dp : @dimen/voip_remote_margin, default=@dimen/voip_remote_margin}"
android:paddingBottom="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? @dimen/margin_0dp : @dimen/voip_buttons_fragment_margin_size}"
android:visibility="@{inflatedVisibility}">
<include
android:id="@+id/header"
layout="@layout/voip_conference_header"
<View
android:id="@+id/top_barrier"
android:layout_width="0dp"
android:layout_height="1dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="@{controlsViewModel.folded ? @dimen/margin_0dp : conferenceViewModel.isRemotelyRecorded ? @dimen/voip_single_call_header_size_with_record_info : @dimen/voip_single_call_header_size, default=@dimen/voip_single_call_header_size}"/>
<androidx.constraintlayout.widget.Guideline
android:id="@+id/hinge_top"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/hinge_bottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="1" />
<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}"
app:conferenceViewModel="@{conferenceViewModel}" />
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:layout_marginTop="@{controlsViewModel.folded ? @dimen/voip_conference_header_folded_top_margin : @dimen/margin_0dp}"
android:ellipsize="end"
android:maxLines="1"
android:text="@{conferenceViewModel.subject, default=@string/conference_default_title}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/hinge_top" />
<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="@id/active_conference_timer"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/remote_name" />
<ImageView
android:id="@+id/toggle_conference_recording"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginEnd="10dp"
android:background="@drawable/button_toggle_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="@id/active_conference_timer"
app:layout_constraintEnd_toStartOf="@id/toggle_pause_conference"
app:layout_constraintTop_toTopOf="@id/remote_name" />
<include
android:id="@+id/remote_recording"
layout="@layout/voip_remote_recording"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/header"
app:layout_constraintTop_toBottomOf="@id/active_conference_timer"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:visibility="@{conferenceViewModel.isRemotelyRecorded ? View.VISIBLE : View.GONE, default=gone}" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/top_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="header, remote_recording"/>
<org.linphone.activities.voip.views.ScrollDotsView
android:id="@+id/scroll_indicator"
android:layout_width="wrap_content"
@ -58,7 +124,7 @@
android:visibility="@{controlsViewModel.pipMode ? View.GONE : View.VISIBLE}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/top_barrier"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toBottomOf="@id/hinge_bottom"
android:layout_marginEnd="5dp"
app:dotColor="@color/voip_gray_dots"
app:dotRadius="5dp"
@ -75,10 +141,11 @@
android:layout_marginBottom="5dp"
app:layout_constraintTop_toBottomOf="@id/top_barrier"
app:layout_constraintEnd_toStartOf="@id/scroll_indicator"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toBottomOf="@id/hinge_bottom"
android:scrollbars="none">
<com.google.android.flexbox.FlexboxLayout
android:id="@+id/flexbox_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:alignItems="stretch"
@ -97,7 +164,7 @@
app:layout_constraintTop_toBottomOf="@id/top_barrier"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/miniatures"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toBottomOf="@id/hinge_bottom"
android:layout_marginTop="@{controlsViewModel.fullScreenMode ? @dimen/margin_0dp : @dimen/voip_active_speaker_top_margin, default=@dimen/voip_active_speaker_top_margin}"
android:background="@drawable/shape_remote_background"
android:onClick="@{() -> controlsViewModel.toggleFullScreen()}"/>

View file

@ -20,45 +20,112 @@
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/conference_constraint_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
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/margin_0dp : @dimen/voip_remote_margin, default=@dimen/voip_remote_margin}"
android:paddingBottom="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? @dimen/margin_0dp : @dimen/voip_buttons_fragment_margin_size}"
android:visibility="@{inflatedVisibility}">
<include
android:id="@+id/header"
layout="@layout/voip_conference_header"
<View
android:id="@+id/top_barrier"
android:layout_width="0dp"
android:layout_height="1dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="@{controlsViewModel.folded ? @dimen/margin_0dp : conferenceViewModel.isRemotelyRecorded ? @dimen/voip_single_call_header_size_with_record_info : @dimen/voip_single_call_header_size, default=@dimen/voip_single_call_header_size}"/>
<androidx.constraintlayout.widget.Guideline
android:id="@+id/hinge_top"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/hinge_bottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="1" />
<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}"
app:conferenceViewModel="@{conferenceViewModel}" />
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:layout_marginTop="@{controlsViewModel.folded ? @dimen/voip_conference_header_folded_top_margin : @dimen/margin_0dp}"
android:ellipsize="end"
android:maxLines="1"
android:text="@{conferenceViewModel.subject, default=@string/conference_default_title}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/hinge_top" />
<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="@id/active_conference_timer"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/remote_name" />
<ImageView
android:id="@+id/toggle_conference_recording"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginEnd="10dp"
android:background="@drawable/button_toggle_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="@id/active_conference_timer"
app:layout_constraintEnd_toStartOf="@id/toggle_pause_conference"
app:layout_constraintTop_toTopOf="@id/remote_name" />
<include
android:id="@+id/remote_recording"
layout="@layout/voip_remote_recording"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/header"
app:layout_constraintTop_toBottomOf="@id/active_conference_timer"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:visibility="@{conferenceViewModel.isRemotelyRecorded ? View.VISIBLE : View.GONE, default=gone}" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/top_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="header, remote_recording"/>
<org.linphone.activities.voip.views.GridBoxLayout
android:id="@+id/grid_box_layout"
centerContent="@{true}"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@id/top_barrier"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toTopOf="@id/hinge_bottom"
android:layout_marginTop="10dp"
android:onClick="@{() -> controlsViewModel.toggleFullScreen()}"
app:entries="@{conferenceViewModel.conferenceParticipantDevices}"

View file

@ -20,37 +20,103 @@
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/conference_constraint_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
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/margin_0dp : @dimen/voip_remote_margin, default=@dimen/voip_remote_margin}"
android:paddingBottom="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? @dimen/margin_0dp : @dimen/voip_buttons_fragment_margin_size}"
android:visibility="@{inflatedVisibility}">
<include
android:id="@+id/header"
layout="@layout/voip_conference_header"
<View
android:id="@+id/top_barrier"
android:layout_width="0dp"
android:layout_height="1dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="@{controlsViewModel.folded ? @dimen/margin_0dp : conferenceViewModel.isRemotelyRecorded ? @dimen/voip_single_call_header_size_with_record_info : @dimen/voip_single_call_header_size, default=@dimen/voip_single_call_header_size}"/>
<androidx.constraintlayout.widget.Guideline
android:id="@+id/hinge_top"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/hinge_bottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="1" />
<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}"
app:conferenceViewModel="@{conferenceViewModel}" />
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:layout_marginTop="@{controlsViewModel.folded ? @dimen/voip_conference_header_folded_top_margin : @dimen/margin_0dp}"
android:ellipsize="end"
android:maxLines="1"
android:text="@{conferenceViewModel.subject, default=@string/conference_default_title}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/hinge_top" />
<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="@id/active_conference_timer"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/remote_name" />
<ImageView
android:id="@+id/toggle_conference_recording"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginEnd="10dp"
android:background="@drawable/button_toggle_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="@id/active_conference_timer"
app:layout_constraintEnd_toStartOf="@id/toggle_pause_conference"
app:layout_constraintTop_toTopOf="@id/remote_name" />
<include
android:id="@+id/remote_recording"
layout="@layout/voip_remote_recording"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/header"
app:layout_constraintTop_toBottomOf="@id/active_conference_timer"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:visibility="@{conferenceViewModel.isRemotelyRecorded ? View.VISIBLE : View.GONE, default=gone}" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/top_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="header, remote_recording"/>
<View
android:id="@+id/active_speaker_background"
android:layout_width="0dp"
@ -109,6 +175,7 @@
android:scrollbars="none">
<com.google.android.flexbox.FlexboxLayout
android:id="@+id/flexbox_layout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
app:alignItems="stretch"
@ -127,7 +194,7 @@
android:visibility="@{controlsViewModel.pipMode ? View.GONE : View.VISIBLE}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toBottomOf="@id/hinge_bottom"
android:layout_marginBottom="5dp"
app:dotColor="@color/voip_gray_dots"
app:dotRadius="5dp"

View file

@ -20,46 +20,111 @@
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/conference_constraint_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
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/margin_0dp : @dimen/voip_remote_margin, default=@dimen/voip_remote_margin}"
android:paddingBottom="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? @dimen/margin_0dp : @dimen/voip_buttons_fragment_margin_size}"
android:visibility="@{inflatedVisibility}">
<include
android:id="@+id/header"
layout="@layout/voip_conference_header"
<View
android:id="@+id/top_barrier"
android:layout_width="0dp"
android:layout_height="1dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="@{controlsViewModel.folded ? @dimen/margin_0dp : conferenceViewModel.isRemotelyRecorded ? @dimen/voip_single_call_header_size_with_record_info : @dimen/voip_single_call_header_size, default=@dimen/voip_single_call_header_size}"/>
<androidx.constraintlayout.widget.Guideline
android:id="@+id/hinge_top"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/hinge_bottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="1" />
<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}"
app:conferenceViewModel="@{conferenceViewModel}" />
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:layout_marginTop="@{controlsViewModel.folded ? @dimen/voip_conference_header_folded_top_margin : @dimen/margin_0dp}"
android:ellipsize="end"
android:maxLines="1"
android:text="@{conferenceViewModel.subject, default=@string/conference_default_title}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/hinge_top" />
<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="@id/active_conference_timer"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/remote_name" />
<ImageView
android:id="@+id/toggle_conference_recording"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginEnd="10dp"
android:background="@drawable/button_toggle_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="@id/active_conference_timer"
app:layout_constraintEnd_toStartOf="@id/toggle_pause_conference"
app:layout_constraintTop_toTopOf="@id/remote_name" />
<include
android:id="@+id/remote_recording"
layout="@layout/voip_remote_recording"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/header"
app:layout_constraintTop_toBottomOf="@id/active_conference_timer"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_below="@id/header"
android:visibility="@{conferenceViewModel.isRemotelyRecorded ? View.VISIBLE : View.GONE, default=gone}" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/top_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="header, remote_recording"/>
<androidx.gridlayout.widget.GridLayout
android:id="@+id/grid_layout"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@id/top_barrier"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginTop="10dp"
app:layout_constraintBottom_toTopOf="@id/hinge_bottom"
app:entries="@{conferenceViewModel.conferenceParticipantDevices}"
app:layout="@{@layout/voip_conference_participant_remote_audio_only}"
app:columnCount="2"

View file

@ -35,6 +35,7 @@
android:background="?attr/voipBackgroundColor">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraint_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@{controlsViewModel.fullScreenMode ? @color/black_color : @color/transparent_color}">
@ -43,13 +44,12 @@
android:id="@+id/stubbed_conference_active_speaker_layout"
android:layout_width="match_parent"
android:layout_height="0dp"
android:inflatedId="@+id/conference_active_speaker_layout"
android:layout="@layout/voip_conference_active_speaker"
android:visibility="@{conferenceViewModel.conferenceDisplayMode == ConferenceDisplayMode.ACTIVE_SPEAKER &amp;&amp; conferenceViewModel.conferenceExists &amp;&amp; !callsViewModel.currentCallData.isActiveAndNotInConference ? View.VISIBLE : View.GONE, default=gone}"
app:conferenceViewModel="@{conferenceViewModel}"
app:controlsViewModel="@{controlsViewModel}"
app:inflatedVisibility="@{conferenceViewModel.conferenceDisplayMode == ConferenceDisplayMode.ACTIVE_SPEAKER &amp;&amp; conferenceViewModel.conferenceExists &amp;&amp; !callsViewModel.currentCallData.isActiveAndNotInConference ? View.VISIBLE : View.GONE}"
app:layout_constraintBottom_toTopOf="@id/primary_buttons"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ViewStub
@ -61,7 +61,7 @@
app:conferenceViewModel="@{conferenceViewModel}"
app:controlsViewModel="@{controlsViewModel}"
app:inflatedVisibility="@{conferenceViewModel.conferenceDisplayMode == ConferenceDisplayMode.GRID &amp;&amp; conferenceViewModel.conferenceExists &amp;&amp; !callsViewModel.currentCallData.isActiveAndNotInConference ? View.VISIBLE : View.GONE}"
app:layout_constraintBottom_toTopOf="@id/primary_buttons"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ViewStub
@ -73,7 +73,7 @@
app:conferenceViewModel="@{conferenceViewModel}"
app:controlsViewModel="@{controlsViewModel}"
app:inflatedVisibility="@{conferenceViewModel.conferenceDisplayMode == ConferenceDisplayMode.AUDIO_ONLY &amp;&amp; conferenceViewModel.conferenceExists &amp;&amp; !callsViewModel.currentCallData.isActiveAndNotInConference ? View.VISIBLE : View.GONE}"
app:layout_constraintBottom_toTopOf="@id/primary_buttons"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ViewStub
@ -120,6 +120,7 @@
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/popup_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/voip_translucent_popup_background"
@ -127,6 +128,7 @@
android:visibility="@{controlsViewModel.showExtras ? View.VISIBLE : View.GONE, default=gone}" />
<include
android:id="@+id/extra_buttons_layout"
layout="@layout/voip_buttons_extra"
android:layout_width="0dp"
android:layout_height="@dimen/voip_call_extra_buttons_height"
@ -163,6 +165,7 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<include
android:id="@+id/creation_pending_layout"
layout="@layout/voip_conference_creation_pending_wait_layout"
bind:visibility="@{conferenceViewModel.conferenceCreationPending}" />

View file

@ -9,6 +9,7 @@
</data>
<RelativeLayout
android:id="@+id/creation_pending_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="@{visibility ? View.VISIBLE : View.GONE}">
@ -22,6 +23,7 @@
android:indeterminateTint="?attr/accentColor" />
<TextView
android:id="@+id/progress_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"

View file

@ -20,45 +20,112 @@
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/conference_constraint_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
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/margin_0dp : @dimen/voip_remote_margin, default=@dimen/voip_remote_margin}"
android:paddingBottom="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? @dimen/margin_0dp : @dimen/voip_buttons_fragment_margin_size}"
android:visibility="@{inflatedVisibility}">
<include
android:id="@+id/header"
layout="@layout/voip_conference_header"
<View
android:id="@+id/top_barrier"
android:layout_width="0dp"
android:layout_height="1dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="@{controlsViewModel.folded ? @dimen/margin_0dp : conferenceViewModel.isRemotelyRecorded ? @dimen/voip_single_call_header_size_with_record_info : @dimen/voip_single_call_header_size, default=@dimen/voip_single_call_header_size}"/>
<androidx.constraintlayout.widget.Guideline
android:id="@+id/hinge_top"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/hinge_bottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="1" />
<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}"
app:conferenceViewModel="@{conferenceViewModel}" />
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:layout_marginTop="@{controlsViewModel.folded ? @dimen/voip_conference_header_folded_top_margin : @dimen/margin_0dp}"
android:ellipsize="end"
android:maxLines="1"
android:text="@{conferenceViewModel.subject, default=@string/conference_default_title}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/hinge_top" />
<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="@id/active_conference_timer"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/remote_name" />
<ImageView
android:id="@+id/toggle_conference_recording"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginEnd="10dp"
android:background="@drawable/button_toggle_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="@id/active_conference_timer"
app:layout_constraintEnd_toStartOf="@id/toggle_pause_conference"
app:layout_constraintTop_toTopOf="@id/remote_name" />
<include
android:id="@+id/remote_recording"
layout="@layout/voip_remote_recording"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/header"
app:layout_constraintTop_toBottomOf="@id/active_conference_timer"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:visibility="@{conferenceViewModel.isRemotelyRecorded ? View.VISIBLE : View.GONE, default=gone}" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/top_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="header, remote_recording"/>
<org.linphone.activities.voip.views.GridBoxLayout
android:id="@+id/grid_box_layout"
centerContent="@{true}"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@id/top_barrier"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toTopOf="@id/hinge_bottom"
android:layout_marginTop="10dp"
android:onClick="@{() -> controlsViewModel.toggleFullScreen()}"
app:entries="@{conferenceViewModel.conferenceParticipantDevices}"

View file

@ -1,77 +0,0 @@
<?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"
android:layout_marginStart="5dp"
android:layout_marginEnd="5dp">
<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_toggle_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>

View file

@ -133,7 +133,7 @@
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:layout_margin="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? @dimen/margin_0dp : @dimen/voip_remote_margin, default=@dimen/voip_remote_margin}"
android:background="@drawable/shape_remote_background"
app:layout_constraintBottom_toTopOf="@id/bottom_barrier"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -38,8 +38,8 @@
<dimen name="setting_subtitle_max_size">14sp</dimen>
<dimen name="settings_granularity_step">1sp</dimen>
<dimen name="voip_buttons_fragment_size">50dp</dimen>
<dimen name="voip_buttons_fragment_margin_size">55dp</dimen>
<dimen name="voip_remote_margin">10dp</dimen>
<dimen name="voip_remote_margin_full_screen">0dp</dimen>
<dimen name="voip_top_bar_size">60dp</dimen>
<dimen name="voip_call_list_size">80dp</dimen>
<dimen name="voip_call_context_menu_item_height">50dp</dimen>
@ -72,4 +72,5 @@
<dimen name="margin_0dp">0dp</dimen>
<dimen name="voip_single_call_header_size">50dp</dimen>
<dimen name="voip_single_call_header_size_with_record_info">85dp</dimen>
<dimen name="voip_conference_header_folded_top_margin">30dp</dimen>
</resources>