Started call actions

This commit is contained in:
Sylvain Berfini 2023-08-10 17:33:39 +02:00
parent fb9acf8da4
commit c4b0bf0ee0
28 changed files with 748 additions and 41 deletions

View file

@ -8,16 +8,14 @@ plugins {
id 'androidx.navigation.safeargs.kotlin'
}
static def getPackageName() {
return "org.linphone"
}
def packageName = "org.linphone"
android {
namespace 'org.linphone'
compileSdk 34
defaultConfig {
applicationId getPackageName()
applicationId packageName
minSdk 27
targetSdk 34
versionCode 60000
@ -28,14 +26,14 @@ android {
buildTypes {
debug {
resValue "string", "file_provider", getPackageName() + ".fileprovider"
resValue "string", "file_provider", packageName + ".fileprovider"
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
resValue "string", "file_provider", getPackageName() + ".fileprovider"
resValue "string", "file_provider", packageName + ".fileprovider"
}
}
compileOptions {

View file

@ -48,17 +48,14 @@ class ContactLoader : LoaderManager.LoaderCallbacks<Cursor> {
ContactsContract.CommonDataKinds.Phone.LABEL,
ContactsContract.CommonDataKinds.Phone.NORMALIZED_NUMBER
)
const val linphoneMime = "vnd.android.cursor.item/vnd.org.linphone.provider.sip_address"
}
override fun onCreateLoader(id: Int, args: Bundle?): Loader<Cursor> {
val mimeType = ContactsContract.Data.MIMETYPE
val mimeSelection = "$mimeType = ? OR $mimeType = ? OR $mimeType = ? OR $mimeType = ?"
val mimeSelection = "$mimeType = ? OR $mimeType = ? OR $mimeType = ?"
val selection = ContactsContract.Data.IN_DEFAULT_DIRECTORY + " == 1 AND ($mimeSelection)"
val selectionArgs = arrayOf(
linphoneMime,
ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE,
ContactsContract.CommonDataKinds.SipAddress.CONTENT_ITEM_TYPE,
ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE
@ -210,7 +207,7 @@ class ContactLoader : LoaderManager.LoaderCallbacks<Cursor> {
}
}
}
linphoneMime, ContactsContract.CommonDataKinds.SipAddress.CONTENT_ITEM_TYPE -> {
ContactsContract.CommonDataKinds.SipAddress.CONTENT_ITEM_TYPE -> {
val sipAddress: String? =
cursor.getString(
cursor.getColumnIndexOrThrow(

View file

@ -59,6 +59,9 @@ class CoreContext(val context: Context) : HandlerThread("Core Thread") {
Log.i("[Context] Call state changed [$state]")
if (state == Call.State.OutgoingProgress) {
showCallActivity()
} else if (state == Call.State.IncomingReceived) {
// TODO FIXME : remove when full screen intent notification
showCallActivity()
}
}
}

View file

@ -39,7 +39,7 @@ import org.linphone.ui.main.contacts.viewmodel.ContactViewModel
import org.linphone.ui.main.fragment.GenericFragment
import org.linphone.utils.DialogUtils
import org.linphone.utils.Event
import org.linphone.utils.slideInToastFromTop
import org.linphone.utils.slideInToastFromTopForDuration
class ContactFragment : GenericFragment() {
private lateinit var binding: ContactFragmentBinding
@ -137,6 +137,6 @@ class ContactFragment : GenericFragment() {
binding.greenToast.icon.setImageResource(R.drawable.check)
val target = binding.greenToast.root
target.slideInToastFromTop(binding.root as ViewGroup, lifecycleScope)
target.slideInToastFromTopForDuration(binding.root as ViewGroup, lifecycleScope)
}
}

View file

@ -25,15 +25,20 @@ import androidx.core.content.ContextCompat
import androidx.core.view.WindowCompat
import androidx.databinding.DataBindingUtil
import androidx.lifecycle.ViewModelProvider
import androidx.navigation.findNavController
import androidx.navigation.fragment.findNavController
import org.linphone.LinphoneApplication
import org.linphone.R
import org.linphone.databinding.VoipActivityBinding
import org.linphone.ui.voip.fragment.ActiveCallFragmentDirections
import org.linphone.ui.voip.fragment.IncomingCallFragmentDirections
import org.linphone.ui.voip.fragment.OutgoingCallFragmentDirections
import org.linphone.ui.voip.viewmodel.CallsViewModel
class VoipActivity : AppCompatActivity() {
private lateinit var binding: VoipActivityBinding
private lateinit var callViewModel: CallsViewModel
private lateinit var callsViewModel: CallsViewModel
override fun onCreate(savedInstanceState: Bundle?) {
WindowCompat.setDecorFitsSystemWindows(window, true)
@ -53,11 +58,39 @@ class VoipActivity : AppCompatActivity() {
binding = DataBindingUtil.setContentView(this, R.layout.voip_activity)
binding.lifecycleOwner = this
callViewModel = run {
callsViewModel = run {
ViewModelProvider(this)[CallsViewModel::class.java]
}
callViewModel.noMoreCallEvent.observe(this) {
callsViewModel.showIncomingCallEvent.observe(this) {
it.consume {
val action = IncomingCallFragmentDirections.actionGlobalIncomingCallFragment()
findNavController(R.id.voip_nav_container).navigate(action)
}
}
callsViewModel.showOutgoingCallEvent.observe(this) {
it.consume {
val action = OutgoingCallFragmentDirections.actionGlobalOutgoingCallFragment()
findNavController(R.id.voip_nav_container).navigate(action)
}
}
callsViewModel.goToActiveCallEvent.observe(this) {
it.consume {
val navController = findNavController(R.id.voip_nav_container)
val action = if (navController.currentDestination?.id == R.id.outgoingCallFragment) {
OutgoingCallFragmentDirections.actionOutgoingCallFragmentToActiveCallFragment()
} else if (navController.currentDestination?.id == R.id.outgoingCallFragment) {
IncomingCallFragmentDirections.actionIncomingCallFragmentToActiveCallFragment()
} else {
ActiveCallFragmentDirections.actionGlobalActiveCallFragment()
}
navController.navigate(action)
}
}
callsViewModel.noMoreCallEvent.observe(this) {
it.consume {
finish()
}

View file

@ -0,0 +1,66 @@
/*
* Copyright (c) 2010-2023 Belledonne Communications SARL.
*
* This file is part of linphone-android
* (see https://www.linphone.org).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.linphone.ui.voip.fragment
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.lifecycle.ViewModelProvider
import org.linphone.R
import org.linphone.databinding.VoipActiveCallFragmentBinding
import org.linphone.ui.main.fragment.GenericFragment
import org.linphone.ui.voip.viewmodel.CallViewModel
class ActiveCallFragment : GenericFragment() {
private lateinit var binding: VoipActiveCallFragmentBinding
private lateinit var callViewModel: CallViewModel
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View {
binding = VoipActiveCallFragmentBinding.inflate(layoutInflater)
return binding.root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
callViewModel = requireActivity().run {
ViewModelProvider(this)[CallViewModel::class.java]
}
binding.lifecycleOwner = viewLifecycleOwner
binding.viewModel = callViewModel
callViewModel.toggleExtraActionMenuVisibilityEvent.observe(viewLifecycleOwner) {
/*it.consume { opened ->
val visibility = if (opened) View.VISIBLE else View.GONE
binding.extraActions.slideInExtraActionsMenu(binding.root as ViewGroup, visibility)
}*/
}
binding.blueToast.icon.setImageResource(R.drawable.trusted)
binding.blueToast.message.text = "This call can be trusted"
}
}

View file

@ -0,0 +1,55 @@
/*
* Copyright (c) 2010-2023 Belledonne Communications SARL.
*
* This file is part of linphone-android
* (see https://www.linphone.org).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.linphone.ui.voip.fragment
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.lifecycle.ViewModelProvider
import org.linphone.databinding.VoipIncomingCallFragmentBinding
import org.linphone.ui.main.fragment.GenericFragment
import org.linphone.ui.voip.viewmodel.CallViewModel
class IncomingCallFragment : GenericFragment() {
private lateinit var binding: VoipIncomingCallFragmentBinding
private lateinit var callViewModel: CallViewModel
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View {
binding = VoipIncomingCallFragmentBinding.inflate(layoutInflater)
return binding.root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
callViewModel = requireActivity().run {
ViewModelProvider(this)[CallViewModel::class.java]
}
binding.lifecycleOwner = viewLifecycleOwner
binding.viewModel = callViewModel
}
}

View file

@ -19,25 +19,60 @@
*/
package org.linphone.ui.voip.viewmodel
import android.animation.ValueAnimator
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import org.linphone.LinphoneApplication.Companion.coreContext
import org.linphone.R
import org.linphone.core.Call
import org.linphone.core.tools.Log
import org.linphone.ui.main.contacts.model.ContactModel
import org.linphone.utils.Event
import org.linphone.utils.LinphoneUtils
class CallViewModel() : ViewModel() {
companion object {
const val TAG = "[Call ViewModel]"
}
val contact = MutableLiveData<ContactModel>()
val displayedName = MutableLiveData<String>()
val displayedAddress = MutableLiveData<String>()
val isVideoEnabled = MutableLiveData<Boolean>()
val isOutgoing = MutableLiveData<Boolean>()
val isActionsMenuExpanded = MutableLiveData<Boolean>()
val extraActionsMenuTranslateY = MutableLiveData<Float>()
private val extraActionsMenuHeight = coreContext.context.resources.getDimension(
R.dimen.in_call_extra_actions_menu_height
)
private val extraButtonsMenuAnimator: ValueAnimator by lazy {
ValueAnimator.ofFloat(
extraActionsMenuHeight,
0f
).apply {
addUpdateListener {
val value = it.animatedValue as Float
extraActionsMenuTranslateY.value = value
}
duration = 500
}
}
val toggleExtraActionMenuVisibilityEvent = MutableLiveData<Event<Boolean>>()
private lateinit var call: Call
init {
isVideoEnabled.value = false
isActionsMenuExpanded.value = false
extraActionsMenuTranslateY.value = extraActionsMenuHeight
coreContext.postOnCoreThread { core ->
val currentCall = core.currentCall ?: core.calls.firstOrNull()
@ -52,6 +87,18 @@ class CallViewModel() : ViewModel() {
isVideoEnabled.postValue(call.params.isVideoEnabled)
}
isOutgoing.postValue(call.dir == Call.Dir.Outgoing)
val address = call.remoteAddress
address.clean()
displayedAddress.postValue(address.asStringUriOnly())
val friend = core.findFriend(address)
if (friend != null) {
displayedName.postValue(friend.name)
contact.postValue(ContactModel(friend))
} else {
displayedName.postValue(LinphoneUtils.getDisplayName(address))
}
} else {
Log.e("$TAG Failed to find outgoing call!")
}
@ -65,4 +112,16 @@ class CallViewModel() : ViewModel() {
call.terminate()
}
}
fun toggleExpandActionsMenu() {
// UI thread
isActionsMenuExpanded.value = isActionsMenuExpanded.value == false
if (isActionsMenuExpanded.value == true) {
extraButtonsMenuAnimator.start()
} else {
extraButtonsMenuAnimator.reverse()
}
// toggleExtraActionMenuVisibilityEvent.value = Event(isActionsMenuExpanded.value == true)
}
}

View file

@ -22,15 +22,20 @@ package org.linphone.ui.voip.viewmodel
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import org.linphone.LinphoneApplication.Companion.coreContext
import org.linphone.core.Call
import org.linphone.core.Core
import org.linphone.core.CoreListenerStub
import org.linphone.core.tools.Log
import org.linphone.utils.Event
class CallsViewModel : ViewModel() {
val noMoreCallEvent: MutableLiveData<Event<Boolean>> by lazy {
MutableLiveData<Event<Boolean>>()
}
val goToActiveCallEvent = MutableLiveData<Event<Boolean>>()
val showIncomingCallEvent = MutableLiveData<Event<Boolean>>()
val showOutgoingCallEvent = MutableLiveData<Event<Boolean>>()
val noMoreCallEvent = MutableLiveData<Event<Boolean>>()
private val coreListener = object : CoreListenerStub() {
override fun onLastCallEnded(core: Core) {
@ -38,11 +43,49 @@ class CallsViewModel : ViewModel() {
Log.i("[Calls ViewModel] No more call, leaving VoIP activity")
noMoreCallEvent.postValue(Event(true))
}
override fun onCallStateChanged(
core: Core,
call: Call,
state: Call.State,
message: String
) {
// Core thread
if (call == core.currentCall || core.currentCall == null) {
when (call.state) {
Call.State.Connected -> {
goToActiveCallEvent.postValue(Event(true))
}
else -> {
}
}
}
}
}
init {
coreContext.postOnCoreThread { core ->
core.addListener(coreListener)
if (core.callsNb > 0) {
val currentCall = core.currentCall ?: core.calls.first()
when (currentCall.state) {
Call.State.Connected, Call.State.StreamsRunning, Call.State.Paused, Call.State.Pausing, Call.State.PausedByRemote, Call.State.UpdatedByRemote, Call.State.Updating -> {
goToActiveCallEvent.postValue(Event(true))
}
Call.State.OutgoingInit, Call.State.OutgoingRinging, Call.State.OutgoingProgress, Call.State.OutgoingEarlyMedia -> {
showOutgoingCallEvent.postValue(Event(true))
}
Call.State.IncomingReceived, Call.State.IncomingEarlyMedia -> {
showIncomingCallEvent.postValue(Event(true))
}
else -> {
}
}
} else {
noMoreCallEvent.postValue(Event(true))
}
}
}

View file

@ -31,7 +31,7 @@ import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
fun View.slideInToastFromTop(
fun View.slideInToastFromTopForDuration(
root: ViewGroup,
lifecycleScope: LifecycleCoroutineScope,
duration: Long = 5000
@ -55,3 +55,15 @@ fun View.slideInToastFromTop(
}
}
}
fun View.slideInExtraActionsMenu(
root: ViewGroup,
visibility: Int
) {
val transition: Transition = Slide(Gravity.BOTTOM)
transition.duration = 600
transition.addTarget(this)
TransitionManager.beginDelayedTransition(root, transition)
this.translationY = 0f
}

View file

@ -0,0 +1,13 @@
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="vector"
android:width="28dp"
android:height="28dp"
android:viewportWidth="28"
android:viewportHeight="28">
<path
android:name="path"
android:pathData="M 12.833 3.5 L 24.5 3.5 L 24.5 5.833 L 12.833 5.833 L 12.833 3.5 Z M 12.833 7 L 24.5 7 L 24.5 9.333 L 12.833 9.333 L 12.833 7 Z M 23.333 18.083 C 21.875 18.083 20.475 17.85 19.168 17.418 C 19.052 17.383 18.923 17.36 18.807 17.36 C 18.503 17.36 18.212 17.477 17.978 17.698 L 15.412 20.265 C 12.11 18.585 9.403 15.89 7.723 12.588 L 10.29 10.01 C 10.617 9.695 10.71 9.24 10.582 8.832 C 10.15 7.525 9.917 6.125 9.917 4.667 C 9.917 4.025 9.392 3.5 8.75 3.5 L 4.667 3.5 C 4.025 3.5 3.5 4.025 3.5 4.667 C 3.5 15.622 12.378 24.5 23.333 24.5 C 23.975 24.5 24.5 23.975 24.5 23.333 L 24.5 19.25 C 24.5 18.608 23.975 18.083 23.333 18.083 Z M 5.868 5.833 L 7.618 5.833 C 7.7 6.86 7.875 7.875 8.155 8.855 L 6.755 10.267 C 6.277 8.855 5.973 7.373 5.868 5.833 Z M 22.167 22.132 C 20.627 22.027 19.133 21.723 17.733 21.245 L 19.133 19.845 C 20.125 20.125 21.14 20.3 22.167 20.37 L 22.167 22.132 Z M 12.833 10.5 L 24.5 10.5 L 24.5 12.833 L 12.833 12.833 L 12.833 10.5 Z"
android:fillColor="#c0d1d9"
android:strokeWidth="1"/>
</vector>

View file

@ -0,0 +1,13 @@
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="vector"
android:width="28dp"
android:height="28dp"
android:viewportWidth="28"
android:viewportHeight="28">
<path
android:name="path"
android:pathData="M 14 22.167 C 12.717 22.167 11.667 23.217 11.667 24.5 C 11.667 25.784 12.717 26.834 14 26.834 C 15.283 26.834 16.333 25.784 16.333 24.5 C 16.333 23.217 15.283 22.167 14 22.167 Z M 7 1.167 C 5.717 1.167 4.667 2.217 4.667 3.5 C 4.667 4.784 5.717 5.834 7 5.834 C 8.283 5.834 9.333 4.784 9.333 3.5 C 9.333 2.217 8.283 1.167 7 1.167 Z M 7 8.167 C 5.717 8.167 4.667 9.217 4.667 10.5 C 4.667 11.784 5.717 12.834 7 12.834 C 8.283 12.834 9.333 11.784 9.333 10.5 C 9.333 9.217 8.283 8.167 7 8.167 Z M 7 15.167 C 5.717 15.167 4.667 16.217 4.667 17.5 C 4.667 18.784 5.717 19.834 7 19.834 C 8.283 19.834 9.333 18.784 9.333 17.5 C 9.333 16.217 8.283 15.167 7 15.167 Z M 21 5.834 C 22.283 5.834 23.333 4.784 23.333 3.5 C 23.333 2.217 22.283 1.167 21 1.167 C 19.717 1.167 18.667 2.217 18.667 3.5 C 18.667 4.784 19.717 5.834 21 5.834 Z M 14 15.167 C 12.717 15.167 11.667 16.217 11.667 17.5 C 11.667 18.784 12.717 19.834 14 19.834 C 15.283 19.834 16.333 18.784 16.333 17.5 C 16.333 16.217 15.283 15.167 14 15.167 Z M 21 15.167 C 19.717 15.167 18.667 16.217 18.667 17.5 C 18.667 18.784 19.717 19.834 21 19.834 C 22.283 19.834 23.333 18.784 23.333 17.5 C 23.333 16.217 22.283 15.167 21 15.167 Z M 21 8.167 C 19.717 8.167 18.667 9.217 18.667 10.5 C 18.667 11.784 19.717 12.834 21 12.834 C 22.283 12.834 23.333 11.784 23.333 10.5 C 23.333 9.217 22.283 8.167 21 8.167 Z M 14 8.167 C 12.717 8.167 11.667 9.217 11.667 10.5 C 11.667 11.784 12.717 12.834 14 12.834 C 15.283 12.834 16.333 11.784 16.333 10.5 C 16.333 9.217 15.283 8.167 14 8.167 Z M 14 1.167 C 12.717 1.167 11.667 2.217 11.667 3.5 C 11.667 4.784 12.717 5.834 14 5.834 C 15.283 5.834 16.333 4.784 16.333 3.5 C 16.333 2.217 15.283 1.167 14 1.167 Z"
android:fillColor="#c0d1d9"
android:strokeWidth="1"/>
</vector>

View file

@ -0,0 +1,13 @@
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="vector"
android:width="28dp"
android:height="28dp"
android:viewportWidth="28"
android:viewportHeight="28">
<path
android:name="path_1"
android:pathData="M 23.333 18.025 C 21.875 18.025 20.475 17.791 19.168 17.36 C 19.052 17.325 18.923 17.301 18.807 17.301 C 18.503 17.301 18.212 17.418 17.978 17.64 L 15.412 20.206 C 12.11 18.526 9.403 15.831 7.723 12.518 L 10.29 9.94 C 10.617 9.636 10.71 9.181 10.582 8.773 C 10.15 7.466 9.917 6.066 9.917 4.608 C 9.917 3.966 9.392 3.441 8.75 3.441 L 4.667 3.441 C 4.025 3.441 3.5 3.966 3.5 4.608 C 3.5 15.563 12.378 24.441 23.333 24.441 C 23.975 24.441 24.5 23.916 24.5 23.275 L 24.5 19.191 C 24.5 18.55 23.975 18.025 23.333 18.025 Z M 5.868 5.775 L 7.618 5.775 C 7.7 6.801 7.875 7.816 8.143 8.785 L 6.743 10.196 C 6.277 8.785 5.973 7.315 5.868 5.775 Z M 22.167 22.073 C 20.627 21.968 19.133 21.665 17.733 21.186 L 19.133 19.786 C 20.125 20.066 21.14 20.241 22.167 20.311 L 22.167 22.073 Z M 21 6.941 L 21 3.441 L 18.667 3.441 L 18.667 6.941 L 15.167 6.941 L 15.167 9.275 L 18.667 9.275 L 18.667 12.775 L 21 12.775 L 21 9.275 L 24.5 9.275 L 24.5 6.941 L 21 6.941 Z"
android:fillColor="#c0d1d9"
android:strokeWidth="1"/>
</vector>

View file

@ -0,0 +1,13 @@
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="vector"
android:width="28dp"
android:height="28dp"
android:viewportWidth="28"
android:viewportHeight="28">
<path
android:name="path_1"
android:pathData="M 14 22.167 C 12.717 22.167 11.667 23.217 11.667 24.5 C 11.667 25.784 12.717 26.834 14 26.834 C 15.283 26.834 16.333 25.784 16.333 24.5 C 16.333 23.217 15.283 22.167 14 22.167 Z M 7 1.167 C 5.717 1.167 4.667 2.217 4.667 3.5 C 4.667 4.784 5.717 5.834 7 5.834 C 8.283 5.834 9.333 4.784 9.333 3.5 C 9.333 2.217 8.283 1.167 7 1.167 Z M 7 8.167 C 5.717 8.167 4.667 9.217 4.667 10.5 C 4.667 11.784 5.717 12.834 7 12.834 C 8.283 12.834 9.333 11.784 9.333 10.5 C 9.333 9.217 8.283 8.167 7 8.167 Z M 7 15.167 C 5.717 15.167 4.667 16.217 4.667 17.5 C 4.667 18.784 5.717 19.834 7 19.834 C 8.283 19.834 9.333 18.784 9.333 17.5 C 9.333 16.217 8.283 15.167 7 15.167 Z M 21 5.834 C 22.283 5.834 23.333 4.784 23.333 3.5 C 23.333 2.217 22.283 1.167 21 1.167 C 19.717 1.167 18.667 2.217 18.667 3.5 C 18.667 4.784 19.717 5.834 21 5.834 Z M 14 15.167 C 12.717 15.167 11.667 16.217 11.667 17.5 C 11.667 18.784 12.717 19.834 14 19.834 C 15.283 19.834 16.333 18.784 16.333 17.5 C 16.333 16.217 15.283 15.167 14 15.167 Z M 21 15.167 C 19.717 15.167 18.667 16.217 18.667 17.5 C 18.667 18.784 19.717 19.834 21 19.834 C 22.283 19.834 23.333 18.784 23.333 17.5 C 23.333 16.217 22.283 15.167 21 15.167 Z M 21 8.167 C 19.717 8.167 18.667 9.217 18.667 10.5 C 18.667 11.784 19.717 12.834 21 12.834 C 22.283 12.834 23.333 11.784 23.333 10.5 C 23.333 9.217 22.283 8.167 21 8.167 Z M 14 8.167 C 12.717 8.167 11.667 9.217 11.667 10.5 C 11.667 11.784 12.717 12.834 14 12.834 C 15.283 12.834 16.333 11.784 16.333 10.5 C 16.333 9.217 15.283 8.167 14 8.167 Z M 14 1.167 C 12.717 1.167 11.667 2.217 11.667 3.5 C 11.667 4.784 12.717 5.834 14 5.834 C 15.283 5.834 16.333 4.784 16.333 3.5 C 16.333 2.217 15.283 1.167 14 1.167 Z"
android:fillColor="#c0d1d9"
android:strokeWidth="1"/>
</vector>

View file

@ -0,0 +1,13 @@
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="vector"
android:width="28dp"
android:height="28dp"
android:viewportWidth="28"
android:viewportHeight="28">
<path
android:name="path"
android:pathData="M 7.63 5.833 C 7.7 6.86 7.875 7.875 8.143 8.843 L 6.743 10.255 C 6.277 8.843 5.973 7.373 5.868 5.833 L 7.63 5.833 Z M 19.133 19.845 C 20.125 20.125 21.14 20.3 22.167 20.37 L 22.167 22.12 C 20.627 22.015 19.133 21.712 17.733 21.233 L 19.133 19.845 Z M 8.75 3.5 L 4.667 3.5 C 4.025 3.5 3.5 4.025 3.5 4.667 C 3.5 15.622 12.378 24.5 23.333 24.5 C 23.975 24.5 24.5 23.975 24.5 23.333 L 24.5 19.25 C 24.5 18.608 23.975 18.083 23.333 18.083 C 21.875 18.083 20.475 17.85 19.168 17.418 C 19.052 17.383 18.923 17.36 18.807 17.36 C 18.503 17.36 18.212 17.477 17.978 17.698 L 15.412 20.265 C 12.11 18.585 9.403 15.89 7.723 12.577 L 10.29 9.998 C 10.617 9.695 10.71 9.24 10.582 8.832 C 10.15 7.525 9.917 6.125 9.917 4.667 C 9.917 4.025 9.392 3.5 8.75 3.5 Z M 17.5 3.5 L 19.833 3.5 L 19.833 11.667 L 17.5 11.667 L 17.5 3.5 Z M 22.167 3.5 L 24.5 3.5 L 24.5 11.667 L 22.167 11.667 L 22.167 3.5 Z"
android:fillColor="#c0d1d9"
android:strokeWidth="1"/>
</vector>

View file

@ -0,0 +1,20 @@
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="vector"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<group android:name="group">
<path
android:name="path_1"
android:pathData="M 12 0.333 C 5.56 0.333 0.333 5.56 0.333 12 C 0.333 18.44 5.56 23.666 12 23.666 C 18.44 23.666 23.667 18.44 23.667 12 C 23.667 5.56 18.44 0.333 12 0.333 Z M 12 21.333 C 6.843 21.333 2.667 17.156 2.667 12 C 2.667 6.843 6.843 2.666 12 2.666 C 17.157 2.666 21.333 6.843 21.333 12 C 21.333 17.156 17.157 21.333 12 21.333 Z"
android:fillColor="#000"
android:strokeWidth="1"/>
<path
android:name="path_2"
android:pathData="M 12 17.833 C 15.222 17.833 17.833 15.221 17.833 11.999 C 17.833 8.778 15.222 6.166 12 6.166 C 8.778 6.166 6.167 8.778 6.167 11.999 C 6.167 15.221 8.778 17.833 12 17.833 Z"
android:fillColor="#000"
android:strokeWidth="1"/>
</group>
</vector>

View file

@ -0,0 +1,13 @@
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="vector"
android:width="28dp"
android:height="28dp"
android:viewportWidth="28"
android:viewportHeight="28">
<path
android:name="path"
android:pathData="M 20.3 18.05 C 19.175 18.05 18.095 17.87 17.087 17.537 C 16.997 17.51 16.898 17.492 16.808 17.492 C 16.574 17.492 16.349 17.582 16.169 17.753 L 14.189 19.733 C 11.642 18.437 9.554 16.358 8.258 13.802 L 10.238 11.813 C 10.49 11.579 10.562 11.228 10.463 10.913 C 10.13 9.905 9.95 8.825 9.95 7.7 C 9.95 7.205 9.545 6.8 9.05 6.8 L 5.9 6.8 C 5.405 6.8 5 7.205 5 7.7 C 5 16.151 11.849 23 20.3 23 C 20.795 23 21.2 22.595 21.2 22.1 L 21.2 18.95 C 21.2 18.455 20.795 18.05 20.3 18.05 Z M 6.827 8.6 L 8.177 8.6 C 8.24 9.392 8.375 10.175 8.582 10.922 L 7.502 12.011 C 7.142 10.922 6.908 9.788 6.827 8.6 Z M 19.4 21.173 C 18.212 21.092 17.06 20.858 15.98 20.489 L 17.06 19.409 C 17.825 19.625 18.608 19.76 19.4 19.814 L 19.4 21.173 Z M 18.5 14 L 23 9.5 L 18.5 5 L 18.5 7.7 L 14.9 7.7 L 14.9 11.3 L 18.5 11.3 L 18.5 14 Z"
android:fillColor="#c0d1d9"
android:strokeWidth="1"/>
</vector>

View file

@ -63,7 +63,7 @@
android:layout_marginStart="8dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="@{message, default=`Call is completely secured`}"
android:text="@{message, default=`This call can be trusted`}"
android:textSize="14sp"
android:textColor="@color/trusted_blue"
app:layout_constraintBottom_toBottomOf="parent"

View file

@ -39,6 +39,31 @@
app:layout_constraintStart_toEndOf="@id/call_direction_icon"
app:layout_constraintTop_toTopOf="parent"/>
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style_800"
android:id="@+id/separator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:textColor="@color/white"
android:textSize="16sp"
android:text="@string/vertical_separator"
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/default_text_style_800"
android:id="@+id/chronometer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:textColor="@color/white"
android:textSize="16sp"
app:layout_constraintStart_toEndOf="@id/separator"
app:layout_constraintTop_toTopOf="@id/call_direction_label"
app:layout_constraintBottom_toBottomOf="@id/call_direction_label"/>
<ImageView
android:id="@+id/switch_camera"
android:layout_width="24dp"
@ -60,18 +85,21 @@
android:layout_marginTop="17dp"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:layout_marginBottom="@dimen/in_call_main_actions_menu_height"
app:layout_constraintTop_toBottomOf="@id/call_direction_label"
app:layout_constraintBottom_toTopOf="@id/bottom_bar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<include
android:id="@+id/blue_toast"
layout="@layout/toast_blue"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
app:layout_constraintWidth_max="@dimen/toast_max_width"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/background"/>
@ -81,7 +109,7 @@
android:layout_width="@dimen/avatar_in_call_size"
android:layout_height="@dimen/avatar_in_call_size"
app:avatarViewBorderWidth="0dp"
app:avatarViewInitials="SB"
contactAvatar="@{viewModel.contact}"
app:avatarViewInitialsBackgroundColor="@color/blue_outgoing_message"
app:avatarViewInitialsTextColor="@color/gray_9"
app:avatarViewInitialsTextSize="36sp"
@ -99,7 +127,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:text="Sylvain Berfini"
android:text="@{viewModel.displayedName, default=`John Doe`}"
android:textColor="@color/white"
android:textSize="22sp"
app:layout_constraintTop_toBottomOf="@id/avatar"
@ -111,7 +139,7 @@
android:id="@+id/address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="sip:sberfini@sip.linphone.org"
android:text="@{viewModel.displayedAddress, default=`sip:johndoe@sip.linphone.org`}"
android:textColor="@color/white"
android:textSize="14sp"
app:layout_constraintTop_toBottomOf="@id/name"
@ -119,11 +147,12 @@
app:layout_constraintEnd_toEndOf="parent" />
<include
bind:viewModel="@{viewModel}"
android:id="@+id/bottom_bar"
layout="@layout/voip_call_bottom_bar"
layout="@layout/voip_call_extra_actions"
bind:viewModel="@{viewModel}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="@dimen/in_call_all_actions_menu_height"
android:translationY="@{viewModel.extraActionsMenuTranslateY}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>

View file

@ -0,0 +1,201 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:bind="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<import type="android.view.View" />
<variable
name="viewModel"
type="org.linphone.ui.voip.viewmodel.CallViewModel" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/in_call_all_actions_menu_height"
android:background="@color/in_call_black">
<include
android:id="@+id/main_actions"
layout="@layout/voip_call_main_actions"
android:layout_width="0dp"
android:layout_height="@dimen/in_call_main_actions_menu_height"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
bind:showExpandToggle="@{true}"
bind:viewModel="@{viewModel}" />
<ImageView
android:id="@+id/transfer"
android:layout_width="0dp"
android:layout_height="56dp"
android:layout_marginTop="30dp"
android:padding="10dp"
android:background="@drawable/in_call_button_background"
android:src="@drawable/transfer"
app:tint="@color/white"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintStart_toStartOf="@id/transfer_label"
app:layout_constraintEnd_toEndOf="@id/transfer_label"
app:layout_constraintTop_toBottomOf="@id/main_actions" />
<ImageView
android:id="@+id/new_call"
android:layout_width="0dp"
android:layout_height="56dp"
android:layout_marginTop="30dp"
android:padding="13dp"
android:background="@drawable/in_call_button_background"
android:src="@drawable/new_call"
app:tint="@color/white"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintStart_toStartOf="@id/new_call_label"
app:layout_constraintEnd_toEndOf="@id/new_call_label"
app:layout_constraintTop_toBottomOf="@id/main_actions" />
<ImageView
android:id="@+id/calls_list"
android:layout_width="0dp"
android:layout_height="56dp"
android:layout_marginTop="30dp"
android:padding="13dp"
android:background="@drawable/in_call_button_background"
android:src="@drawable/calls_list"
app:tint="@color/white"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintStart_toStartOf="@id/calls_list_label"
app:layout_constraintEnd_toEndOf="@id/calls_list_label"
app:layout_constraintTop_toBottomOf="@id/main_actions" />
<ImageView
android:id="@+id/dialer"
android:layout_width="0dp"
android:layout_height="56dp"
android:layout_marginTop="30dp"
android:padding="13dp"
android:background="@drawable/in_call_button_background"
android:src="@drawable/dialer"
app:tint="@color/white"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintStart_toStartOf="@id/dialer_label"
app:layout_constraintEnd_toEndOf="@id/dialer_label"
app:layout_constraintTop_toBottomOf="@id/main_actions" />
<ImageView
android:id="@+id/chat"
android:layout_width="0dp"
android:layout_height="56dp"
android:layout_marginTop="30dp"
android:padding="13dp"
android:background="@drawable/in_call_button_background"
android:src="@drawable/chat"
app:tint="@color/white"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintTop_toBottomOf="@id/transfer_label"
app:layout_constraintStart_toStartOf="@id/transfer"
app:layout_constraintEnd_toEndOf="@id/transfer"/>
<ImageView
android:id="@+id/pause_call"
android:layout_width="0dp"
android:layout_height="56dp"
android:layout_marginTop="30dp"
android:padding="13dp"
android:background="@drawable/in_call_button_background"
android:src="@drawable/pause_call"
app:tint="@color/white"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintTop_toBottomOf="@id/new_call_label"
app:layout_constraintStart_toStartOf="@id/new_call"
app:layout_constraintEnd_toEndOf="@id/new_call"/>
<ImageView
android:id="@+id/record_call"
android:layout_width="0dp"
android:layout_height="56dp"
android:layout_marginTop="30dp"
android:padding="13dp"
android:background="@drawable/in_call_button_background"
android:src="@drawable/record_call"
app:tint="@color/white"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintTop_toBottomOf="@id/calls_list_label"
app:layout_constraintStart_toStartOf="@id/calls_list"
app:layout_constraintEnd_toEndOf="@id/calls_list" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/transfer_label"
style="@style/in_call_extra_action_label_style"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Transfer"
app:layout_constraintTop_toBottomOf="@id/transfer"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/new_call_label"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/new_call_label"
style="@style/in_call_extra_action_label_style"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="New call"
app:layout_constraintTop_toBottomOf="@id/new_call"
app:layout_constraintStart_toEndOf="@id/transfer_label"
app:layout_constraintEnd_toStartOf="@id/calls_list_label" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/calls_list_label"
style="@style/in_call_extra_action_label_style"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Call list"
app:layout_constraintTop_toBottomOf="@id/calls_list"
app:layout_constraintStart_toEndOf="@id/new_call_label"
app:layout_constraintEnd_toStartOf="@id/dialer_label" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/dialer_label"
style="@style/in_call_extra_action_label_style"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Dialer"
app:layout_constraintTop_toBottomOf="@id/dialer"
app:layout_constraintStart_toEndOf="@id/calls_list_label"
app:layout_constraintEnd_toEndOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/chat_label"
style="@style/in_call_extra_action_label_style"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingBottom="15dp"
android:text="Messages"
app:layout_constraintTop_toBottomOf="@id/chat"
app:layout_constraintStart_toStartOf="@id/transfer_label"
app:layout_constraintEnd_toEndOf="@id/transfer_label" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/pause_call_label"
style="@style/in_call_extra_action_label_style"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingBottom="15dp"
android:text="Pause call"
app:layout_constraintTop_toBottomOf="@id/pause_call"
app:layout_constraintStart_toStartOf="@id/new_call_label"
app:layout_constraintEnd_toEndOf="@id/new_call_label" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/record_call_label"
style="@style/in_call_extra_action_label_style"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingBottom="15dp"
android:text="Record"
app:layout_constraintTop_toBottomOf="@id/record_call"
app:layout_constraintStart_toStartOf="@id/calls_list_label"
app:layout_constraintEnd_toEndOf="@id/calls_list_label" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View file

@ -8,15 +8,30 @@
<variable
name="viewModel"
type="org.linphone.ui.voip.viewmodel.CallViewModel" />
<variable
name="showExpandToggle"
type="Boolean" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="20dp"
android:paddingBottom="20dp"
android:layout_height="@dimen/in_call_main_actions_menu_height"
android:paddingBottom="15dp"
android:background="@color/in_call_black">
<ImageView
android:onClick="@{() -> viewModel.toggleExpandActionsMenu()}"
android:visibility="@{showExpandToggle ? View.VISIBLE : View.INVISIBLE}"
android:id="@+id/toggle_expand"
android:layout_width="0dp"
android:layout_height="24dp"
android:layout_marginBottom="15dp"
android:src="@{viewModel.isActionsMenuExpanded ? @drawable/expand : @drawable/collapse, default=@drawable/collapse}"
app:tint="@color/white"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@id/hang_up" />
<ImageView
android:onClick="@{() -> viewModel.hangUp()}"
android:id="@+id/hang_up"

View file

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<import type="android.view.View" />
<variable
name="viewModel"
type="org.linphone.ui.voip.viewmodel.CallViewModel" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:background="@color/in_call_black">
<ImageView
android:onClick="@{() -> viewModel.hangUp()}"
android:id="@+id/hang_up"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:paddingStart="30dp"
android:paddingEnd="30dp"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:src="@drawable/hang_up"
android:background="@drawable/shape_hang_up_button_background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View file

@ -57,7 +57,7 @@
android:layout_width="@dimen/avatar_in_call_size"
android:layout_height="@dimen/avatar_in_call_size"
app:avatarViewBorderWidth="0dp"
app:avatarViewInitials="SB"
contactAvatar="@{viewModel.contact}"
app:avatarViewInitialsBackgroundColor="@color/blue_outgoing_message"
app:avatarViewInitialsTextColor="@color/gray_9"
app:avatarViewInitialsTextSize="36sp"
@ -97,7 +97,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:text="Sylvain Berfini"
android:text="@{viewModel.displayedName, default=`John Doe`}"
android:textColor="@color/white"
android:textSize="22sp"
app:layout_constraintTop_toBottomOf="@id/avatar"
@ -109,7 +109,7 @@
android:id="@+id/address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="sip:sberfini@sip.linphone.org"
android:text="@{viewModel.displayedAddress, default=`sip:johndoe@sip.linphone.org`}"
android:textColor="@color/white"
android:textSize="14sp"
app:layout_constraintTop_toBottomOf="@id/name"
@ -119,7 +119,7 @@
<include
bind:viewModel="@{viewModel}"
android:id="@+id/bottom_bar"
layout="@layout/voip_call_bottom_bar"
layout="@layout/voip_incoming_call_bottom_bar"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"

View file

@ -70,7 +70,7 @@
android:layout_width="@dimen/avatar_in_call_size"
android:layout_height="@dimen/avatar_in_call_size"
app:avatarViewBorderWidth="0dp"
app:avatarViewInitials="SB"
contactAvatar="@{viewModel.contact}"
app:avatarViewInitialsBackgroundColor="@color/blue_outgoing_message"
app:avatarViewInitialsTextColor="@color/gray_9"
app:avatarViewInitialsTextSize="36sp"
@ -110,7 +110,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:text="Sylvain Berfini"
android:text="@{viewModel.displayedName, default=`John Doe`}"
android:textColor="@color/white"
android:textSize="22sp"
app:layout_constraintTop_toBottomOf="@id/avatar"
@ -122,7 +122,7 @@
android:id="@+id/address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="sip:sberfini@sip.linphone.org"
android:text="@{viewModel.displayedAddress, default=`sip:johndoe@sip.linphone.org`}"
android:textColor="@color/white"
android:textSize="14sp"
app:layout_constraintTop_toBottomOf="@id/name"
@ -131,10 +131,11 @@
<include
bind:viewModel="@{viewModel}"
bind:showExpandToggle="@{false}"
android:id="@+id/bottom_bar"
layout="@layout/voip_call_bottom_bar"
layout="@layout/voip_call_main_actions"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="@dimen/in_call_main_actions_menu_height"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>

View file

@ -9,6 +9,50 @@
android:id="@+id/outgoingCallFragment"
android:name="org.linphone.ui.voip.fragment.OutgoingCallFragment"
android:label="OutgoingCallFragment"
tools:layout="@layout/voip_outgoing_call_fragment"/>
tools:layout="@layout/voip_outgoing_call_fragment">
<action
android:id="@+id/action_outgoingCallFragment_to_activeCallFragment"
app:destination="@id/activeCallFragment"
app:popUpTo="@id/outgoingCallFragment"
app:popUpToInclusive="true"
app:launchSingleTop="true"/>
</fragment>
<action android:id="@+id/action_global_outgoingCallFragment"
app:destination="@id/outgoingCallFragment"
app:popUpTo="@id/outgoingCallFragment"
app:popUpToInclusive="true"
app:launchSingleTop="true" />
<fragment
android:id="@+id/incomingCallFragment"
android:name="org.linphone.ui.voip.fragment.IncomingCallFragment"
android:label="IncomingCallFragment"
tools:layout="@layout/voip_incoming_call_fragment">
<action
android:id="@+id/action_incomingCallFragment_to_activeCallFragment"
app:destination="@id/activeCallFragment"
app:popUpTo="@id/incomingCallFragment"
app:popUpToInclusive="true"
app:launchSingleTop="true" />
</fragment>
<action android:id="@+id/action_global_incomingCallFragment"
app:destination="@id/incomingCallFragment"
app:popUpTo="@id/outgoingCallFragment"
app:popUpToInclusive="true"
app:launchSingleTop="true"/>
<fragment
android:id="@+id/activeCallFragment"
android:name="org.linphone.ui.voip.fragment.ActiveCallFragment"
android:label="ActiveCallFragment"
tools:layout="@layout/voip_active_call_fragment"/>
<action android:id="@+id/action_global_activeCallFragment"
app:destination="@id/activeCallFragment"
app:popUpTo="@id/activeCallFragment"
app:popUpToInclusive="true"
app:launchSingleTop="true"/>
</navigation>

View file

@ -10,4 +10,10 @@
<dimen name="avatar_favorite_list_cell_size">50dp</dimen>
<dimen name="avatar_big_size">100dp</dimen>
<dimen name="avatar_in_call_size">120dp</dimen>
<dimen name="in_call_main_actions_menu_height">116dp</dimen>
<dimen name="in_call_extra_actions_menu_height">237dp</dimen>
<dimen name="in_call_all_actions_menu_height">353dp</dimen> <!-- sum of above two -->
<dimen name="toast_max_width">360dp</dimen>
</resources>

View file

@ -1,3 +1,5 @@
<resources>
<string name="app_name">Linphone</string>
<string name="vertical_separator">|</string>
</resources>

View file

@ -46,4 +46,12 @@
<item name="android:drawableTint">@color/red_danger</item>
<item name="android:drawablePadding">8dp</item>
</style>
<style name="in_call_extra_action_label_style">
<item name="android:fontFamily">@font/noto_sans</item>
<item name="android:textSize">14sp</item>
<item name="android:textColor">@color/white</item>
<item name="android:gravity">center</item>
<item name="maxLines">1</item>
<item name="android:ellipsize">end</item>
</style>
</resources>