mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-18 03:48:08 +00:00
Split login step to allow detecting if using digest or SSO authentication
This commit is contained in:
parent
935d134bbd
commit
bfd5a8f6fa
10 changed files with 594 additions and 307 deletions
|
|
@ -0,0 +1,190 @@
|
|||
/*
|
||||
* 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.assistant.fragment
|
||||
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.annotation.UiThread
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import androidx.navigation.navGraphViewModels
|
||||
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||
import org.linphone.LinphoneApplication.Companion.corePreferences
|
||||
import org.linphone.R
|
||||
import org.linphone.core.tools.Log
|
||||
import org.linphone.databinding.AssistantLandingFragmentBinding
|
||||
import org.linphone.ui.assistant.model.AcceptConditionsAndPolicyDialogModel
|
||||
import org.linphone.ui.assistant.viewmodel.LandingViewModel
|
||||
import org.linphone.ui.sso.OpenIdActivity
|
||||
import org.linphone.utils.DialogUtils
|
||||
|
||||
@UiThread
|
||||
class LandingFragment : Fragment() {
|
||||
companion object {
|
||||
private const val TAG = "[Landing Fragment]"
|
||||
}
|
||||
|
||||
private lateinit var binding: AssistantLandingFragmentBinding
|
||||
|
||||
private val viewModel: LandingViewModel by navGraphViewModels(
|
||||
R.id.assistant_nav_graph
|
||||
)
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
binding = AssistantLandingFragmentBinding.inflate(layoutInflater)
|
||||
return binding.root
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
binding.lifecycleOwner = viewLifecycleOwner
|
||||
binding.viewModel = viewModel
|
||||
|
||||
binding.setBackClickListener {
|
||||
requireActivity().finish()
|
||||
}
|
||||
|
||||
binding.setRegisterClickListener {
|
||||
if (viewModel.conditionsAndPrivacyPolicyAccepted) {
|
||||
goToRegisterFragment()
|
||||
} else {
|
||||
showAcceptConditionsAndPrivacyDialog(goToAccountCreate = true)
|
||||
}
|
||||
}
|
||||
|
||||
binding.setQrCodeClickListener {
|
||||
val action = LandingFragmentDirections.actionLandingFragmentToQrCodeScannerFragment()
|
||||
findNavController().navigate(action)
|
||||
}
|
||||
|
||||
binding.setThirdPartySipAccountLoginClickListener {
|
||||
if (viewModel.conditionsAndPrivacyPolicyAccepted) {
|
||||
goToLoginThirdPartySipAccountFragment()
|
||||
} else {
|
||||
showAcceptConditionsAndPrivacyDialog(goToThirdPartySipAccountLogin = true)
|
||||
}
|
||||
}
|
||||
|
||||
viewModel.redirectToDigestAuthEvent.observe(viewLifecycleOwner) {
|
||||
it.consume {
|
||||
goToLoginFragment()
|
||||
}
|
||||
}
|
||||
|
||||
viewModel.redirectToSingleSignOnEvent.observe(viewLifecycleOwner) {
|
||||
it.consume {
|
||||
goToSingleSignOnActivity()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun goToLoginFragment() {
|
||||
val identity = viewModel.sipIdentity.value.orEmpty()
|
||||
val action = LandingFragmentDirections.actionLandingFragmentToLoginFragment(identity)
|
||||
findNavController().navigate(action)
|
||||
}
|
||||
|
||||
private fun goToSingleSignOnActivity() {
|
||||
startActivity(Intent(requireContext(), OpenIdActivity::class.java))
|
||||
requireActivity().finish()
|
||||
}
|
||||
|
||||
private fun goToRegisterFragment() {
|
||||
val action = LandingFragmentDirections.actionLandingFragmentToRegisterFragment()
|
||||
findNavController().navigate(action)
|
||||
}
|
||||
|
||||
private fun goToLoginThirdPartySipAccountFragment() {
|
||||
val action = LandingFragmentDirections.actionLandingFragmentToThirdPartySipAccountWarningFragment()
|
||||
findNavController().navigate(action)
|
||||
}
|
||||
|
||||
private fun showAcceptConditionsAndPrivacyDialog(
|
||||
goToAccountCreate: Boolean = false,
|
||||
goToThirdPartySipAccountLogin: Boolean = false
|
||||
) {
|
||||
val model = AcceptConditionsAndPolicyDialogModel()
|
||||
val dialog = DialogUtils.getAcceptConditionsAndPrivacyDialog(
|
||||
requireActivity(),
|
||||
model
|
||||
)
|
||||
|
||||
model.dismissEvent.observe(viewLifecycleOwner) {
|
||||
it.consume {
|
||||
dialog.dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
model.conditionsAcceptedEvent.observe(viewLifecycleOwner) {
|
||||
it.consume {
|
||||
Log.i("$TAG Conditions & Privacy policy have been accepted")
|
||||
coreContext.postOnCoreThread {
|
||||
corePreferences.conditionsAndPrivacyPolicyAccepted = true
|
||||
}
|
||||
dialog.dismiss()
|
||||
|
||||
if (goToAccountCreate) {
|
||||
goToRegisterFragment()
|
||||
} else if (goToThirdPartySipAccountLogin) {
|
||||
goToLoginThirdPartySipAccountFragment()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
model.privacyPolicyClickedEvent.observe(viewLifecycleOwner) {
|
||||
it.consume {
|
||||
val url = getString(R.string.website_privacy_policy_url)
|
||||
try {
|
||||
val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
|
||||
startActivity(browserIntent)
|
||||
} catch (ise: IllegalStateException) {
|
||||
Log.e(
|
||||
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
model.generalTermsClickedEvent.observe(viewLifecycleOwner) {
|
||||
it.consume {
|
||||
val url = getString(R.string.website_terms_and_conditions_url)
|
||||
try {
|
||||
val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
|
||||
startActivity(browserIntent)
|
||||
} catch (ise: IllegalStateException) {
|
||||
Log.e(
|
||||
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dialog.show()
|
||||
}
|
||||
}
|
||||
|
|
@ -29,19 +29,16 @@ import androidx.annotation.UiThread
|
|||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import androidx.navigation.fragment.navArgs
|
||||
import androidx.navigation.navGraphViewModels
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||
import org.linphone.LinphoneApplication.Companion.corePreferences
|
||||
import org.linphone.R
|
||||
import org.linphone.core.tools.Log
|
||||
import org.linphone.databinding.AssistantLoginFragmentBinding
|
||||
import org.linphone.ui.assistant.AssistantActivity
|
||||
import org.linphone.ui.assistant.model.AcceptConditionsAndPolicyDialogModel
|
||||
import org.linphone.ui.assistant.viewmodel.AccountLoginViewModel
|
||||
import org.linphone.ui.sso.OpenIdActivity
|
||||
import org.linphone.utils.DialogUtils
|
||||
import org.linphone.utils.PhoneNumberUtils
|
||||
|
||||
@UiThread
|
||||
|
|
@ -52,6 +49,8 @@ class LoginFragment : Fragment() {
|
|||
|
||||
private lateinit var binding: AssistantLoginFragmentBinding
|
||||
|
||||
private val args: LoginFragmentArgs by navArgs()
|
||||
|
||||
private val viewModel: AccountLoginViewModel by navGraphViewModels(
|
||||
R.id.assistant_nav_graph
|
||||
)
|
||||
|
|
@ -72,16 +71,11 @@ class LoginFragment : Fragment() {
|
|||
binding.viewModel = viewModel
|
||||
|
||||
binding.setBackClickListener {
|
||||
requireActivity().finish()
|
||||
goBack()
|
||||
}
|
||||
|
||||
binding.setRegisterClickListener {
|
||||
if (viewModel.conditionsAndPrivacyPolicyAccepted) {
|
||||
goToRegisterFragment()
|
||||
} else {
|
||||
showAcceptConditionsAndPrivacyDialog(goToAccountCreate = true)
|
||||
}
|
||||
}
|
||||
val identity = args.sipIdentity
|
||||
viewModel.sipIdentity.value = identity
|
||||
|
||||
binding.setForgottenPasswordClickListener {
|
||||
val url = getString(R.string.web_platform_forgotten_password_url)
|
||||
|
|
@ -95,24 +89,6 @@ class LoginFragment : Fragment() {
|
|||
}
|
||||
}
|
||||
|
||||
binding.setSingleSignOnClickListener {
|
||||
startActivity(Intent(requireContext(), OpenIdActivity::class.java))
|
||||
requireActivity().finish()
|
||||
}
|
||||
|
||||
binding.setQrCodeClickListener {
|
||||
val action = LoginFragmentDirections.actionLoginFragmentToQrCodeScannerFragment()
|
||||
findNavController().navigate(action)
|
||||
}
|
||||
|
||||
binding.setThirdPartySipAccountLoginClickListener {
|
||||
if (viewModel.conditionsAndPrivacyPolicyAccepted) {
|
||||
goToLoginThirdPartySipAccountFragment()
|
||||
} else {
|
||||
showAcceptConditionsAndPrivacyDialog(goToThirdPartySipAccountLogin = true)
|
||||
}
|
||||
}
|
||||
|
||||
viewModel.showPassword.observe(viewLifecycleOwner) {
|
||||
lifecycleScope.launch {
|
||||
delay(50)
|
||||
|
|
@ -146,76 +122,7 @@ class LoginFragment : Fragment() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun goToRegisterFragment() {
|
||||
val action = LoginFragmentDirections.actionLoginFragmentToRegisterFragment()
|
||||
findNavController().navigate(action)
|
||||
}
|
||||
|
||||
private fun goToLoginThirdPartySipAccountFragment() {
|
||||
val action = LoginFragmentDirections.actionLoginFragmentToThirdPartySipAccountWarningFragment()
|
||||
findNavController().navigate(action)
|
||||
}
|
||||
|
||||
private fun showAcceptConditionsAndPrivacyDialog(
|
||||
goToAccountCreate: Boolean = false,
|
||||
goToThirdPartySipAccountLogin: Boolean = false
|
||||
) {
|
||||
val model = AcceptConditionsAndPolicyDialogModel()
|
||||
val dialog = DialogUtils.getAcceptConditionsAndPrivacyDialog(
|
||||
requireActivity(),
|
||||
model
|
||||
)
|
||||
|
||||
model.dismissEvent.observe(viewLifecycleOwner) {
|
||||
it.consume {
|
||||
dialog.dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
model.conditionsAcceptedEvent.observe(viewLifecycleOwner) {
|
||||
it.consume {
|
||||
Log.i("$TAG Conditions & Privacy policy have been accepted")
|
||||
coreContext.postOnCoreThread {
|
||||
corePreferences.conditionsAndPrivacyPolicyAccepted = true
|
||||
}
|
||||
dialog.dismiss()
|
||||
|
||||
if (goToAccountCreate) {
|
||||
goToRegisterFragment()
|
||||
} else if (goToThirdPartySipAccountLogin) {
|
||||
goToLoginThirdPartySipAccountFragment()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
model.privacyPolicyClickedEvent.observe(viewLifecycleOwner) {
|
||||
it.consume {
|
||||
val url = getString(R.string.website_privacy_policy_url)
|
||||
try {
|
||||
val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
|
||||
startActivity(browserIntent)
|
||||
} catch (ise: IllegalStateException) {
|
||||
Log.e(
|
||||
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
model.generalTermsClickedEvent.observe(viewLifecycleOwner) {
|
||||
it.consume {
|
||||
val url = getString(R.string.website_terms_and_conditions_url)
|
||||
try {
|
||||
val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
|
||||
startActivity(browserIntent)
|
||||
} catch (ise: IllegalStateException) {
|
||||
Log.e(
|
||||
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dialog.show()
|
||||
private fun goBack() {
|
||||
findNavController().popBackStack()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ class PermissionsFragment : Fragment() {
|
|||
}
|
||||
|
||||
private fun goToLoginFragment() {
|
||||
val action = PermissionsFragmentDirections.actionPermissionsFragmentToLoginFragment()
|
||||
val action = PermissionsFragmentDirections.actionPermissionsFragmentToLandingFragment()
|
||||
findNavController().navigate(action)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,10 @@ class RegisterCodeConfirmationFragment : Fragment() {
|
|||
viewModel.goToLoginPageEvent.observe(viewLifecycleOwner) {
|
||||
it.consume {
|
||||
Log.i("$TAG Going to login fragment")
|
||||
val action = RegisterCodeConfirmationFragmentDirections.actionRegisterCodeConfirmationFragmentToLoginFragment()
|
||||
val identity = viewModel.username.value.orEmpty()
|
||||
val action = RegisterCodeConfirmationFragmentDirections.actionRegisterCodeConfirmationFragmentToLoginFragment(
|
||||
identity
|
||||
)
|
||||
findNavController().navigate(action)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,9 +43,7 @@ class AccountLoginViewModel @UiThread constructor() : ViewModel() {
|
|||
private const val TAG = "[Account Login ViewModel]"
|
||||
}
|
||||
|
||||
val showBackButton = MutableLiveData<Boolean>()
|
||||
|
||||
val username = MutableLiveData<String>()
|
||||
val sipIdentity = MutableLiveData<String>()
|
||||
|
||||
val password = MutableLiveData<String>()
|
||||
|
||||
|
|
@ -69,8 +67,6 @@ class AccountLoginViewModel @UiThread constructor() : ViewModel() {
|
|||
MutableLiveData<Event<String>>()
|
||||
}
|
||||
|
||||
var conditionsAndPrivacyPolicyAccepted = false
|
||||
|
||||
private lateinit var newlyCreatedAuthInfo: AuthInfo
|
||||
private lateinit var newlyCreatedAccount: Account
|
||||
|
||||
|
|
@ -121,13 +117,7 @@ class AccountLoginViewModel @UiThread constructor() : ViewModel() {
|
|||
showPassword.value = false
|
||||
registrationInProgress.value = false
|
||||
|
||||
coreContext.postOnCoreThread { core ->
|
||||
// Prevent user from leaving assistant if no account was configured yet
|
||||
showBackButton.postValue(core.accountList.isNotEmpty())
|
||||
conditionsAndPrivacyPolicyAccepted = corePreferences.conditionsAndPrivacyPolicyAccepted
|
||||
}
|
||||
|
||||
loginEnabled.addSource(username) {
|
||||
loginEnabled.addSource(sipIdentity) {
|
||||
loginEnabled.value = isLoginButtonEnabled()
|
||||
}
|
||||
loginEnabled.addSource(password) {
|
||||
|
|
@ -142,8 +132,14 @@ class AccountLoginViewModel @UiThread constructor() : ViewModel() {
|
|||
coreContext.postOnCoreThread { core ->
|
||||
core.loadConfigFromXml(corePreferences.linphoneDefaultValuesPath)
|
||||
|
||||
val user = username.value.orEmpty().trim()
|
||||
val domain = corePreferences.defaultDomain
|
||||
val identity = sipIdentity.value.orEmpty().trim()
|
||||
val identityAddress = core.interpretUrl(identity, false)
|
||||
identityAddress ?: return@postOnCoreThread
|
||||
|
||||
val user = identityAddress.username
|
||||
user ?: return@postOnCoreThread
|
||||
|
||||
val domain = identityAddress.domain
|
||||
|
||||
newlyCreatedAuthInfo = Factory.instance().createAuthInfo(
|
||||
user,
|
||||
|
|
@ -156,20 +152,6 @@ class AccountLoginViewModel @UiThread constructor() : ViewModel() {
|
|||
core.addAuthInfo(newlyCreatedAuthInfo)
|
||||
|
||||
val accountParams = core.createAccountParams()
|
||||
val identity = if (user.startsWith("sip:")) {
|
||||
if (user.contains("@")) {
|
||||
user
|
||||
} else {
|
||||
"$user@$domain"
|
||||
}
|
||||
} else {
|
||||
if (user.contains("@")) {
|
||||
"sip:$user"
|
||||
} else {
|
||||
"sip:$user@$domain"
|
||||
}
|
||||
}
|
||||
val identityAddress = Factory.instance().createAddress(identity)
|
||||
accountParams.identityAddress = identityAddress
|
||||
|
||||
val prefix = internationalPrefix.value.orEmpty().trim()
|
||||
|
|
@ -214,6 +196,6 @@ class AccountLoginViewModel @UiThread constructor() : ViewModel() {
|
|||
|
||||
@UiThread
|
||||
private fun isLoginButtonEnabled(): Boolean {
|
||||
return username.value.orEmpty().isNotEmpty() && password.value.orEmpty().isNotEmpty()
|
||||
return sipIdentity.value.orEmpty().isNotEmpty() && password.value.orEmpty().isNotEmpty()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* 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.assistant.viewmodel
|
||||
|
||||
import androidx.annotation.UiThread
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.ViewModel
|
||||
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||
import org.linphone.LinphoneApplication.Companion.corePreferences
|
||||
import org.linphone.core.Factory
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class LandingViewModel @UiThread constructor() : ViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Account Login ViewModel]"
|
||||
}
|
||||
|
||||
val showBackButton = MutableLiveData<Boolean>()
|
||||
|
||||
val sipIdentity = MutableLiveData<String>()
|
||||
|
||||
val redirectToDigestAuthEvent: MutableLiveData<Event<Boolean>> by lazy {
|
||||
MutableLiveData<Event<Boolean>>()
|
||||
}
|
||||
|
||||
val redirectToSingleSignOnEvent: MutableLiveData<Event<Boolean>> by lazy {
|
||||
MutableLiveData<Event<Boolean>>()
|
||||
}
|
||||
|
||||
var conditionsAndPrivacyPolicyAccepted = false
|
||||
|
||||
init {
|
||||
coreContext.postOnCoreThread { core ->
|
||||
// Prevent user from leaving assistant if no account was configured yet
|
||||
showBackButton.postValue(core.accountList.isNotEmpty())
|
||||
conditionsAndPrivacyPolicyAccepted = corePreferences.conditionsAndPrivacyPolicyAccepted
|
||||
}
|
||||
}
|
||||
|
||||
@UiThread
|
||||
fun login() {
|
||||
coreContext.postOnCoreThread { core ->
|
||||
var identity = sipIdentity.value.orEmpty()
|
||||
if (!identity.startsWith("sip:")) {
|
||||
identity = "sip:$identity"
|
||||
}
|
||||
if (!identity.contains("@")) {
|
||||
identity = "$identity@${corePreferences.defaultDomain}"
|
||||
}
|
||||
val identityAddress = Factory.instance().createAddress(identity)
|
||||
if (identityAddress == null) {
|
||||
// TODO: FIXME: show error
|
||||
return@postOnCoreThread
|
||||
}
|
||||
|
||||
// TODO: SSO or password auth?
|
||||
if (identityAddress.domain == corePreferences.defaultDomain) {
|
||||
redirectToDigestAuthEvent.postValue(Event(true))
|
||||
} else {
|
||||
redirectToSingleSignOnEvent.postValue(Event(true))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
233
app/src/main/res/layout/assistant_landing_fragment.xml
Normal file
233
app/src/main/res/layout/assistant_landing_fragment.xml
Normal file
|
|
@ -0,0 +1,233 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
<import type="android.view.View" />
|
||||
<import type="android.text.InputType" />
|
||||
<variable
|
||||
name="backClickListener"
|
||||
type="View.OnClickListener" />
|
||||
<variable
|
||||
name="registerClickListener"
|
||||
type="View.OnClickListener" />
|
||||
<variable
|
||||
name="thirdPartySipAccountLoginClickListener"
|
||||
type="View.OnClickListener" />
|
||||
<variable
|
||||
name="qrCodeClickListener"
|
||||
type="View.OnClickListener" />
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="org.linphone.ui.assistant.viewmodel.LandingViewModel" />
|
||||
</data>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
android:background="?attr/color_main2_000">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:onClick="@{backClickListener}"
|
||||
android:id="@+id/back"
|
||||
android:layout_width="@dimen/top_bar_height"
|
||||
android:layout_height="@dimen/top_bar_height"
|
||||
android:padding="15dp"
|
||||
android:src="@drawable/caret_left"
|
||||
android:contentDescription="@string/content_description_go_back_icon"
|
||||
android:visibility="@{viewModel.showBackButton ? View.VISIBLE : View.INVISIBLE, default=invisible}"
|
||||
app:tint="?attr/color_main2_500"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/header"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="19dp"
|
||||
android:src="@drawable/mountains"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:contentDescription="@null"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/back"
|
||||
app:layout_constraintBottom_toBottomOf="@id/title"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/assistant_page_title_style"
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="100dp"
|
||||
android:paddingBottom="27dp"
|
||||
android:text="@string/assistant_account_login"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/header_style"
|
||||
android:id="@+id/sip_identity_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@{@string/sip_address + `*`, default=@string/sip_address}"
|
||||
app:layout_constraintTop_toBottomOf="@id/title"
|
||||
app:layout_constraintStart_toStartOf="@id/sip_identity"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
style="@style/default_text_style"
|
||||
android:id="@+id/sip_identity"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="@={viewModel.sipIdentity, default=`sip:johndoe@sip.linphone.org`}"
|
||||
android:textSize="14sp"
|
||||
android:textColor="?attr/color_main2_600"
|
||||
android:background="@drawable/edit_text_background"
|
||||
android:inputType="text"
|
||||
android:hint="@string/sip_address_hint"
|
||||
app:layout_constraintWidth_max="@dimen/text_input_max_width"
|
||||
app:layout_constraintTop_toBottomOf="@id/sip_identity_label"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:onClick="@{() -> viewModel.login()}"
|
||||
android:enabled="@{viewModel.sipIdentity.length() > 0, default=false}"
|
||||
style="@style/primary_button_label_style"
|
||||
android:id="@+id/login"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="@string/assistant_account_login"
|
||||
app:layout_constraintWidth_max="@dimen/button_max_width"
|
||||
app:layout_constraintTop_toBottomOf="@id/sip_identity"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/default_text_style"
|
||||
android:id="@+id/or"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="28dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:text="@string/or"
|
||||
android:textSize="14sp"
|
||||
android:textColor="?attr/color_main2_500"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/login"/>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="?attr/color_main2_200"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/or"
|
||||
app:layout_constraintTop_toTopOf="@id/or"
|
||||
app:layout_constraintBottom_toBottomOf="@id/or"/>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="?attr/color_main2_200"
|
||||
app:layout_constraintStart_toEndOf="@id/or"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/or"
|
||||
app:layout_constraintBottom_toBottomOf="@id/or"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:onClick="@{qrCodeClickListener}"
|
||||
style="@style/secondary_button_label_style"
|
||||
android:id="@+id/scan_qr_code"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="@string/assistant_scan_qr_code"
|
||||
android:drawableStart="@drawable/qr_code"
|
||||
android:drawablePadding="8dp"
|
||||
app:drawableTint="@color/secondary_button_label_color"
|
||||
app:layout_constraintWidth_max="@dimen/button_max_width"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/or" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:onClick="@{thirdPartySipAccountLoginClickListener}"
|
||||
style="@style/secondary_button_label_style"
|
||||
android:id="@+id/third_party_sip_account"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="@string/assistant_login_third_party_sip_account"
|
||||
app:layout_constraintWidth_max="@dimen/button_max_width"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/scan_qr_code" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/default_text_style"
|
||||
android:id="@+id/no_account_yet"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="@string/assistant_no_account_yet"
|
||||
android:textSize="14sp"
|
||||
android:textColor="?attr/color_main2_700"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/register"
|
||||
app:layout_constraintTop_toTopOf="@id/register"
|
||||
app:layout_constraintBottom_toBottomOf="@id/register"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:onClick="@{registerClickListener}"
|
||||
style="@style/primary_button_label_style"
|
||||
android:id="@+id/register"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginBottom="@dimen/screen_bottom_margin"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="@string/assistant_account_register"
|
||||
app:layout_constraintVertical_bias="1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/no_account_yet"
|
||||
app:layout_constraintTop_toBottomOf="@id/third_party_sip_account"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</layout>
|
||||
|
|
@ -8,21 +8,9 @@
|
|||
<variable
|
||||
name="backClickListener"
|
||||
type="View.OnClickListener" />
|
||||
<variable
|
||||
name="registerClickListener"
|
||||
type="View.OnClickListener" />
|
||||
<variable
|
||||
name="forgottenPasswordClickListener"
|
||||
type="View.OnClickListener" />
|
||||
<variable
|
||||
name="singleSignOnClickListener"
|
||||
type="View.OnClickListener" />
|
||||
<variable
|
||||
name="thirdPartySipAccountLoginClickListener"
|
||||
type="View.OnClickListener" />
|
||||
<variable
|
||||
name="qrCodeClickListener"
|
||||
type="View.OnClickListener" />
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="org.linphone.ui.assistant.viewmodel.AccountLoginViewModel" />
|
||||
|
|
@ -46,7 +34,6 @@
|
|||
android:padding="15dp"
|
||||
android:src="@drawable/caret_left"
|
||||
android:contentDescription="@string/content_description_go_back_icon"
|
||||
android:visibility="@{viewModel.showBackButton ? View.VISIBLE : View.INVISIBLE, default=invisible}"
|
||||
app:tint="?attr/color_main2_500"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
|
@ -79,32 +66,32 @@
|
|||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/header_style"
|
||||
android:id="@+id/username_label"
|
||||
android:id="@+id/sip_identity_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@{@string/username + `*`}"
|
||||
android:text="@{@string/sip_address + `*`, default=@string/sip_address}"
|
||||
app:layout_constraintTop_toBottomOf="@id/title"
|
||||
app:layout_constraintStart_toStartOf="@id/username"/>
|
||||
app:layout_constraintStart_toStartOf="@id/sip_identity"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
style="@style/default_text_style"
|
||||
android:id="@+id/username"
|
||||
android:id="@+id/sip_identity"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="@={viewModel.username, default=`johndoe`}"
|
||||
android:text="@={viewModel.sipIdentity, default=`sip:johndoe@sip.linphone.org`}"
|
||||
android:textSize="14sp"
|
||||
android:textColor="?attr/color_main2_600"
|
||||
android:background="@drawable/edit_text_background"
|
||||
android:inputType="text"
|
||||
android:hint="@string/username"
|
||||
android:hint="@string/sip_address_hint"
|
||||
app:layout_constraintWidth_max="@dimen/text_input_max_width"
|
||||
app:layout_constraintTop_toBottomOf="@id/username_label"
|
||||
app:layout_constraintTop_toBottomOf="@id/sip_identity_label"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
|
|
@ -115,9 +102,9 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@{@string/password + `*`}"
|
||||
android:text="@{@string/password + `*`, default=@string/password}"
|
||||
app:layout_constraintWidth_max="@dimen/text_input_max_width"
|
||||
app:layout_constraintTop_toBottomOf="@id/username"
|
||||
app:layout_constraintTop_toBottomOf="@id/sip_identity"
|
||||
app:layout_constraintStart_toStartOf="@id/password"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
|
|
@ -189,130 +176,6 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/login"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/default_text_style"
|
||||
android:id="@+id/or"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="28dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:text="@string/or"
|
||||
android:textSize="14sp"
|
||||
android:textColor="?attr/color_main2_500"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/forgotten_password"/>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="?attr/color_main2_200"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/or"
|
||||
app:layout_constraintTop_toTopOf="@id/or"
|
||||
app:layout_constraintBottom_toBottomOf="@id/or"/>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="?attr/color_main2_200"
|
||||
app:layout_constraintStart_toEndOf="@id/or"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/or"
|
||||
app:layout_constraintBottom_toBottomOf="@id/or"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:onClick="@{singleSignOnClickListener}"
|
||||
style="@style/primary_button_label_style"
|
||||
android:id="@+id/single_sign_on"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="@string/assistant_login_using_single_sign_on"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintWidth_max="@dimen/button_max_width"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/or" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:onClick="@{qrCodeClickListener}"
|
||||
style="@style/secondary_button_label_style"
|
||||
android:id="@+id/scan_qr_code"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="@string/assistant_scan_qr_code"
|
||||
android:drawableStart="@drawable/qr_code"
|
||||
android:drawablePadding="8dp"
|
||||
app:drawableTint="@color/secondary_button_label_color"
|
||||
app:layout_constraintWidth_max="@dimen/button_max_width"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/single_sign_on" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:onClick="@{thirdPartySipAccountLoginClickListener}"
|
||||
style="@style/secondary_button_label_style"
|
||||
android:id="@+id/third_party_sip_account"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="@string/assistant_login_third_party_sip_account"
|
||||
app:layout_constraintWidth_max="@dimen/button_max_width"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/scan_qr_code" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/default_text_style"
|
||||
android:id="@+id/no_account_yet"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="@string/assistant_no_account_yet"
|
||||
android:textSize="14sp"
|
||||
android:textColor="?attr/color_main2_700"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/register"
|
||||
app:layout_constraintTop_toTopOf="@id/register"
|
||||
app:layout_constraintBottom_toBottomOf="@id/register"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:onClick="@{registerClickListener}"
|
||||
style="@style/primary_button_label_style"
|
||||
android:id="@+id/register"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginBottom="@dimen/screen_bottom_margin"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="@string/assistant_account_register"
|
||||
app:layout_constraintVertical_bias="1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/no_account_yet"
|
||||
app:layout_constraintTop_toBottomOf="@id/third_party_sip_account"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/assistant_nav_graph"
|
||||
app:startDestination="@id/loginFragment">
|
||||
app:startDestination="@id/landingFragment">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/loginFragment"
|
||||
|
|
@ -11,32 +11,6 @@
|
|||
android:label="LoginFragment"
|
||||
tools:layout="@layout/assistant_login_fragment" >
|
||||
|
||||
<action
|
||||
android:id="@+id/action_loginFragment_to_registerFragment"
|
||||
app:destination="@id/registerFragment"
|
||||
app:enterAnim="@anim/slide_in_right"
|
||||
app:exitAnim="@anim/slide_out_left"
|
||||
app:popEnterAnim="@anim/slide_in_left"
|
||||
app:popExitAnim="@anim/slide_out_right"
|
||||
app:launchSingleTop="true" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_loginFragment_to_qrCodeScannerFragment"
|
||||
app:destination="@id/qrCodeScannerFragment"
|
||||
app:enterAnim="@anim/slide_in_right"
|
||||
app:exitAnim="@anim/slide_out_left"
|
||||
app:popEnterAnim="@anim/slide_in_left"
|
||||
app:popExitAnim="@anim/slide_out_right"
|
||||
app:launchSingleTop="true" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_loginFragment_to_thirdPartySipAccountWarningFragment"
|
||||
app:destination="@id/thirdPartySipAccountWarningFragment"
|
||||
app:enterAnim="@anim/slide_in_right"
|
||||
app:exitAnim="@anim/slide_out_left"
|
||||
app:popEnterAnim="@anim/slide_in_left"
|
||||
app:popExitAnim="@anim/slide_out_right"
|
||||
app:launchSingleTop="true" />
|
||||
<action
|
||||
android:id="@+id/action_loginFragment_to_profileModeFragment"
|
||||
app:destination="@id/profileModeFragment"
|
||||
|
|
@ -45,6 +19,9 @@
|
|||
app:popEnterAnim="@anim/slide_in_left"
|
||||
app:popExitAnim="@anim/slide_out_right"
|
||||
app:launchSingleTop="true" />
|
||||
<argument
|
||||
android:name="sipIdentity"
|
||||
app:argType="string" />
|
||||
|
||||
</fragment>
|
||||
|
||||
|
|
@ -137,14 +114,64 @@
|
|||
android:name="org.linphone.ui.assistant.fragment.PermissionsFragment"
|
||||
android:label="PermissionsFragment"
|
||||
tools:layout="@layout/assistant_permissions_fragment">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_permissionsFragment_to_loginFragment"
|
||||
android:id="@+id/action_permissionsFragment_to_landingFragment"
|
||||
app:destination="@id/landingFragment"
|
||||
app:enterAnim="@anim/slide_in_right"
|
||||
app:exitAnim="@anim/slide_out_left"
|
||||
app:popEnterAnim="@anim/slide_in_left"
|
||||
app:popExitAnim="@anim/slide_out_right"
|
||||
app:launchSingleTop="true" />
|
||||
|
||||
</fragment>
|
||||
|
||||
<action
|
||||
android:id="@+id/action_global_permissionsFragment"
|
||||
app:destination="@id/permissionsFragment"/>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/landingFragment"
|
||||
android:name="org.linphone.ui.assistant.fragment.LandingFragment"
|
||||
android:label="LandingFragment"
|
||||
tools:layout="@layout/assistant_landing_fragment" >
|
||||
|
||||
<action
|
||||
android:id="@+id/action_landingFragment_to_loginFragment"
|
||||
app:destination="@id/loginFragment"
|
||||
app:enterAnim="@anim/slide_in_right"
|
||||
app:exitAnim="@anim/slide_out_left"
|
||||
app:popEnterAnim="@anim/slide_in_left"
|
||||
app:popExitAnim="@anim/slide_out_right"
|
||||
app:launchSingleTop="true" />
|
||||
</fragment><action android:id="@+id/action_global_permissionsFragment" app:destination="@id/permissionsFragment"/>
|
||||
|
||||
<action
|
||||
android:id="@+id/action_landingFragment_to_qrCodeScannerFragment"
|
||||
app:destination="@id/qrCodeScannerFragment"
|
||||
app:enterAnim="@anim/slide_in_right"
|
||||
app:exitAnim="@anim/slide_out_left"
|
||||
app:popEnterAnim="@anim/slide_in_left"
|
||||
app:popExitAnim="@anim/slide_out_right"
|
||||
app:launchSingleTop="true" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_landingFragment_to_thirdPartySipAccountWarningFragment"
|
||||
app:destination="@id/thirdPartySipAccountWarningFragment"
|
||||
app:enterAnim="@anim/slide_in_right"
|
||||
app:exitAnim="@anim/slide_out_left"
|
||||
app:popEnterAnim="@anim/slide_in_left"
|
||||
app:popExitAnim="@anim/slide_out_right"
|
||||
app:launchSingleTop="true" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_landingFragment_to_registerFragment"
|
||||
app:destination="@id/registerFragment"
|
||||
app:enterAnim="@anim/slide_in_right"
|
||||
app:exitAnim="@anim/slide_out_left"
|
||||
app:popEnterAnim="@anim/slide_in_left"
|
||||
app:popExitAnim="@anim/slide_out_right"
|
||||
app:launchSingleTop="true" />
|
||||
|
||||
</fragment>
|
||||
|
||||
</navigation>
|
||||
|
|
@ -38,6 +38,7 @@
|
|||
<string name="conversation_one_to_one_hidden_subject" translatable="false">Dummy subject</string>
|
||||
|
||||
<string name="sip_address">SIP address</string>
|
||||
<string name="sip_address_hint">username@domain</string>
|
||||
<string name="sip_address_display_name">Display name</string>
|
||||
<string name="sip_address_domain">Domain</string>
|
||||
<string name="username">Username</string>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue