Reworked conference/incoming/outgoing/ended call fragments to match changes made to active call fragment

This commit is contained in:
Sylvain Berfini 2024-02-01 14:08:17 +01:00
parent 58e41d99c9
commit 3864d54936
6 changed files with 217 additions and 225 deletions

View file

@ -29,13 +29,18 @@ import android.view.View
import android.view.ViewGroup
import androidx.lifecycle.ViewModelProvider
import androidx.navigation.fragment.findNavController
import androidx.vectordrawable.graphics.drawable.AnimatedVectorDrawableCompat
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import org.linphone.LinphoneApplication.Companion.coreContext
import org.linphone.R
import org.linphone.core.tools.Log
import org.linphone.databinding.CallActiveConferenceFragmentBinding
import org.linphone.ui.call.model.CallMediaEncryptionModel
import org.linphone.ui.call.viewmodel.CallsViewModel
import org.linphone.ui.call.viewmodel.CurrentCallViewModel
import org.linphone.utils.Event
import org.linphone.utils.startAnimatedDrawable
class ActiveConferenceCallFragment : GenericCallFragment() {
companion object {
@ -48,6 +53,28 @@ class ActiveConferenceCallFragment : GenericCallFragment() {
private lateinit var callsViewModel: CallsViewModel
private val actionsBottomSheetCallback = object : BottomSheetBehavior.BottomSheetCallback() {
override fun onStateChanged(bottomSheet: View, newState: Int) {
if (newState == BottomSheetBehavior.STATE_EXPANDED) {
val drawable = AnimatedVectorDrawableCompat.create(
requireContext(),
R.drawable.animated_handle_to_caret
)
binding.bottomBar.mainActions.handle.setImageDrawable(drawable)
} else if (newState == BottomSheetBehavior.STATE_COLLAPSED) {
val drawable = AnimatedVectorDrawableCompat.create(
requireContext(),
R.drawable.animated_caret_to_handle
)
binding.bottomBar.mainActions.handle.setImageDrawable(drawable)
}
}
override fun onSlide(bottomSheet: View, slideOffset: Float) { }
}
private var bottomSheetDialog: BottomSheetDialogFragment? = null
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
@ -76,6 +103,7 @@ class ActiveConferenceCallFragment : GenericCallFragment() {
val actionsBottomSheetBehavior = BottomSheetBehavior.from(binding.bottomBar.root)
actionsBottomSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
actionsBottomSheetBehavior.addBottomSheetCallback(actionsBottomSheetCallback)
callViewModel.callDuration.observe(viewLifecycleOwner) { duration ->
binding.chronometer.base = SystemClock.elapsedRealtime() - (1000 * duration)
@ -86,8 +114,20 @@ class ActiveConferenceCallFragment : GenericCallFragment() {
it.consume {
val state = actionsBottomSheetBehavior.state
if (state == BottomSheetBehavior.STATE_COLLAPSED) {
val drawable = AnimatedVectorDrawableCompat.create(
requireContext(),
R.drawable.animated_caret_to_handle
)
binding.bottomBar.mainActions.handle.setImageDrawable(drawable)
binding.bottomBar.mainActions.handle.startAnimatedDrawable()
actionsBottomSheetBehavior.state = BottomSheetBehavior.STATE_EXPANDED
} else if (state == BottomSheetBehavior.STATE_EXPANDED) {
val drawable = AnimatedVectorDrawableCompat.create(
requireContext(),
R.drawable.animated_handle_to_caret
)
binding.bottomBar.mainActions.handle.setImageDrawable(drawable)
binding.bottomBar.mainActions.handle.startAnimatedDrawable()
actionsBottomSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
}
}
@ -103,6 +143,16 @@ class ActiveConferenceCallFragment : GenericCallFragment() {
actionsBottomSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
}
callViewModel.showMediaEncryptionStatisticsEvent.observe(viewLifecycleOwner) {
it.consume { model ->
showMediaEncryptionStatistics(model)
}
}
binding.setBackClickListener {
requireActivity().finish()
}
binding.setCallsListClickListener {
Log.i("$TAG Going to calls list fragment")
val action = ActiveConferenceCallFragmentDirections.actionActiveConferenceCallFragmentToCallsListFragment()
@ -125,6 +175,10 @@ class ActiveConferenceCallFragment : GenericCallFragment() {
clipboard.setPrimaryClip(ClipData.newPlainText(label, sipUri))
}
}
binding.setCallStatisticsClickListener {
showCallStatistics()
}
}
override fun onResume() {
@ -135,4 +189,17 @@ class ActiveConferenceCallFragment : GenericCallFragment() {
callViewModel.updateCallDuration()
}
}
private fun showCallStatistics() {
// TODO
}
private fun showMediaEncryptionStatistics(model: CallMediaEncryptionModel) {
val modalBottomSheet = MediaEncryptionStatisticsDialogFragment(model)
modalBottomSheet.show(
requireActivity().supportFragmentManager,
MediaEncryptionStatisticsDialogFragment.TAG
)
bottomSheetDialog = modalBottomSheet
}
}

View file

@ -7,6 +7,9 @@
<import type="android.view.View" />
<import type="org.linphone.core.ChatRoom.SecurityLevel" />
<import type="org.linphone.ui.call.model.ConferenceModel" />
<variable
name="backClickListener"
type="View.OnClickListener" />
<variable
name="shareConferenceClickListener"
type="View.OnClickListener" />
@ -16,6 +19,9 @@
<variable
name="participantsListClickListener"
type="View.OnClickListener" />
<variable
name="callStatisticsClickListener"
type="View.OnClickListener" />
<variable
name="viewModel"
type="org.linphone.ui.call.viewmodel.CurrentCallViewModel" />
@ -40,27 +46,11 @@
android:layout_height="match_parent"
android:background="@color/gray_900">
<ImageView
android:id="@+id/background"
android:src="@drawable/shape_round_in_call_gray_background"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:layout_marginTop="@dimen/call_top_bar_info_height"
android:layout_marginBottom="@dimen/call_main_actions_menu_margin"
android:visibility="@{conferenceViewModel.participantDevices.size() > 1 || viewModel.pipMode ? View.GONE : View.VISIBLE}"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style_300"
android:id="@+id/waiting_for_others"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginStart="5dp"
android:layout_marginEnd="5dp"
android:text="@string/conference_call_empty"
@ -68,8 +58,8 @@
android:textSize="22sp"
android:gravity="center"
android:visibility="@{conferenceViewModel.participantDevices.size() > 1 ? View.GONE : View.VISIBLE}"
app:layout_constraintTop_toTopOf="@id/background"
app:layout_constraintBottom_toBottomOf="@id/background"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
@ -93,8 +83,8 @@
android:drawablePadding="8dp"
app:drawableTint="@color/gray_main2_400"
app:layout_constraintTop_toBottomOf="@id/waiting_for_others"
app:layout_constraintStart_toStartOf="@id/background"
app:layout_constraintEnd_toEndOf="@id/background"/>
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<androidx.fragment.app.FragmentContainerView
android:id="@+id/conference_layout_nav_host_fragment"
@ -102,32 +92,31 @@
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_top_bar_info_height, default=@dimen/call_top_bar_info_height}"
android:visibility="@{conferenceViewModel.participantDevices.size() > 1 ? View.VISIBLE : View.GONE}"
app:navGraph="@navigation/conference_nav_graph"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
app:layout_constraintBottom_toBottomOf="@id/media_encryption_icon"/>
<androidx.constraintlayout.widget.Group
android:id="@+id/header_info_visibility"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="@{viewModel.fullScreenMode || viewModel.pipMode ? View.INVISIBLE : View.VISIBLE}"
app:constraint_referenced_ids="conference_icon, conference_subject, separator, chronometer" />
app:constraint_referenced_ids="back, conference_subject, separator, chronometer" />
<ImageView
android:id="@+id/conference_icon"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_marginStart="10dp"
android:id="@+id/back"
android:onClick="@{backClickListener}"
android:layout_width="wrap_content"
android:layout_height="@dimen/top_bar_height"
android:adjustViewBounds="true"
android:src="@drawable/meeting"
android:padding="15dp"
android:src="@drawable/caret_left"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/conference_subject"
app:layout_constraintBottom_toBottomOf="@id/conference_subject"
app:tint="?attr/color_main1_500" />
app:layout_constraintTop_toTopOf="parent"
app:tint="@color/white" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/call_header_style"
@ -139,7 +128,7 @@
android:text="@{conferenceViewModel.subject, default=`Meeting with John Doe`}"
android:maxLines="1"
android:ellipsize="end"
app:layout_constraintStart_toEndOf="@id/conference_icon"
app:layout_constraintStart_toEndOf="@id/back"
app:layout_constraintTop_toTopOf="parent"/>
<androidx.appcompat.widget.AppCompatTextView
@ -178,18 +167,64 @@
app:layout_constraintTop_toTopOf="@id/conference_subject"/>
<ImageView
android:onClick="@{() -> viewModel.switchCamera()}"
android:id="@+id/switch_camera"
style="@style/default_text_style"
android:id="@+id/media_encryption_icon"
android:onClick="@{() -> viewModel.showMediaEncryptionStatisticsIfPossible()}"
android:layout_width="@dimen/small_icon_size"
android:layout_height="0dp"
android:layout_marginStart="10dp"
android:adjustViewBounds="true"
android:paddingTop="3dp"
android:contentDescription="@null"
android:src="@{viewModel.isZrtpPq ? @drawable/atom : @drawable/lock_simple, default=@drawable/atom}"
android:visibility="@{!viewModel.fullScreenMode &amp;&amp; !viewModel.pipMode &amp;&amp; viewModel.isMediaEncrypted ? View.VISIBLE : View.GONE}"
app:layout_constraintStart_toEndOf="@id/back"
app:layout_constraintTop_toTopOf="@id/media_encryption_label"
app:layout_constraintBottom_toBottomOf="@id/media_encryption_label"
app:tint="@color/blue_info_500" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/media_encryption_label"
android:onClick="@{() -> viewModel.showMediaEncryptionStatisticsIfPossible()}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="@{viewModel.isZrtpPq ? @string/call_post_quantum_zrtp_end_to_end_encrypted : @string/call_zrtp_end_to_end_encrypted, default=@string/call_post_quantum_zrtp_end_to_end_encrypted}"
android:textSize="12sp"
android:textColor="@color/blue_info_500"
android:maxLines="1"
android:ellipsize="end"
android:visibility="@{!viewModel.fullScreenMode &amp;&amp; !viewModel.pipMode &amp;&amp; viewModel.isMediaEncrypted ? View.VISIBLE : View.GONE}"
app:layout_constraintStart_toEndOf="@id/media_encryption_icon"
app:layout_constraintTop_toBottomOf="@id/conference_subject"/>
<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:padding="10dp"
android:layout_marginEnd="10dp"
android:src="@drawable/cell_signal_full"
android:visibility="@{!viewModel.fullScreenMode &amp;&amp; !viewModel.pipMode ? View.VISIBLE : View.GONE}"
app:tint="@color/white"
app:layout_constraintTop_toTopOf="@id/conference_subject"
app:layout_constraintBottom_toBottomOf="@id/conference_subject"
app:layout_constraintEnd_toEndOf="parent" />
<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:padding="10dp"
android:layout_marginEnd="5dp"
android:src="@drawable/camera_rotate"
android:visibility="@{!viewModel.fullScreenMode &amp;&amp; !viewModel.pipMode &amp;&amp; viewModel.isVideoEnabled &amp;&amp; viewModel.showSwitchCamera ? View.VISIBLE : View.GONE}"
app:tint="@color/white"
app:layout_constraintTop_toTopOf="@id/conference_subject"
app:layout_constraintBottom_toBottomOf="@id/conference_subject"
app:layout_constraintEnd_toEndOf="parent" />
app:layout_constraintEnd_toStartOf="@+id/stats" />
<ImageView
android:id="@+id/recording"
@ -199,15 +234,14 @@
android:layout_marginStart="10dp"
android:src="@drawable/record_fill"
android:visibility="@{viewModel.isRecording ? View.VISIBLE : View.GONE, default=gone}"
app:layout_constraintTop_toTopOf="@id/background"
app:layout_constraintStart_toStartOf="@id/background"
app:layout_constraintTop_toBottomOf="@id/media_encryption_icon"
app:layout_constraintStart_toStartOf="parent"
app:tint="?attr/color_danger_500" />
</androidx.constraintlayout.widget.ConstraintLayout>
<include
android:id="@+id/bottom_bar"
android:visibility="@{viewModel.fullScreenMode || viewModel.pipMode ? View.INVISIBLE : View.VISIBLE}"
layout="@layout/call_conference_actions_bottom_sheet"
bind:viewModel="@{viewModel}"
bind:callsViewModel="@{callsViewModel}"

View file

@ -53,33 +53,19 @@
android:orientation="horizontal"
app:layout_constraintGuide_percent="1" />
<ImageView
android:id="@+id/background"
android:src="@drawable/shape_round_in_call_gray_background"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:layout_marginBottom="@dimen/call_main_actions_menu_margin"
app:layout_constraintTop_toBottomOf="@id/media_encryption_icon"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<com.google.android.material.imageview.ShapeableImageView
style="@style/avatar_imageview"
android:id="@+id/avatar"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="5dp"
coilCallAvatar="@{viewModel.contact}"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintWidth_max="@dimen/avatar_in_call_size"
app:layout_constraintHeight_max="@dimen/avatar_in_call_size"
app:layout_constraintVertical_chainStyle="packed"
app:layout_constraintEnd_toEndOf="@id/background"
app:layout_constraintStart_toStartOf="@id/background"
app:layout_constraintTop_toTopOf="@id/background"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/media_encryption_icon"
app:layout_constraintBottom_toTopOf="@id/display_name"/>
<ImageView
@ -115,7 +101,7 @@
android:textColor="@color/white"
android:textSize="14sp"
app:layout_constraintTop_toBottomOf="@id/display_name"
app:layout_constraintBottom_toBottomOf="@id/background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
@ -261,12 +247,12 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_marginBottom="40dp"
android:layout_marginBottom="20dp"
android:visibility="@{viewModel.isVideoEnabled ? View.VISIBLE : View.GONE}"
app:alignTopRight="true"
app:displayMode="black_bars"
app:layout_constraintBottom_toBottomOf="@id/background"
app:layout_constraintEnd_toEndOf="@id/background"
app:layout_constraintBottom_toBottomOf="@id/remote_video_surface"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_max="200dp"
app:layout_constraintWidth_max="200dp" />
@ -278,8 +264,8 @@
android:layout_marginStart="10dp"
android:src="@drawable/record_fill"
android:visibility="@{viewModel.isRecording ? View.VISIBLE : View.GONE, default=gone}"
app:layout_constraintTop_toTopOf="@id/background"
app:layout_constraintStart_toStartOf="@id/background"
app:layout_constraintTop_toBottomOf="@id/media_encryption_icon"
app:layout_constraintStart_toStartOf="parent"
app:tint="?attr/color_danger_500" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -16,30 +16,16 @@
android:layout_height="match_parent"
android:background="@color/gray_900">
<androidx.constraintlayout.widget.Group
android:id="@+id/single_call_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="call_direction_label, call_direction_icon"
android:visibility="@{viewModel.conferenceModel.isCurrentCallInConference ? View.GONE : View.VISIBLE}" />
<androidx.constraintlayout.widget.Group
android:id="@+id/conference_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="conference_icon, conference_subject"
android:visibility="@{viewModel.conferenceModel.isCurrentCallInConference ? View.VISIBLE : View.GONE, default=gone}" />
<ImageView
android:id="@+id/call_direction_icon"
android:layout_width="12dp"
android:layout_height="12dp"
android:layout_marginStart="10dp"
android:id="@+id/back"
android:layout_width="wrap_content"
android:layout_height="@dimen/top_bar_height"
android:adjustViewBounds="true"
android:src="@{viewModel.isOutgoing ? @drawable/outgoing_call : @drawable/incoming_call, default=@drawable/outgoing_call}"
android:padding="15dp"
android:src="@drawable/caret_left"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/call_direction_label"
app:layout_constraintBottom_toBottomOf="@id/call_direction_label"/>
app:layout_constraintTop_toTopOf="parent"
app:tint="@color/white" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/call_header_style"
@ -48,41 +34,10 @@
android:layout_height="@dimen/call_top_bar_text_height"
android:layout_marginStart="10dp"
android:text="@string/call_ended"
app:layout_constraintStart_toEndOf="@id/call_direction_icon"
app:layout_constraintTop_toTopOf="@id/separator"
app:layout_constraintBottom_toBottomOf="@id/separator"/>
<ImageView
android:id="@+id/conference_icon"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_marginStart="10dp"
android:adjustViewBounds="true"
android:src="@drawable/meeting"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/conference_subject"
app:layout_constraintBottom_toBottomOf="@id/conference_subject"
app:tint="?attr/color_main1_500" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/call_header_style"
android:id="@+id/conference_subject"
android:layout_width="wrap_content"
android:layout_height="@dimen/call_top_bar_text_height"
android:layout_marginStart="10dp"
android:text="@{viewModel.conferenceModel.subject, default=`Meeting with John Doe`}"
android:maxLines="1"
android:ellipsize="end"
app:layout_constraintStart_toEndOf="@id/conference_icon"
app:layout_constraintTop_toTopOf="@id/separator"
app:layout_constraintBottom_toBottomOf="@id/separator"/>
<androidx.constraintlayout.widget.Barrier
android:id="@+id/header_end_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="end"
app:constraint_referenced_ids="call_direction_label, conference_subject" />
android:visibility="@{viewModel.conferenceModel.isCurrentCallInConference ? View.GONE : View.VISIBLE}"
app:layout_constraintStart_toEndOf="@id/back"
app:layout_constraintTop_toTopOf="@id/back"
app:layout_constraintBottom_toBottomOf="@id/back"/>
<androidx.appcompat.widget.AppCompatTextView
style="@style/call_header_style"
@ -90,10 +45,10 @@
android:layout_width="wrap_content"
android:layout_height="@dimen/call_top_bar_text_height"
android:layout_marginStart="5dp"
android:layout_marginTop="10dp"
android:text="@string/vertical_separator"
app:layout_constraintStart_toEndOf="@id/header_end_barrier"
app:layout_constraintTop_toTopOf="parent"/>
app:layout_constraintStart_toEndOf="@id/call_direction_label"
app:layout_constraintTop_toTopOf="@id/call_direction_label"
app:layout_constraintBottom_toBottomOf="@id/call_direction_label"/>
<Chronometer
style="@style/call_header_style"
@ -103,47 +58,55 @@
android:layout_marginStart="5dp"
android:visibility="@{viewModel.isPaused || viewModel.isPausedByRemote ? View.GONE : View.VISIBLE}"
app:layout_constraintStart_toEndOf="@id/separator"
app:layout_constraintTop_toTopOf="@id/separator"/>
app:layout_constraintTop_toTopOf="@id/call_direction_label"
app:layout_constraintBottom_toBottomOf="@id/call_direction_label"/>
<ImageView
android:id="@+id/media_encryption"
android:layout_width="@dimen/call_top_bar_info_height"
android:layout_height="@dimen/call_top_bar_info_height"
android:padding="10dp"
android:src="@{viewModel.isZrtpPq ? @drawable/media_encryption_zrtp_pq : @drawable/media_encryption_srtp, default=@drawable/media_encryption_zrtp_pq}"
android:visibility="@{viewModel.isMediaEncrypted ? View.VISIBLE : View.GONE}"
app:layout_constraintTop_toTopOf="@id/separator"
app:layout_constraintBottom_toBottomOf="@id/separator"
app:layout_constraintEnd_toEndOf="parent" />
<ImageView
android:id="@+id/background"
android:src="@drawable/shape_round_in_call_gray_background"
android:layout_width="0dp"
style="@style/default_text_style"
android:id="@+id/media_encryption_icon"
android:onClick="@{() -> viewModel.showMediaEncryptionStatisticsIfPossible()}"
android:layout_width="@dimen/small_icon_size"
android:layout_height="0dp"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
app:layout_constraintTop_toBottomOf="@id/separator"
app:layout_constraintBottom_toTopOf="@id/bottom_bar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
android:layout_marginStart="10dp"
android:adjustViewBounds="true"
android:paddingTop="3dp"
android:contentDescription="@null"
android:src="@{viewModel.isZrtpPq ? @drawable/atom : @drawable/lock_simple, default=@drawable/atom}"
android:visibility="@{!viewModel.fullScreenMode &amp;&amp; !viewModel.pipMode &amp;&amp; viewModel.isMediaEncrypted ? View.VISIBLE : View.GONE}"
app:layout_constraintStart_toEndOf="@id/back"
app:layout_constraintTop_toTopOf="@id/media_encryption_label"
app:layout_constraintBottom_toBottomOf="@id/media_encryption_label"
app:tint="@color/blue_info_500" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/media_encryption_label"
android:onClick="@{() -> viewModel.showMediaEncryptionStatisticsIfPossible()}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="@{viewModel.isZrtpPq ? @string/call_post_quantum_zrtp_end_to_end_encrypted : @string/call_zrtp_end_to_end_encrypted, default=@string/call_post_quantum_zrtp_end_to_end_encrypted}"
android:textSize="12sp"
android:textColor="@color/blue_info_500"
android:maxLines="1"
android:ellipsize="end"
android:visibility="@{!viewModel.fullScreenMode &amp;&amp; !viewModel.pipMode &amp;&amp; viewModel.isMediaEncrypted ? View.VISIBLE : View.GONE}"
app:layout_constraintStart_toEndOf="@id/media_encryption_icon"
app:layout_constraintTop_toBottomOf="@id/call_direction_label"/>
<com.google.android.material.imageview.ShapeableImageView
style="@style/avatar_imageview"
android:id="@+id/avatar"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="5dp"
coilCallAvatar="@{viewModel.contact}"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintWidth_max="@dimen/avatar_in_call_size"
app:layout_constraintHeight_max="@dimen/avatar_in_call_size"
app:layout_constraintVertical_chainStyle="packed"
app:layout_constraintEnd_toEndOf="@id/background"
app:layout_constraintStart_toStartOf="@id/background"
app:layout_constraintTop_toTopOf="@id/background"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/media_encryption_icon"
app:layout_constraintBottom_toTopOf="@id/name"/>
<ImageView
@ -179,7 +142,7 @@
android:textColor="@color/white"
android:textSize="14sp"
app:layout_constraintTop_toBottomOf="@id/name"
app:layout_constraintBottom_toBottomOf="@id/background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />

View file

@ -37,32 +37,7 @@
android:layout_marginBottom="10dp"
android:text="@{viewModel.incomingCallTitle, default=@string/call_incoming}"
app:layout_constraintStart_toEndOf="@id/call_direction_icon"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/background"/>
<ImageView
android:id="@+id/media_encryption"
android:layout_width="@dimen/call_top_bar_info_height"
android:layout_height="@dimen/call_top_bar_info_height"
android:padding="10dp"
android:src="@{viewModel.isZrtpPq ? @drawable/media_encryption_zrtp_pq : @drawable/media_encryption_srtp, default=@drawable/media_encryption_zrtp_pq}"
android:visibility="@{viewModel.isMediaEncrypted ? View.VISIBLE : View.GONE}"
app:layout_constraintTop_toTopOf="@id/call_direction_label"
app:layout_constraintBottom_toBottomOf="@id/call_direction_label"
app:layout_constraintEnd_toEndOf="parent" />
<ImageView
android:id="@+id/background"
android:src="@drawable/shape_round_in_call_gray_background"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:layout_marginBottom="10dp"
app:layout_constraintTop_toBottomOf="@id/call_direction_label"
app:layout_constraintBottom_toTopOf="@id/bottom_bar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
app:layout_constraintTop_toTopOf="parent"/>
<com.google.android.material.imageview.ShapeableImageView
style="@style/avatar_imageview"
@ -70,10 +45,11 @@
android:layout_width="@dimen/avatar_in_call_size"
android:layout_height="@dimen/avatar_in_call_size"
coilCallAvatar="@{viewModel.contact}"
app:layout_constraintEnd_toEndOf="@id/background"
app:layout_constraintStart_toStartOf="@id/background"
app:layout_constraintTop_toTopOf="@id/background"
app:layout_constraintBottom_toBottomOf="@id/background"/>
app:layout_constraintVertical_chainStyle="packed"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/call_direction_label"
app:layout_constraintBottom_toTopOf="@id/name"/>
<ImageView
android:id="@+id/trust_badge"
@ -103,7 +79,7 @@
android:textSize="30sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/background"
app:layout_constraintTop_toBottomOf="@id/call_direction_label"
app:layout_constraintBottom_toTopOf="@id/avatar" />
<androidx.appcompat.widget.AppCompatTextView
@ -116,6 +92,7 @@
android:textColor="@color/white"
android:textSize="22sp"
app:layout_constraintTop_toBottomOf="@id/avatar"
app:layout_constraintBottom_toBottomOf="@id/address"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
@ -129,6 +106,7 @@
android:textSize="14sp"
android:visibility="@{viewModel.conferenceModel.isCurrentCallInConference ? View.GONE : View.VISIBLE}"
app:layout_constraintTop_toBottomOf="@id/name"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />

View file

@ -37,46 +37,7 @@
android:layout_marginBottom="10dp"
android:text="@string/call_outgoing"
app:layout_constraintStart_toEndOf="@id/call_direction_icon"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/background"/>
<ImageView
android:id="@+id/media_encryption"
android:layout_width="@dimen/call_top_bar_info_height"
android:layout_height="@dimen/call_top_bar_info_height"
android:padding="10dp"
android:src="@{viewModel.isZrtpPq ? @drawable/media_encryption_zrtp_pq : @drawable/media_encryption_srtp, default=@drawable/media_encryption_zrtp_pq}"
android:visibility="@{viewModel.isMediaEncrypted ? View.VISIBLE : View.GONE}"
app:layout_constraintTop_toTopOf="@id/call_direction_label"
app:layout_constraintBottom_toBottomOf="@id/call_direction_label"
app:layout_constraintEnd_toStartOf="@id/switch_camera" />
<ImageView
android:onClick="@{() -> viewModel.switchCamera()}"
android:id="@+id/switch_camera"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_marginEnd="10dp"
android:adjustViewBounds="true"
android:src="@drawable/camera_rotate"
android:visibility="@{viewModel.isVideoEnabled() ? View.VISIBLE : View.GONE}"
app:layout_constraintTop_toTopOf="@id/call_direction_label"
app:layout_constraintBottom_toBottomOf="@id/call_direction_label"
app:layout_constraintEnd_toEndOf="parent"
app:tint="@color/white" />
<ImageView
android:id="@+id/background"
android:src="@drawable/shape_round_in_call_gray_background"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:layout_marginBottom="10dp"
app:layout_constraintTop_toBottomOf="@id/call_direction_label"
app:layout_constraintBottom_toTopOf="@id/bottom_bar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
app:layout_constraintTop_toTopOf="parent"/>
<com.google.android.material.imageview.ShapeableImageView
style="@style/avatar_imageview"
@ -84,10 +45,11 @@
android:layout_width="@dimen/avatar_in_call_size"
android:layout_height="@dimen/avatar_in_call_size"
coilCallAvatar="@{viewModel.contact}"
app:layout_constraintEnd_toEndOf="@id/background"
app:layout_constraintStart_toStartOf="@id/background"
app:layout_constraintTop_toTopOf="@id/background"
app:layout_constraintBottom_toBottomOf="@id/background"/>
app:layout_constraintVertical_chainStyle="packed"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/call_direction_label"
app:layout_constraintBottom_toTopOf="@id/name"/>
<ImageView
android:id="@+id/trust_badge"
@ -117,7 +79,7 @@
android:textSize="30sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/background"
app:layout_constraintTop_toBottomOf="@id/call_direction_label"
app:layout_constraintBottom_toTopOf="@id/avatar" />
<androidx.appcompat.widget.AppCompatTextView
@ -130,6 +92,7 @@
android:textColor="@color/white"
android:textSize="22sp"
app:layout_constraintTop_toBottomOf="@id/avatar"
app:layout_constraintBottom_toTopOf="@id/address"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
@ -142,6 +105,7 @@
android:textColor="@color/white"
android:textSize="14sp"
app:layout_constraintTop_toBottomOf="@id/name"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />