refactor: match iOS styling for call activity closer
This commit is contained in:
parent
3b1ee2d28b
commit
7db853d407
|
@ -44,7 +44,6 @@ import org.thoughtcrime.securesms.webrtc.CallViewModel.State.CALL_RECONNECTING
|
||||||
import org.thoughtcrime.securesms.webrtc.CallViewModel.State.CALL_RINGING
|
import org.thoughtcrime.securesms.webrtc.CallViewModel.State.CALL_RINGING
|
||||||
import org.thoughtcrime.securesms.webrtc.audio.SignalAudioManager.AudioDevice.EARPIECE
|
import org.thoughtcrime.securesms.webrtc.audio.SignalAudioManager.AudioDevice.EARPIECE
|
||||||
import org.thoughtcrime.securesms.webrtc.audio.SignalAudioManager.AudioDevice.SPEAKER_PHONE
|
import org.thoughtcrime.securesms.webrtc.audio.SignalAudioManager.AudioDevice.SPEAKER_PHONE
|
||||||
import org.thoughtcrime.securesms.webrtc.data.quadrantRotation
|
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
class WebRtcCallActivity : PassphraseRequiredActionBarActivity() {
|
class WebRtcCallActivity : PassphraseRequiredActionBarActivity() {
|
||||||
|
@ -76,7 +75,7 @@ class WebRtcCallActivity : PassphraseRequiredActionBarActivity() {
|
||||||
override fun onOrientationChanged(orientation: Int) {
|
override fun onOrientationChanged(orientation: Int) {
|
||||||
if ((orientation + 15) % 90 < 30) {
|
if ((orientation + 15) % 90 < 30) {
|
||||||
viewModel.deviceRotation = orientation
|
viewModel.deviceRotation = orientation
|
||||||
updateControlsRotation(orientation.quadrantRotation() * -1)
|
// updateControlsRotation(orientation.quadrantRotation() * -1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -178,6 +177,9 @@ class WebRtcCallActivity : PassphraseRequiredActionBarActivity() {
|
||||||
binding.endCallButton.setOnClickListener {
|
binding.endCallButton.setOnClickListener {
|
||||||
startService(WebRtcCallService.hangupIntent(this))
|
startService(WebRtcCallService.hangupIntent(this))
|
||||||
}
|
}
|
||||||
|
binding.backArrow.setOnClickListener {
|
||||||
|
onBackPressed()
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -273,6 +275,7 @@ class WebRtcCallActivity : PassphraseRequiredActionBarActivity() {
|
||||||
val avatar = (signalProfilePicture as? ProfileContactPhoto)?.avatarObject
|
val avatar = (signalProfilePicture as? ProfileContactPhoto)?.avatarObject
|
||||||
val sizeInPX =
|
val sizeInPX =
|
||||||
resources.getDimensionPixelSize(R.dimen.extra_large_profile_picture_size)
|
resources.getDimensionPixelSize(R.dimen.extra_large_profile_picture_size)
|
||||||
|
binding.remoteRecipientName.text = displayName
|
||||||
if (signalProfilePicture != null && avatar != "0" && avatar != "") {
|
if (signalProfilePicture != null && avatar != "0" && avatar != "") {
|
||||||
glide.clear(binding.remoteRecipient)
|
glide.clear(binding.remoteRecipient)
|
||||||
glide.load(signalProfilePicture)
|
glide.load(signalProfilePicture)
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
android:height="24dp"
|
android:height="24dp"
|
||||||
android:viewportWidth="24"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="24"
|
android:viewportHeight="24"
|
||||||
android:tint="?attr/colorControlNormal">
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:autoMirrored="true">
|
||||||
<path
|
<path
|
||||||
android:fillColor="@android:color/white"
|
android:fillColor="@android:color/white"
|
||||||
android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
|
android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/remote_parent"
|
android:id="@+id/remote_parent"
|
||||||
|
android:background="@color/black"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
@ -32,6 +33,35 @@
|
||||||
android:layout_width="@dimen/extra_large_profile_picture_size"
|
android:layout_width="@dimen/extra_large_profile_picture_size"
|
||||||
android:layout_height="@dimen/extra_large_profile_picture_size"/>
|
android:layout_height="@dimen/extra_large_profile_picture_size"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/back_arrow"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
android:background="@drawable/call_controls_background"
|
||||||
|
android:elevation="8dp"
|
||||||
|
android:layout_marginLeft="@dimen/small_spacing"
|
||||||
|
android:layout_marginTop="@dimen/small_spacing"
|
||||||
|
android:src="@drawable/ic_baseline_arrow_back_24"
|
||||||
|
android:scaleType="centerInside"
|
||||||
|
android:layout_width="@dimen/medium_profile_picture_size"
|
||||||
|
android:layout_height="@dimen/medium_profile_picture_size"
|
||||||
|
app:tint="@color/call_action_foreground" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:layout_marginHorizontal="@dimen/massive_spacing"
|
||||||
|
android:layout_marginTop="@dimen/medium_spacing"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:id="@+id/remote_recipient_name"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="@tools:sample/full_names"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
<com.github.ybq.android.spinkit.SpinKitView
|
<com.github.ybq.android.spinkit.SpinKitView
|
||||||
android:id="@+id/remote_loading_view"
|
android:id="@+id/remote_loading_view"
|
||||||
style="@style/SpinKitView.ThreeBounce"
|
style="@style/SpinKitView.ThreeBounce"
|
||||||
|
@ -84,7 +114,8 @@
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintDimensionRatio="h,9:16"
|
app:layout_constraintDimensionRatio="h,9:16"
|
||||||
android:layout_margin="@dimen/large_spacing"
|
android:layout_marginHorizontal="@dimen/large_spacing"
|
||||||
|
android:layout_marginVertical="@dimen/massive_spacing"
|
||||||
app:layout_constraintWidth_percent="0.2"
|
app:layout_constraintWidth_percent="0.2"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_width="0dp">
|
android:layout_width="0dp">
|
||||||
|
|
|
@ -147,6 +147,9 @@
|
||||||
|
|
||||||
<style name="Theme.Session.CallActivity" parent="Theme.Session.ForceDark">
|
<style name="Theme.Session.CallActivity" parent="Theme.Session.ForceDark">
|
||||||
<!-- in case we want to add customisation like no title -->
|
<!-- in case we want to add customisation like no title -->
|
||||||
|
<item name="windowActionBar">false</item>
|
||||||
|
<item name="windowNoTitle">true</item>
|
||||||
|
<item name="android:statusBarColor">@color/black</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Session.BottomSheet" parent="@style/Theme.AppCompat.DayNight.Dialog">
|
<style name="Theme.Session.BottomSheet" parent="@style/Theme.AppCompat.DayNight.Dialog">
|
||||||
|
|
Loading…
Reference in New Issue