mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-30 10:19:27 +00:00
Improved stats layouts, video full screen & bottom sheets animations
This commit is contained in:
parent
7ba19364b9
commit
c9eb856f19
9 changed files with 28 additions and 33 deletions
|
|
@ -189,16 +189,12 @@ class ActiveCallFragment : GenericCallFragment() {
|
|||
}
|
||||
|
||||
binding.setCallStatisticsClickListener {
|
||||
actionsBottomSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
|
||||
numpadBottomSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
|
||||
callMediaEncryptionStatsBottomSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
|
||||
callMediaEncryptionStatsBottomSheetBehavior.state = BottomSheetBehavior.STATE_HIDDEN
|
||||
callStatsBottomSheetBehavior.state = BottomSheetBehavior.STATE_EXPANDED
|
||||
}
|
||||
|
||||
binding.setCallMediaEncryptionStatisticsClickListener {
|
||||
actionsBottomSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
|
||||
numpadBottomSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
|
||||
callStatsBottomSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
|
||||
callStatsBottomSheetBehavior.state = BottomSheetBehavior.STATE_HIDDEN
|
||||
callMediaEncryptionStatsBottomSheetBehavior.state = BottomSheetBehavior.STATE_EXPANDED
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -190,14 +190,12 @@ class ActiveConferenceCallFragment : GenericCallFragment() {
|
|||
}
|
||||
|
||||
binding.setCallStatisticsClickListener {
|
||||
actionsBottomSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
|
||||
callMediaEncryptionStatsBottomSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
|
||||
callMediaEncryptionStatsBottomSheetBehavior.state = BottomSheetBehavior.STATE_HIDDEN
|
||||
callStatsBottomSheetBehavior.state = BottomSheetBehavior.STATE_EXPANDED
|
||||
}
|
||||
|
||||
binding.setCallMediaEncryptionStatisticsClickListener {
|
||||
actionsBottomSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
|
||||
callStatsBottomSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
|
||||
callStatsBottomSheetBehavior.state = BottomSheetBehavior.STATE_HIDDEN
|
||||
callMediaEncryptionStatsBottomSheetBehavior.state = BottomSheetBehavior.STATE_EXPANDED
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/black"
|
||||
android:background="@drawable/shape_call_bottom_sheet_background"
|
||||
android:visibility="@{viewModel.fullScreenMode || viewModel.pipMode ? View.INVISIBLE : View.VISIBLE}"
|
||||
app:behavior_hideable="true"
|
||||
app:behavior_peekHeight="0dp"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/black"
|
||||
android:background="@drawable/shape_call_bottom_sheet_background"
|
||||
android:visibility="@{viewModel.fullScreenMode || viewModel.pipMode ? View.INVISIBLE : View.VISIBLE}"
|
||||
app:behavior_hideable="true"
|
||||
app:behavior_peekHeight="0dp"
|
||||
|
|
|
|||
|
|
@ -124,22 +124,22 @@
|
|||
<ImageView
|
||||
android:id="@+id/switch_camera"
|
||||
android:onClick="@{() -> viewModel.switchCamera()}"
|
||||
android:layout_width="@dimen/call_top_bar_info_height"
|
||||
android:layout_height="@dimen/call_top_bar_info_height"
|
||||
android:layout_width="@dimen/big_icon_size"
|
||||
android:layout_height="0dp"
|
||||
android:padding="10dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:src="@drawable/camera_rotate"
|
||||
android:visibility="@{!viewModel.fullScreenMode && !viewModel.pipMode && viewModel.showSwitchCamera && conferenceViewModel.participantDevices.size() > 1 && conferenceViewModel.isMeParticipantSendingVideo ? View.VISIBLE : View.GONE}"
|
||||
app:tint="@color/white"
|
||||
app:layout_constraintTop_toTopOf="@id/conference_subject"
|
||||
app:layout_constraintBottom_toBottomOf="@id/conference_subject"
|
||||
app:layout_constraintTop_toTopOf="@id/back"
|
||||
app:layout_constraintBottom_toBottomOf="@id/back"
|
||||
app:layout_constraintEnd_toStartOf="@+id/paused" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/paused"
|
||||
android:layout_width="@dimen/call_top_bar_info_height"
|
||||
android:layout_height="@dimen/call_top_bar_info_height"
|
||||
android:layout_width="@dimen/big_icon_size"
|
||||
android:layout_height="0dp"
|
||||
android:padding="10dp"
|
||||
android:src="@drawable/pause"
|
||||
android:visibility="@{!viewModel.fullScreenMode && !viewModel.pipMode && conferenceViewModel.isPaused ? View.VISIBLE : View.GONE, default=gone}"
|
||||
|
|
@ -151,14 +151,14 @@
|
|||
<ImageView
|
||||
android:id="@+id/stats"
|
||||
android:onClick="@{callStatisticsClickListener}"
|
||||
android:layout_width="@dimen/call_top_bar_info_height"
|
||||
android:layout_height="@dimen/call_top_bar_info_height"
|
||||
android:layout_width="@dimen/big_icon_size"
|
||||
android:layout_height="0dp"
|
||||
android:padding="10dp"
|
||||
android:src="@{viewModel.qualityIcon, default=@drawable/cell_signal_full}"
|
||||
android:visibility="@{!viewModel.fullScreenMode && !viewModel.pipMode && !conferenceViewModel.isPaused ? View.VISIBLE : View.GONE}"
|
||||
android:tint="@{viewModel.qualityValue >= 2 ? @color/white : viewModel.qualityValue >= 1 ? @color/orange_warning_600 : @color/red_danger_500, default=@color/white}"
|
||||
app:layout_constraintTop_toTopOf="@id/conference_subject"
|
||||
app:layout_constraintBottom_toBottomOf="@id/conference_subject"
|
||||
app:layout_constraintTop_toTopOf="@id/back"
|
||||
app:layout_constraintBottom_toBottomOf="@id/back"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
bind:ignore="UseAppTint" />
|
||||
|
||||
|
|
@ -242,11 +242,12 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="@{viewModel.fullScreenMode || viewModel.pipMode ? @dimen/zero : @dimen/call_main_actions_menu_margin, default=@dimen/call_main_actions_menu_margin}"
|
||||
android:layout_marginTop="@{viewModel.fullScreenMode || viewModel.pipMode ? @dimen/zero : @dimen/call_remote_video_top_margin, default=@dimen/call_remote_video_top_margin}"
|
||||
android:visibility="@{conferenceViewModel.participantDevices.size() > 1 && !conferenceViewModel.isPaused ? View.VISIBLE : View.GONE}"
|
||||
app:navGraph="@navigation/conference_nav_graph"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/media_encryption_icon"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
<ImageView
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="@{viewModel.fullScreenMode || viewModel.pipMode || viewModel.halfOpenedFolded ? @dimen/zero : @dimen/call_main_actions_menu_margin, default=@dimen/call_main_actions_menu_margin}"
|
||||
android:layout_marginTop="@{viewModel.fullScreenMode || viewModel.pipMode || viewModel.halfOpenedFolded ? @dimen/zero : @dimen/call_top_bar_info_height, default=@dimen/call_top_bar_info_height}"
|
||||
android:layout_marginTop="@{viewModel.fullScreenMode || viewModel.pipMode || viewModel.halfOpenedFolded ? @dimen/zero : @dimen/call_remote_video_top_margin, default=@dimen/call_remote_video_top_margin}"
|
||||
android:onClick="@{() -> viewModel.toggleFullScreen()}"
|
||||
android:visibility="@{viewModel.isVideoEnabled && !(viewModel.isPaused || viewModel.isPausedByRemote) ? View.VISIBLE : View.GONE}"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
|
@ -197,8 +197,8 @@
|
|||
<ImageView
|
||||
android:onClick="@{() -> viewModel.switchCamera()}"
|
||||
android:id="@+id/switch_camera"
|
||||
android:layout_width="@dimen/call_top_bar_info_height"
|
||||
android:layout_height="@dimen/call_top_bar_info_height"
|
||||
android:layout_width="@dimen/big_icon_size"
|
||||
android:layout_height="0dp"
|
||||
android:padding="10dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
|
|
@ -211,8 +211,8 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/paused"
|
||||
android:layout_width="@dimen/call_top_bar_info_height"
|
||||
android:layout_height="@dimen/call_top_bar_info_height"
|
||||
android:layout_width="@dimen/big_icon_size"
|
||||
android:layout_height="0dp"
|
||||
android:padding="10dp"
|
||||
android:src="@drawable/pause"
|
||||
android:visibility="@{!viewModel.fullScreenMode && !viewModel.pipMode && (viewModel.isPaused || viewModel.isPausedByRemote) ? View.VISIBLE : View.GONE, default=gone}"
|
||||
|
|
@ -224,8 +224,8 @@
|
|||
<ImageView
|
||||
android:id="@+id/stats"
|
||||
android:onClick="@{callStatisticsClickListener}"
|
||||
android:layout_width="@dimen/call_top_bar_info_height"
|
||||
android:layout_height="@dimen/call_top_bar_info_height"
|
||||
android:layout_width="@dimen/big_icon_size"
|
||||
android:layout_height="0dp"
|
||||
android:padding="10dp"
|
||||
android:src="@{viewModel.qualityIcon, default=@drawable/cell_signal_full}"
|
||||
android:visibility="@{!viewModel.fullScreenMode && !viewModel.pipMode && !(viewModel.isPaused || viewModel.isPausedByRemote) ? View.VISIBLE : View.GONE}"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/black"
|
||||
android:background="@drawable/shape_call_bottom_sheet_background"
|
||||
android:visibility="@{viewModel.fullScreenMode || viewModel.pipMode ? View.INVISIBLE : View.VISIBLE}"
|
||||
app:behavior_hideable="true"
|
||||
app:behavior_peekHeight="0dp"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/black"
|
||||
android:background="@drawable/shape_call_bottom_sheet_background"
|
||||
android:visibility="@{viewModel.fullScreenMode || viewModel.pipMode ? View.INVISIBLE : View.VISIBLE}"
|
||||
app:behavior_hideable="true"
|
||||
app:behavior_peekHeight="0dp"
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
<dimen name="popup_menu_item_top_margin">20dp</dimen>
|
||||
|
||||
<dimen name="call_top_bar_text_height">28dp</dimen>
|
||||
<dimen name="call_top_bar_info_height">48dp</dimen> <!-- Size of top text + top & bottom margins -->
|
||||
<dimen name="call_remote_video_top_margin">70dp</dimen> <!-- Size of top text + top & bottom margins -->
|
||||
<dimen name="call_main_actions_menu_height">110dp</dimen>
|
||||
<dimen name="call_all_actions_menu_height">345dp</dimen> <!-- sum of above two -->
|
||||
<dimen name="call_main_actions_menu_margin">120dp</dimen>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue