Call controls: move choose sound device out of overflow menu
This commit is contained in:
parent
edd24de4c3
commit
e888f2b15a
@ -45,10 +45,6 @@ class CallControlsBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetC
|
||||
renderState(it)
|
||||
}
|
||||
|
||||
views.callControlsSoundDevice.views.bottomSheetActionClickableZone.debouncedClicks {
|
||||
callViewModel.handle(VectorCallViewActions.SwitchSoundDevice)
|
||||
}
|
||||
|
||||
views.callControlsSwitchCamera.views.bottomSheetActionClickableZone.debouncedClicks {
|
||||
callViewModel.handle(VectorCallViewActions.ToggleCamera)
|
||||
dismiss()
|
||||
@ -72,71 +68,9 @@ class CallControlsBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetC
|
||||
callViewModel.handle(VectorCallViewActions.InitiateCallTransfer)
|
||||
dismiss()
|
||||
}
|
||||
|
||||
callViewModel.observeViewEvents {
|
||||
when (it) {
|
||||
is VectorCallViewEvents.ShowSoundDeviceChooser -> {
|
||||
showSoundDeviceChooser(it.available, it.current)
|
||||
}
|
||||
else -> {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun showSoundDeviceChooser(available: Set<CallAudioManager.Device>, current: CallAudioManager.Device) {
|
||||
val soundDevices = available.map {
|
||||
when (it) {
|
||||
CallAudioManager.Device.WIRELESS_HEADSET -> span {
|
||||
text = getString(R.string.sound_device_wireless_headset)
|
||||
textStyle = if (current == it) "bold" else "normal"
|
||||
}
|
||||
CallAudioManager.Device.PHONE -> span {
|
||||
text = getString(R.string.sound_device_phone)
|
||||
textStyle = if (current == it) "bold" else "normal"
|
||||
}
|
||||
CallAudioManager.Device.SPEAKER -> span {
|
||||
text = getString(R.string.sound_device_speaker)
|
||||
textStyle = if (current == it) "bold" else "normal"
|
||||
}
|
||||
CallAudioManager.Device.HEADSET -> span {
|
||||
text = getString(R.string.sound_device_headset)
|
||||
textStyle = if (current == it) "bold" else "normal"
|
||||
}
|
||||
}
|
||||
}
|
||||
MaterialAlertDialogBuilder(requireContext())
|
||||
.setItems(soundDevices.toTypedArray()) { d, n ->
|
||||
d.cancel()
|
||||
when (soundDevices[n].toString()) {
|
||||
// TODO Make an adapter and handle multiple Bluetooth headsets. Also do not use translations.
|
||||
getString(R.string.sound_device_phone) -> {
|
||||
callViewModel.handle(VectorCallViewActions.ChangeAudioDevice(CallAudioManager.Device.PHONE))
|
||||
}
|
||||
getString(R.string.sound_device_speaker) -> {
|
||||
callViewModel.handle(VectorCallViewActions.ChangeAudioDevice(CallAudioManager.Device.SPEAKER))
|
||||
}
|
||||
getString(R.string.sound_device_headset) -> {
|
||||
callViewModel.handle(VectorCallViewActions.ChangeAudioDevice(CallAudioManager.Device.HEADSET))
|
||||
}
|
||||
getString(R.string.sound_device_wireless_headset) -> {
|
||||
callViewModel.handle(VectorCallViewActions.ChangeAudioDevice(CallAudioManager.Device.WIRELESS_HEADSET))
|
||||
}
|
||||
}
|
||||
}
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.show()
|
||||
}
|
||||
|
||||
private fun renderState(state: VectorCallViewState) {
|
||||
views.callControlsSoundDevice.title = getString(R.string.call_select_sound_device)
|
||||
views.callControlsSoundDevice.subTitle = when (state.device) {
|
||||
CallAudioManager.Device.PHONE -> getString(R.string.sound_device_phone)
|
||||
CallAudioManager.Device.SPEAKER -> getString(R.string.sound_device_speaker)
|
||||
CallAudioManager.Device.HEADSET -> getString(R.string.sound_device_headset)
|
||||
CallAudioManager.Device.WIRELESS_HEADSET -> getString(R.string.sound_device_wireless_headset)
|
||||
}
|
||||
|
||||
views.callControlsSwitchCamera.isVisible = state.isVideoCall && state.canSwitchCamera
|
||||
views.callControlsSwitchCamera.subTitle = getString(if (state.isFrontCamera) R.string.call_camera_front else R.string.call_camera_back)
|
||||
|
||||
|
@ -36,16 +36,19 @@ class CallControlsView @JvmOverloads constructor(
|
||||
init {
|
||||
inflate(context, R.layout.view_call_controls, this)
|
||||
views = ViewCallControlsBinding.bind(this)
|
||||
|
||||
views.audioSettingsIcon.setOnClickListener { didTapAudioSettings() }
|
||||
views.ringingControlAccept.setOnClickListener { acceptIncomingCall() }
|
||||
views.ringingControlDecline.setOnClickListener { declineIncomingCall() }
|
||||
views.endCallIcon.setOnClickListener { endOngoingCall() }
|
||||
views.muteIcon.setOnClickListener { toggleMute() }
|
||||
views.videoToggleIcon.setOnClickListener { toggleVideo() }
|
||||
views.openChatIcon.setOnClickListener { returnToChat() }
|
||||
views.moreIcon.setOnClickListener { moreControlOption() }
|
||||
}
|
||||
|
||||
private fun didTapAudioSettings() {
|
||||
interactionListener?.didTapAudioSettings()
|
||||
}
|
||||
|
||||
private fun acceptIncomingCall() {
|
||||
interactionListener?.didAcceptIncomingCall()
|
||||
}
|
||||
@ -66,9 +69,6 @@ class CallControlsView @JvmOverloads constructor(
|
||||
interactionListener?.didTapToggleVideo()
|
||||
}
|
||||
|
||||
private fun returnToChat() {
|
||||
interactionListener?.returnToChat()
|
||||
}
|
||||
|
||||
private fun moreControlOption() {
|
||||
interactionListener?.didTapMore()
|
||||
@ -127,12 +127,12 @@ class CallControlsView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
interface InteractionListener {
|
||||
fun didTapAudioSettings()
|
||||
fun didAcceptIncomingCall()
|
||||
fun didDeclineIncomingCall()
|
||||
fun didEndCall()
|
||||
fun didTapToggleMute()
|
||||
fun didTapToggleVideo()
|
||||
fun returnToChat()
|
||||
fun didTapMore()
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,74 @@
|
||||
/*
|
||||
* Copyright (c) 2020 New Vector Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package im.vector.app.features.call
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.airbnb.mvrx.activityViewModel
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.epoxy.bottomsheet.bottomSheetActionItem
|
||||
import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment
|
||||
import im.vector.app.databinding.BottomSheetGenericListBinding
|
||||
import im.vector.app.features.call.audio.CallAudioManager
|
||||
import im.vector.app.features.home.room.list.actions.RoomListQuickActionsBottomSheet
|
||||
|
||||
class CallSoundDeviceChooserBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetGenericListBinding>() {
|
||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): BottomSheetGenericListBinding {
|
||||
return BottomSheetGenericListBinding.inflate(inflater, container, false)
|
||||
}
|
||||
|
||||
private val callViewModel: VectorCallViewModel by activityViewModel()
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
callViewModel.observeViewEvents {
|
||||
when (it) {
|
||||
is VectorCallViewEvents.ShowSoundDeviceChooser -> {
|
||||
render(it.available, it.current)
|
||||
}
|
||||
else -> {
|
||||
}
|
||||
}
|
||||
}
|
||||
callViewModel.handle(VectorCallViewActions.SwitchSoundDevice)
|
||||
}
|
||||
|
||||
private fun render(available: Set<CallAudioManager.Device>, current: CallAudioManager.Device) {
|
||||
views.bottomSheetRecyclerView.withModels {
|
||||
available.forEach { device ->
|
||||
bottomSheetActionItem {
|
||||
id(device.ordinal)
|
||||
textRes(device.titleRes)
|
||||
iconRes(device.drawableRes)
|
||||
selected(current == device)
|
||||
listener {
|
||||
callViewModel.handle(VectorCallViewActions.ChangeAudioDevice(device))
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun newInstance(): RoomListQuickActionsBottomSheet {
|
||||
return RoomListQuickActionsBottomSheet()
|
||||
}
|
||||
}
|
||||
}
|
@ -26,6 +26,7 @@ import android.os.Bundle
|
||||
import android.os.Parcelable
|
||||
import android.view.View
|
||||
import android.view.WindowManager
|
||||
import androidx.core.content.ContentProviderCompat.requireContext
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.content.getSystemService
|
||||
import androidx.core.view.isInvisible
|
||||
@ -43,6 +44,7 @@ import im.vector.app.core.utils.PERMISSIONS_FOR_VIDEO_IP_CALL
|
||||
import im.vector.app.core.utils.allGranted
|
||||
import im.vector.app.core.utils.checkPermissions
|
||||
import im.vector.app.databinding.ActivityCallBinding
|
||||
import im.vector.app.features.call.audio.CallAudioManager
|
||||
import im.vector.app.features.call.dialpad.CallDialPadBottomSheet
|
||||
import im.vector.app.features.call.dialpad.DialPadFragment
|
||||
import im.vector.app.features.call.utils.EglUtils
|
||||
@ -53,6 +55,7 @@ import im.vector.app.features.home.room.detail.RoomDetailActivity
|
||||
import im.vector.app.features.home.room.detail.RoomDetailArgs
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import me.gujun.android.span.span
|
||||
import org.matrix.android.sdk.api.extensions.orFalse
|
||||
import org.matrix.android.sdk.api.session.call.CallState
|
||||
import org.matrix.android.sdk.api.session.call.MxPeerConnectionState
|
||||
@ -404,6 +407,10 @@ class VectorCallActivity : VectorBaseActivity<ActivityCallBinding>(), CallContro
|
||||
}
|
||||
}
|
||||
|
||||
override fun didTapAudioSettings() {
|
||||
CallSoundDeviceChooserBottomSheet().show(supportFragmentManager, "SoundDeviceChooser")
|
||||
}
|
||||
|
||||
override fun didAcceptIncomingCall() {
|
||||
callViewModel.handle(VectorCallViewActions.AcceptCall)
|
||||
}
|
||||
@ -424,7 +431,7 @@ class VectorCallActivity : VectorBaseActivity<ActivityCallBinding>(), CallContro
|
||||
callViewModel.handle(VectorCallViewActions.ToggleVideo)
|
||||
}
|
||||
|
||||
override fun returnToChat() {
|
||||
private fun returnToChat() {
|
||||
val args = RoomDetailArgs(callArgs.signalingRoomId)
|
||||
val intent = RoomDetailActivity.newIntent(this, args).apply {
|
||||
flags = FLAG_ACTIVITY_CLEAR_TOP
|
||||
|
@ -19,7 +19,10 @@ package im.vector.app.features.call.audio
|
||||
import android.content.Context
|
||||
import android.media.AudioManager
|
||||
import android.os.Build
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.core.content.getSystemService
|
||||
import im.vector.app.R
|
||||
import org.matrix.android.sdk.api.extensions.orFalse
|
||||
import timber.log.Timber
|
||||
import java.util.HashSet
|
||||
@ -31,11 +34,11 @@ class CallAudioManager(private val context: Context, val configChange: (() -> Un
|
||||
private var audioDeviceDetector: AudioDeviceDetector? = null
|
||||
private var audioDeviceRouter: AudioDeviceRouter? = null
|
||||
|
||||
enum class Device {
|
||||
PHONE,
|
||||
SPEAKER,
|
||||
HEADSET,
|
||||
WIRELESS_HEADSET
|
||||
enum class Device(@StringRes val titleRes: Int, @DrawableRes val drawableRes: Int) {
|
||||
PHONE(R.string.sound_device_phone,R.drawable.ic_sound_device_phone),
|
||||
SPEAKER(R.string.sound_device_speaker,R.drawable.ic_sound_device_speaker),
|
||||
HEADSET(R.string.sound_device_headset,R.drawable.ic_sound_device_headphone),
|
||||
WIRELESS_HEADSET(R.string.sound_device_wireless_headset,R.drawable.ic_sound_device_headphone)
|
||||
}
|
||||
|
||||
enum class Mode {
|
||||
|
15
vector/src/main/res/drawable/ic_call_audio_settings.xml
Normal file
15
vector/src/main/res/drawable/ic_call_audio_settings.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="30dp"
|
||||
android:height="26dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="26">
|
||||
<path
|
||||
android:pathData="M14.9623,0.7826L7.5,7.0012L1.875,7.0012C0.8395,7.0012 0,7.8406 0,8.8762V17.1262C0,18.1617 0.8395,19.0012 1.875,19.0012L7.5,19.0012L14.9623,25.2198C15.5729,25.7286 16.5,25.2944 16.5,24.4996V1.5028C16.5,0.7079 15.5729,0.2737 14.9623,0.7826Z"
|
||||
android:fillColor="#737D8C"/>
|
||||
<path
|
||||
android:pathData="M26.486,3.2332C26.0621,2.6883 25.2768,2.5902 24.7318,3.014C24.1875,3.4374 24.089,4.2214 24.5112,4.7663L24.5121,4.7675L24.5133,4.7691L24.5304,4.7918C24.547,4.8141 24.5737,4.8504 24.609,4.9002C24.6798,4.9999 24.785,5.153 24.9134,5.3548C25.1706,5.759 25.5181,6.3541 25.8665,7.1007C26.5669,8.6014 27.2493,10.6674 27.2493,13.0007C27.2493,15.3339 26.5669,17.4 25.8665,18.9006C25.5181,19.6472 25.1706,20.2424 24.9134,20.6465C24.785,20.8483 24.6798,21.0015 24.609,21.1011C24.5737,21.1509 24.547,21.1873 24.5304,21.2095L24.5133,21.2322L24.5121,21.2338L24.511,21.2353C24.089,21.7801 24.1876,22.5641 24.7318,22.9874C25.2768,23.4112 26.0621,23.313 26.486,22.7681L25.5544,22.0435C26.486,22.7681 26.486,22.7681 26.486,22.7681L26.4884,22.7649L26.492,22.7602L26.5024,22.7467L26.5355,22.7027C26.5629,22.6659 26.6007,22.6144 26.6473,22.5486C26.7406,22.4173 26.8697,22.2289 27.0226,21.9887C27.3279,21.509 27.7304,20.8184 28.132,19.9579C28.9317,18.2442 29.7493,15.8103 29.7493,13.0007C29.7493,10.191 28.9317,7.7571 28.132,6.0435C27.7304,5.1829 27.3279,4.4924 27.0226,4.0126C26.8697,3.7724 26.7406,3.5841 26.6473,3.4527C26.6007,3.387 26.5629,3.3354 26.5355,3.2987L26.5024,3.2547L26.492,3.2411L26.4884,3.2365L26.4871,3.2347C26.4871,3.2347 26.486,3.2332 25.4993,4.0007L26.486,3.2332Z"
|
||||
android:fillColor="#737D8C"/>
|
||||
<path
|
||||
android:pathData="M21.9871,7.7335C21.5632,7.1886 20.7779,7.0904 20.2329,7.5143C19.6894,7.937 19.5904,8.7193 20.0104,9.2641L20.0147,9.2698C20.0202,9.2773 20.0308,9.2917 20.0457,9.3126C20.0754,9.3545 20.1221,9.4223 20.1802,9.5136C20.2967,9.6967 20.4567,9.9705 20.6176,10.3153C20.943,11.0124 21.2504,11.9534 21.2504,13.001C21.2504,14.0485 20.943,14.9895 20.6176,15.6866C20.4567,16.0314 20.2967,16.3052 20.1802,16.4883C20.1221,16.5796 20.0754,16.6474 20.0457,16.6893C20.0308,16.7102 20.0202,16.7246 20.0147,16.7321L20.0104,16.7378C19.5904,17.2826 19.6894,18.0649 20.2329,18.4876C20.7779,18.9115 21.5632,18.8133 21.9871,18.2684L21.0004,17.5009C21.9871,18.2684 21.9871,18.2684 21.9871,18.2684L21.9893,18.2655L21.992,18.2619L21.9992,18.2526L22.0198,18.2252C22.0362,18.2032 22.0578,18.1736 22.084,18.1368C22.1363,18.0632 22.2068,17.9602 22.2893,17.8305C22.454,17.5718 22.669,17.2026 22.8831,16.7438C23.3078,15.8338 23.7504,14.5249 23.7504,13.001C23.7504,11.477 23.3078,10.1681 22.8831,9.2581C22.669,8.7993 22.454,8.4302 22.2893,8.1714C22.2068,8.0417 22.1363,7.9387 22.084,7.8651C22.0578,7.8282 22.0362,7.7987 22.0198,7.7766L21.9992,7.7493L21.992,7.74L21.9893,7.7364L21.9881,7.7349C21.9881,7.7349 21.9871,7.7335 21.0004,8.5009L21.9871,7.7335Z"
|
||||
android:fillColor="#737D8C"/>
|
||||
</vector>
|
@ -1,11 +0,0 @@
|
||||
<vector android:autoMirrored="true" android:height="40dp"
|
||||
android:viewportHeight="40" android:viewportWidth="40"
|
||||
android:width="40dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillAlpha="0.2" android:fillColor="#000000"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M20,20m-20,0a20,20 0,1 1,40 0a20,20 0,1 1,-40 0"
|
||||
android:strokeColor="#00000000" android:strokeWidth="1"/>
|
||||
<path android:fillColor="#FFFFFF" android:fillType="nonZero"
|
||||
android:pathData="M13.25,17.75L13.25,22.25L16.25,22.25L20,26L20,14L16.25,17.75L13.25,17.75ZM23.375,20C23.375,18.6725 22.61,17.5325 21.5,16.9775L21.5,23.015C22.61,22.4675 23.375,21.3275 23.375,20ZM21.5,13.4225L21.5,14.9675C23.6675,15.6125 25.25,17.6225 25.25,20C25.25,22.3775 23.6675,24.3875 21.5,25.0325L21.5,26.5775C24.5075,25.895 26.75,23.21 26.75,20C26.75,16.79 24.5075,14.105 21.5,13.4225Z"
|
||||
android:strokeColor="#00000000" android:strokeWidth="1"/>
|
||||
</vector>
|
@ -1,7 +0,0 @@
|
||||
<vector android:autoMirrored="true" android:height="18dp"
|
||||
android:viewportHeight="18" android:viewportWidth="18"
|
||||
android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FFFFFF" android:fillType="nonZero"
|
||||
android:pathData="M2.25,6.75L2.25,11.25L5.25,11.25L9,15L9,3L5.25,6.75L2.25,6.75ZM12.375,9C12.375,7.6725 11.61,6.5325 10.5,5.9775L10.5,12.015C11.61,11.4675 12.375,10.3275 12.375,9ZM10.5,2.4225L10.5,3.9675C12.6675,4.6125 14.25,6.6225 14.25,9C14.25,11.3775 12.6675,13.3875 10.5,14.0325L10.5,15.5775C13.5075,14.895 15.75,12.21 15.75,9C15.75,5.79 13.5075,3.105 10.5,2.4225Z"
|
||||
android:strokeColor="#00000000" android:strokeWidth="1"/>
|
||||
</vector>
|
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="20dp"
|
||||
android:height="20dp"
|
||||
android:viewportWidth="20"
|
||||
android:viewportHeight="20">
|
||||
<path
|
||||
android:pathData="M0,10V17.7778C0,19 1,20 2.2222,20H4.4444C5.6667,20 6.6667,19 6.6667,17.7778V13.3333C6.6667,12.1111 5.6667,11.1111 4.4444,11.1111H2.2222V10C2.2222,5.7 5.7,2.2222 10,2.2222C14.3,2.2222 17.7778,5.7 17.7778,10V11.1111H15.5556C14.3333,11.1111 13.3333,12.1111 13.3333,13.3333V17.7778C13.3333,19 14.3333,20 15.5556,20H17.7778C19,20 20,19 20,17.7778V10C20,4.4778 15.5222,0 10,0C4.4778,0 0,4.4778 0,10Z"
|
||||
android:fillColor="#737D8C"/>
|
||||
</vector>
|
9
vector/src/main/res/drawable/ic_sound_device_phone.xml
Normal file
9
vector/src/main/res/drawable/ic_sound_device_phone.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="14dp"
|
||||
android:height="22dp"
|
||||
android:viewportWidth="14"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:pathData="M12,0.01L2,0C0.9,0 0,0.9 0,2V20C0,21.1 0.9,22 2,22H12C13.1,22 14,21.1 14,20V2C14,0.9 13.1,0.01 12,0.01ZM12,18H2V4H12V18Z"
|
||||
android:fillColor="#737D8C"/>
|
||||
</vector>
|
15
vector/src/main/res/drawable/ic_sound_device_speaker.xml
Normal file
15
vector/src/main/res/drawable/ic_sound_device_speaker.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="20dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="20">
|
||||
<path
|
||||
android:pathData="M11.9699,0.226L6,5.2009L1.5,5.2009C0.6716,5.2009 0,5.8725 0,6.7009V13.3009C0,14.1294 0.6716,14.8009 1.5,14.8009L6,14.8009L11.9699,19.7758C12.4584,20.1829 13.2,19.8355 13.2,19.1996V0.8022C13.2,0.1663 12.4584,-0.181 11.9699,0.226Z"
|
||||
android:fillColor="#737D8C"/>
|
||||
<path
|
||||
android:pathData="M21.1888,2.1866C20.8497,1.7507 20.2214,1.6721 19.7855,2.0112C19.35,2.3499 19.2712,2.9771 19.6089,3.413L19.6097,3.414L19.6107,3.4153L19.6243,3.4335C19.6376,3.4513 19.6589,3.4803 19.6872,3.5202C19.7438,3.5999 19.828,3.7224 19.9308,3.8839C20.1365,4.2072 20.4145,4.6833 20.6932,5.2806C21.2535,6.4811 21.7994,8.134 21.7994,10.0005C21.7994,11.8671 21.2535,13.52 20.6932,14.7205C20.4145,15.3178 20.1365,15.7939 19.9308,16.1172C19.828,16.2786 19.7438,16.4012 19.6872,16.4809C19.6589,16.5208 19.6376,16.5498 19.6243,16.5676L19.6107,16.5858L19.6097,16.5871L19.6088,16.5882C19.2712,17.0241 19.3501,17.6512 19.7855,17.9899C20.2214,18.329 20.8497,18.2504 21.1888,17.8145L20.4435,17.2348C21.1888,17.8145 21.1888,17.8145 21.1888,17.8145L21.1908,17.8119L21.1936,17.8082L21.2019,17.7974L21.2284,17.7621C21.2503,17.7327 21.2805,17.6915 21.3179,17.6389C21.3925,17.5338 21.4958,17.3832 21.6181,17.191C21.8623,16.8072 22.1843,16.2547 22.5056,15.5663C23.1453,14.1954 23.7994,12.2482 23.7994,10.0005C23.7994,7.7528 23.1453,5.8057 22.5056,4.4348C22.1843,3.7463 21.8623,3.1939 21.6181,2.8101C21.4958,2.6179 21.3925,2.4673 21.3179,2.3622C21.2805,2.3096 21.2503,2.2683 21.2284,2.2389L21.2019,2.2037L21.1936,2.1929L21.1908,2.1892L21.1897,2.1877C21.1897,2.1877 21.1888,2.1866 20.3994,2.8005L21.1888,2.1866Z"
|
||||
android:fillColor="#737D8C"/>
|
||||
<path
|
||||
android:pathData="M17.5896,5.7868C17.2506,5.3509 16.6223,5.2723 16.1864,5.6114C15.7515,5.9496 15.6723,6.5755 16.0083,7.0113L16.0117,7.0159C16.0162,7.0219 16.0246,7.0333 16.0365,7.0501C16.0603,7.0836 16.0977,7.1378 16.1441,7.2108C16.2374,7.3574 16.3654,7.5764 16.4941,7.8522C16.7544,8.4099 17.0003,9.1628 17.0003,10.0008C17.0003,10.8388 16.7544,11.5916 16.4941,12.1493C16.3654,12.4251 16.2374,12.6441 16.1441,12.7907C16.0977,12.8637 16.0603,12.9179 16.0365,12.9514C16.0246,12.9682 16.0162,12.9797 16.0117,12.9857L16.0083,12.9903C15.6723,13.4261 15.7515,14.0519 16.1864,14.3901C16.6223,14.7292 17.2506,14.6506 17.5896,14.2147L16.8003,13.6008C17.5896,14.2147 17.5896,14.2147 17.5896,14.2147L17.5914,14.2124L17.5936,14.2095L17.5994,14.2021L17.6158,14.1802C17.6289,14.1626 17.6463,14.1389 17.6672,14.1094C17.709,14.0505 17.7654,13.9682 17.8315,13.8644C17.9632,13.6574 18.1352,13.3621 18.3065,12.9951C18.6462,12.267 19.0003,11.2199 19.0003,10.0008C19.0003,8.7816 18.6462,7.7345 18.3065,7.0065C18.1352,6.6394 17.9632,6.3441 17.8315,6.1371C17.7654,6.0333 17.709,5.951 17.6672,5.8921C17.6463,5.8626 17.6289,5.8389 17.6158,5.8213L17.5994,5.7995L17.5936,5.792L17.5914,5.7891L17.5905,5.7879C17.5905,5.7879 17.5896,5.7868 16.8003,6.4008L17.5896,5.7868Z"
|
||||
android:fillColor="#737D8C"/>
|
||||
</vector>
|
@ -7,16 +7,6 @@
|
||||
android:background="?colorSurface"
|
||||
android:orientation="vertical">
|
||||
|
||||
<im.vector.app.core.ui.views.BottomSheetActionButton
|
||||
android:id="@+id/callControlsSoundDevice"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:actionTitle="@string/call_select_sound_device"
|
||||
app:leftIcon="@drawable/ic_call_speaker_default"
|
||||
app:tint="?vctr_content_primary"
|
||||
app:titleTextColor="?vctr_content_primary"
|
||||
tools:actionDescription="Speaker" />
|
||||
|
||||
<im.vector.app.core.ui.views.BottomSheetActionButton
|
||||
android:id="@+id/callControlsSwitchCamera"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?colorSurface"
|
||||
android:orientation="vertical">
|
||||
|
||||
<im.vector.app.core.ui.views.BottomSheetActionButton
|
||||
android:id="@+id/callControlsSwitchCamera"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:actionTitle="@string/call_switch_camera"
|
||||
app:leftIcon="@drawable/ic_video_flip"
|
||||
app:tint="?vctr_content_primary"
|
||||
app:titleTextColor="?vctr_content_primary"
|
||||
tools:actionDescription="Front" />
|
||||
|
||||
<im.vector.app.core.ui.views.BottomSheetActionButton
|
||||
android:id="@+id/callControlsOpenDialPad"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:actionTitle="@string/call_dial_pad_title"
|
||||
app:leftIcon="@drawable/ic_call_dial_pad"
|
||||
app:tint="?vctr_content_primary"
|
||||
app:titleTextColor="?vctr_content_primary"
|
||||
tools:actionDescription="" />
|
||||
|
||||
<im.vector.app.core.ui.views.BottomSheetActionButton
|
||||
android:id="@+id/callControlsToggleSDHD"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:actionTitle="@string/call_format_turn_hd_on"
|
||||
app:leftIcon="@drawable/ic_hd"
|
||||
app:tint="?vctr_content_primary"
|
||||
app:titleTextColor="?vctr_content_primary"
|
||||
tools:actionDescription="Front" />
|
||||
|
||||
<im.vector.app.core.ui.views.BottomSheetActionButton
|
||||
android:id="@+id/callControlsToggleHoldResume"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:actionTitle="Hold/resume"
|
||||
app:leftIcon="@drawable/ic_call_hold_action"
|
||||
app:tint="?vctr_content_primary"
|
||||
app:titleTextColor="?vctr_content_primary"
|
||||
tools:actionDescription="" />
|
||||
|
||||
<im.vector.app.core.ui.views.BottomSheetActionButton
|
||||
android:id="@+id/callControlsTransfer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:actionTitle="@string/call_transfer_title"
|
||||
app:leftIcon="@drawable/ic_call_transfer"
|
||||
app:tint="?vctr_content_primary"
|
||||
app:titleTextColor="?vctr_content_primary"
|
||||
tools:actionDescription="" />
|
||||
|
||||
</LinearLayout>
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.airbnb.epoxy.EpoxyRecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/bottomSheetRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -66,15 +66,17 @@
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/openChatIcon"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:id="@+id/audioSettingsIcon"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:background="@drawable/bg_rounded_button"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/a11y_open_chat"
|
||||
android:contentDescription="@string/call_select_sound_device"
|
||||
android:focusable="true"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_call_pip"
|
||||
app:tint="?vctr_content_primary"
|
||||
app:backgroundTint="?android:colorBackground"
|
||||
android:src="@drawable/ic_call_audio_settings"
|
||||
tools:ignore="MissingConstraints,MissingPrefix" />
|
||||
|
||||
<ImageView
|
||||
@ -91,6 +93,21 @@
|
||||
app:tint="?vctr_content_primary"
|
||||
tools:ignore="MissingConstraints,MissingPrefix" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/videoToggleIcon"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:background="@drawable/bg_rounded_button"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/a11y_stop_camera"
|
||||
android:focusable="true"
|
||||
android:padding="16dp"
|
||||
android:src="@drawable/ic_call_videocam_off_default"
|
||||
app:backgroundTint="?android:colorBackground"
|
||||
app:tint="?vctr_content_primary"
|
||||
tools:ignore="MissingConstraints,MissingPrefix" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/endCallIcon"
|
||||
android:layout_width="56dp"
|
||||
@ -105,37 +122,27 @@
|
||||
app:tint="?colorOnPrimary"
|
||||
tools:ignore="MissingConstraints,MissingPrefix" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/videoToggleIcon"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:background="@drawable/bg_rounded_button"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/a11y_stop_camera"
|
||||
android:focusable="true"
|
||||
android:padding="16dp"
|
||||
android:src="@drawable/ic_call_videocam_off_default"
|
||||
app:backgroundTint="?android:colorBackground"
|
||||
app:tint="?vctr_content_primary"
|
||||
tools:ignore="MissingConstraints,MissingPrefix" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/moreIcon"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:background="@drawable/bg_rounded_button"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/endCallIcon"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/settings"
|
||||
android:focusable="true"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_more_horizontal"
|
||||
app:tint="@android:color/white"
|
||||
tools:ignore="MissingConstraints,MissingPrefix" />
|
||||
/>
|
||||
|
||||
<androidx.constraintlayout.helper.widget.Flow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="openChatIcon, muteIcon, endCallIcon,videoToggleIcon,moreIcon"
|
||||
app:constraint_referenced_ids="audioSettingsIcon,videoToggleIcon, muteIcon, endCallIcon"
|
||||
app:flow_horizontalGap="16dp"
|
||||
app:flow_horizontalStyle="packed"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user