diff --git a/app/src/main/java/org/linphone/activities/main/conference/fragments/ConferenceWaitingRoomFragment.kt b/app/src/main/java/org/linphone/activities/main/conference/fragments/ConferenceWaitingRoomFragment.kt index d0dad5509..0494d1c78 100644 --- a/app/src/main/java/org/linphone/activities/main/conference/fragments/ConferenceWaitingRoomFragment.kt +++ b/app/src/main/java/org/linphone/activities/main/conference/fragments/ConferenceWaitingRoomFragment.kt @@ -132,10 +132,16 @@ class ConferenceWaitingRoomFragment : GenericFragment() val moreThanTwoParticipants = MutableLiveData() val speakingParticipant = MutableLiveData() @@ -495,6 +496,7 @@ class ConferenceViewModel : ViewModel() { } conferenceParticipantDevices.value = devices + twoOrMoreParticipants.value = devices.size >= 2 moreThanTwoParticipants.value = devices.size > 2 } @@ -521,6 +523,7 @@ class ConferenceViewModel : ViewModel() { } conferenceParticipantDevices.value = sortedDevices + twoOrMoreParticipants.value = sortedDevices.size >= 2 moreThanTwoParticipants.value = sortedDevices.size > 2 } @@ -552,6 +555,7 @@ class ConferenceViewModel : ViewModel() { } conferenceParticipantDevices.value = devices + twoOrMoreParticipants.value = devicesCount >= 2 moreThanTwoParticipants.value = devicesCount > 2 } diff --git a/app/src/main/res/layout-land/voip_conference_active_speaker.xml b/app/src/main/res/layout-land/voip_conference_active_speaker.xml index be5e5001d..d3cdea714 100644 --- a/app/src/main/res/layout-land/voip_conference_active_speaker.xml +++ b/app/src/main/res/layout-land/voip_conference_active_speaker.xml @@ -257,7 +257,7 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="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:layout_marginTop="@{controlsViewModel.fullScreenMode ? @dimen/margin_0dp : @dimen/voip_active_speaker_top_margin, default=@dimen/voip_active_speaker_top_margin}" android:background="@drawable/shape_me_background" android:onClick="@{() -> controlsViewModel.toggleFullScreen()}"/> @@ -306,7 +306,7 @@ android:id="@+id/switch_camera" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_margin="5dp" + android:layout_margin="@{conferenceViewModel.twoOrMoreParticipants ? @dimen/margin_0dp : @dimen/voip_active_speaker_top_margin, default=@dimen/voip_active_speaker_top_margin}" android:padding="10dp" android:contentDescription="@string/content_description_switch_camera" android:onClick="@{() -> controlsViewModel.switchCamera()}" @@ -331,7 +331,7 @@ android:id="@+id/local_participant_muted" android:layout_width="@dimen/voip_conference_participant_mic_muted_icon_size_active_speaker" android:layout_height="@dimen/voip_conference_participant_mic_muted_icon_size_active_speaker" - android:layout_margin="10dp" + android:layout_margin="@{conferenceViewModel.twoOrMoreParticipants ? @dimen/mute_mic_miniature_margin : @dimen/mute_mic_grid_margin, default=@dimen/mute_mic_grid_margin}" android:background="@drawable/shape_toggle_pressed_background" android:contentDescription="@string/content_description_conference_participant_mic_muted" android:padding="2dp" diff --git a/app/src/main/res/layout/voip_conference_active_speaker.xml b/app/src/main/res/layout/voip_conference_active_speaker.xml index 08178029d..714a95d16 100644 --- a/app/src/main/res/layout/voip_conference_active_speaker.xml +++ b/app/src/main/res/layout/voip_conference_active_speaker.xml @@ -258,7 +258,7 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="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:layout_marginTop="@{controlsViewModel.fullScreenMode || conferenceViewModel.twoOrMoreParticipants ? @dimen/margin_0dp : @dimen/voip_active_speaker_top_margin, default=@dimen/voip_active_speaker_top_margin}" android:background="@drawable/shape_me_background" android:onClick="@{() -> controlsViewModel.toggleFullScreen()}"/> @@ -307,7 +307,7 @@ android:id="@+id/switch_camera" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_margin="5dp" + android:layout_margin="@{conferenceViewModel.twoOrMoreParticipants ? @dimen/margin_0dp : @dimen/voip_active_speaker_top_margin, default=@dimen/voip_active_speaker_top_margin}" android:padding="10dp" android:contentDescription="@string/content_description_switch_camera" android:onClick="@{() -> controlsViewModel.switchCamera()}" @@ -332,7 +332,7 @@ android:id="@+id/local_participant_muted" android:layout_width="@dimen/voip_conference_participant_mic_muted_icon_size_active_speaker" android:layout_height="@dimen/voip_conference_participant_mic_muted_icon_size_active_speaker" - android:layout_margin="10dp" + android:layout_margin="@{conferenceViewModel.twoOrMoreParticipants ? @dimen/mute_mic_miniature_margin : @dimen/mute_mic_grid_margin, default=@dimen/mute_mic_grid_margin}" android:background="@drawable/shape_toggle_pressed_background" android:contentDescription="@string/content_description_conference_participant_mic_muted" android:padding="2dp" diff --git a/app/src/main/res/layout/voip_conference_participant_remote_active_speaker_miniature.xml b/app/src/main/res/layout/voip_conference_participant_remote_active_speaker_miniature.xml index d6f581e1a..5ff825efe 100644 --- a/app/src/main/res/layout/voip_conference_participant_remote_active_speaker_miniature.xml +++ b/app/src/main/res/layout/voip_conference_participant_remote_active_speaker_miniature.xml @@ -94,7 +94,7 @@ 120dp 5dp 250dp + 5dp + 10dp \ No newline at end of file