mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed weird video preview shape while in PiP
This commit is contained in:
parent
61fe57628f
commit
637d0b9cfb
5 changed files with 14 additions and 0 deletions
|
|
@ -86,6 +86,11 @@ class RoundCornersTextureView : CaptureTextureView {
|
|||
}
|
||||
}
|
||||
|
||||
fun setRadius(radius: Float) {
|
||||
mRadius = radius
|
||||
setRoundCorners()
|
||||
}
|
||||
|
||||
private fun setRoundCorners() {
|
||||
outlineProvider = object : ViewOutlineProvider() {
|
||||
override fun getOutline(view: View, outline: Outline) {
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ import org.linphone.contacts.AvatarGenerator
|
|||
import org.linphone.core.ConsolidatedPresence
|
||||
import org.linphone.core.tools.Log
|
||||
import org.linphone.ui.call.conference.model.ConferenceParticipantDeviceModel
|
||||
import org.linphone.ui.call.view.RoundCornersTextureView
|
||||
|
||||
/**
|
||||
* This file contains all the data binding necessary for the app
|
||||
|
|
@ -514,6 +515,11 @@ fun setConstraintLayoutWidthMax(view: View, dp: Float) {
|
|||
cs.applyTo(layout)
|
||||
}
|
||||
|
||||
@BindingAdapter("roundCornersRadius")
|
||||
fun RoundCornersTextureView.setRoundCornersRadius(radius: Float) {
|
||||
setRadius(radius)
|
||||
}
|
||||
|
||||
@BindingAdapter("focusNextOnInput")
|
||||
fun focusNextOnInput(editText: EditText, enabled: Boolean) {
|
||||
if (!enabled) return
|
||||
|
|
|
|||
|
|
@ -244,6 +244,7 @@
|
|||
android:visibility="@{conferenceViewModel.isMeParticipantSendingVideo && conferenceViewModel.participants.size() == 1 && !conferenceViewModel.isPaused ? View.VISIBLE : View.GONE}"
|
||||
app:alignTopRight="true"
|
||||
app:displayMode="black_bars"
|
||||
roundCornersRadius="@{viewModel.pipMode ? @dimen/call_pip_round_corners_texture_view_radius : @dimen/call_round_corners_texture_view_radius, default=@dimen/call_round_corners_texture_view_radius}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_max="@{viewModel.pipMode ? @dimen/call_video_preview_pip_max_size : @dimen/call_video_preview_max_size, default=@dimen/call_video_preview_max_size}"
|
||||
|
|
|
|||
|
|
@ -267,6 +267,7 @@
|
|||
android:visibility="@{viewModel.isSendingVideo && !(viewModel.isPaused || viewModel.isPausedByRemote) ? View.VISIBLE : View.GONE}"
|
||||
app:alignTopRight="true"
|
||||
app:displayMode="black_bars"
|
||||
roundCornersRadius="@{viewModel.pipMode ? @dimen/call_pip_round_corners_texture_view_radius : @dimen/call_round_corners_texture_view_radius, default=@dimen/call_round_corners_texture_view_radius}"
|
||||
app:layout_constraintBottom_toBottomOf="@id/hinge_bottom"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_max="@{viewModel.pipMode ? @dimen/call_video_preview_pip_max_size : @dimen/call_video_preview_max_size, default=@dimen/call_video_preview_max_size}"
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@
|
|||
<dimen name="call_all_actions_menu_height">345dp</dimen> <!-- sum of above two -->
|
||||
<dimen name="call_main_actions_menu_margin">120dp</dimen>
|
||||
<dimen name="call_round_corners_texture_view_radius">20dp</dimen>
|
||||
<dimen name="call_pip_round_corners_texture_view_radius">5dp</dimen>
|
||||
<dimen name="call_button_size">55dp</dimen>
|
||||
<dimen name="call_button_icon_padding">15dp</dimen>
|
||||
<dimen name="call_extra_button_top_margin">30dp</dimen>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue