mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed some margin issues with local participant miniature in active speaker layout
This commit is contained in:
parent
08547ea663
commit
80c0e6df36
8 changed files with 22 additions and 10 deletions
|
|
@ -132,10 +132,16 @@ class ConferenceWaitingRoomFragment : GenericFragment<ConferenceWaitingRoomFragm
|
|||
super.onResume()
|
||||
|
||||
coreContext.core.nativePreviewWindowId = binding.localPreviewVideoSurface
|
||||
coreContext.core.isVideoPreviewEnabled = viewModel.isVideoEnabled.value == true
|
||||
val enablePreview = viewModel.isVideoEnabled.value == true
|
||||
if (enablePreview) {
|
||||
Log.i("[Conference Waiting Room] Fragment is being resumed, enabling video preview")
|
||||
}
|
||||
coreContext.core.isVideoPreviewEnabled = enablePreview
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
Log.i("[Conference Waiting Room] Fragment is being paused, disabling video preview")
|
||||
coreContext.core.isVideoPreviewEnabled = false
|
||||
coreContext.core.nativePreviewWindowId = null
|
||||
|
||||
super.onPause()
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ class ConferenceViewModel : ViewModel() {
|
|||
|
||||
val maxParticipantsForMosaicLayout = corePreferences.maxConferenceParticipantsForMosaicLayout
|
||||
|
||||
val twoOrMoreParticipants = MutableLiveData<Boolean>()
|
||||
val moreThanTwoParticipants = MutableLiveData<Boolean>()
|
||||
|
||||
val speakingParticipant = MutableLiveData<ConferenceParticipantDeviceData>()
|
||||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@
|
|||
<ImageView
|
||||
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="5dp"
|
||||
android:layout_margin="@dimen/mute_mic_miniature_margin"
|
||||
android:background="@drawable/shape_toggle_pressed_background"
|
||||
android:contentDescription="@string/content_description_conference_participant_mic_muted"
|
||||
android:padding="2dp"
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@
|
|||
android:id="@+id/participant_mic_muted"
|
||||
android:layout_width="@dimen/voip_conference_participant_mic_muted_icon_size_grid"
|
||||
android:layout_height="@dimen/voip_conference_participant_mic_muted_icon_size_grid"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginEnd="@dimen/mute_mic_grid_margin"
|
||||
android:background="@drawable/shape_toggle_pressed_background"
|
||||
android:contentDescription="@string/content_description_conference_participant_mic_muted"
|
||||
android:padding="2dp"
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@
|
|||
<ImageView
|
||||
android:layout_width="@dimen/voip_conference_participant_mic_muted_icon_size_grid"
|
||||
android:layout_height="@dimen/voip_conference_participant_mic_muted_icon_size_grid"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_margin="@dimen/mute_mic_grid_margin"
|
||||
android:background="@drawable/shape_toggle_pressed_background"
|
||||
android:contentDescription="@string/content_description_conference_participant_mic_muted"
|
||||
android:padding="2dp"
|
||||
|
|
|
|||
|
|
@ -78,4 +78,6 @@
|
|||
<dimen name="chat_message_content_preview_max_width">120dp</dimen>
|
||||
<dimen name="voip_conference_active_speaker_dots_margin">5dp</dimen>
|
||||
<dimen name="conference_waiting_room_buttons_max_width">250dp</dimen>
|
||||
<dimen name="mute_mic_miniature_margin">5dp</dimen>
|
||||
<dimen name="mute_mic_grid_margin">10dp</dimen>
|
||||
</resources>
|
||||
Loading…
Add table
Reference in a new issue