Updated account profile fragment, still work to do

This commit is contained in:
Sylvain Berfini 2023-09-12 17:33:13 +02:00
parent 7f78cf23d7
commit 7fef6bde78
7 changed files with 310 additions and 88 deletions

View file

@ -19,30 +19,14 @@
*/ */
package org.linphone.ui.assistant.fragment package org.linphone.ui.assistant.fragment
import android.content.Intent
import android.net.Uri
import android.os.Bundle import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.annotation.UiThread import androidx.annotation.UiThread
import androidx.core.content.ContextCompat
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import androidx.lifecycle.lifecycleScope
import androidx.navigation.fragment.findNavController import androidx.navigation.fragment.findNavController
import androidx.navigation.navGraphViewModels
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import org.linphone.LinphoneApplication.Companion.coreContext
import org.linphone.R
import org.linphone.core.tools.Log
import org.linphone.databinding.AssistantLoginFragmentBinding
import org.linphone.databinding.AssistantSecureModeFragmentBinding import org.linphone.databinding.AssistantSecureModeFragmentBinding
import org.linphone.ui.assistant.AssistantActivity
import org.linphone.ui.assistant.model.AcceptConditionsAndPolicyDialogModel
import org.linphone.ui.assistant.viewmodel.AccountLoginViewModel
import org.linphone.utils.DialogUtils
import org.linphone.utils.PhoneNumberUtils
@UiThread @UiThread
class ProfileModeFragment : Fragment() { class ProfileModeFragment : Fragment() {

View file

@ -9,6 +9,7 @@ import androidx.activity.result.contract.ActivityResultContracts
import androidx.annotation.UiThread import androidx.annotation.UiThread
import androidx.core.view.doOnPreDraw import androidx.core.view.doOnPreDraw
import androidx.lifecycle.lifecycleScope import androidx.lifecycle.lifecycleScope
import androidx.navigation.fragment.findNavController
import androidx.navigation.fragment.navArgs import androidx.navigation.fragment.navArgs
import androidx.navigation.navGraphViewModels import androidx.navigation.navGraphViewModels
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
@ -80,6 +81,19 @@ class AccountProfileFragment : GenericFragment() {
pickImage() pickImage()
} }
binding.setChangeModeClickListener {
val action = AccountProfileFragmentDirections.actionAccountProfileFragmentToProfileModeFragment()
findNavController().navigate(action)
}
binding.setSettingsClickListener {
// TODO
}
binding.setDeleteClickListener {
// TODO
}
viewModel.accountFoundEvent.observe(viewLifecycleOwner) { viewModel.accountFoundEvent.observe(viewLifecycleOwner) {
it.consume { found -> it.consume { found ->
if (found) { if (found) {

View file

@ -23,8 +23,14 @@ class AccountProfileViewModel @UiThread constructor() : ViewModel() {
val accountFoundEvent = MutableLiveData<Event<Boolean>>() val accountFoundEvent = MutableLiveData<Event<Boolean>>()
val expandDetails = MutableLiveData<Boolean>()
private lateinit var account: Account private lateinit var account: Account
init {
expandDetails.value = true
}
@UiThread @UiThread
fun findAccountMatchingIdentity(identity: String) { fun findAccountMatchingIdentity(identity: String) {
coreContext.postOnCoreThread { core -> coreContext.postOnCoreThread { core ->
@ -78,4 +84,9 @@ class AccountProfileViewModel @UiThread constructor() : ViewModel() {
} }
} }
} }
@UiThread
fun toggleDetailsExpand() {
expandDetails.value = expandDetails.value == false
}
} }

View file

@ -11,6 +11,15 @@
<variable <variable
name="pickImageClickListener" name="pickImageClickListener"
type="View.OnClickListener" /> type="View.OnClickListener" />
<variable
name="changeModeClickListener"
type="View.OnClickListener" />
<variable
name="settingsClickListener"
type="View.OnClickListener" />
<variable
name="deleteClickListener"
type="View.OnClickListener" />
<variable <variable
name="viewModel" name="viewModel"
type="org.linphone.ui.main.settings.viewmodel.AccountProfileViewModel" /> type="org.linphone.ui.main.settings.viewmodel.AccountProfileViewModel" />
@ -21,6 +30,12 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/white"> android:background="@color/white">
<androidx.constraintlayout.widget.Group
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="sip_address, sip_address_label, display_name, display_name_label, details_background"
android:visibility="@{viewModel.expandDetails ? View.VISIBLE : View.GONE}" />
<ImageView <ImageView
android:id="@+id/back" android:id="@+id/back"
android:onClick="@{backClickListener}" android:onClick="@{backClickListener}"
@ -50,27 +65,34 @@
app:layout_constraintStart_toEndOf="@id/back" app:layout_constraintStart_toEndOf="@id/back"
app:layout_constraintTop_toTopOf="parent"/> app:layout_constraintTop_toTopOf="parent"/>
<ImageView <io.getstream.avatarview.AvatarView
android:onClick="@{pickImageClickListener}" android:onClick="@{pickImageClickListener}"
android:id="@+id/avatar" android:id="@+id/avatar"
android:layout_width="@dimen/avatar_big_size" android:layout_width="@dimen/avatar_big_size"
android:layout_height="@dimen/avatar_big_size" android:layout_height="@dimen/avatar_big_size"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:adjustViewBounds="true"
android:background="@drawable/shape_circle_light_blue_background" android:background="@drawable/shape_circle_light_blue_background"
coil="@{viewModel.picturePath}" app:avatarViewInitialsBackgroundColor="@color/blue_light"
app:avatarViewInitialsTextColor="@color/gray_9"
app:avatarViewInitialsTextSize="21sp"
app:avatarViewInitialsTextStyle="bold"
app:avatarViewPlaceholder="@drawable/contact_avatar"
app:avatarViewShape="circle"
app:avatarViewBorderWidth="0dp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/title"/> app:layout_constraintTop_toBottomOf="@id/title" />
<ImageView <ImageView
android:id="@+id/overlay" android:id="@+id/overlay"
android:layout_width="0dp" android:layout_width="@dimen/avatar_presence_badge_big_size"
android:layout_height="0dp" android:layout_height="@dimen/avatar_presence_badge_big_size"
android:padding="20dp" android:layout_marginEnd="@dimen/avatar_presence_badge_big_end_margin"
android:padding="@dimen/avatar_presence_badge_big_padding"
android:background="@drawable/led_background"
android:src="@drawable/camera" android:src="@drawable/camera"
app:layout_constraintEnd_toEndOf="@id/avatar" app:layout_constraintEnd_toEndOf="@id/avatar"
app:layout_constraintStart_toStartOf="@id/avatar"
app:layout_constraintTop_toTopOf="@id/avatar"
app:layout_constraintBottom_toBottomOf="@id/avatar" /> app:layout_constraintBottom_toBottomOf="@id/avatar" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
@ -86,59 +108,83 @@
app:layout_constraintEnd_toEndOf="parent"/> app:layout_constraintEnd_toEndOf="parent"/>
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style_700" style="@style/default_text_style_800"
android:id="@+id/sip_uri_label" android:onClick="@{() -> viewModel.toggleDetailsExpand()}"
android:layout_width="wrap_content" android:id="@+id/details"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="30dp" android:padding="5dp"
android:layout_marginEnd="16dp" android:layout_marginStart="26dp"
android:text="@string/sip_address" android:layout_marginEnd="26dp"
android:textSize="13sp" android:layout_marginTop="32dp"
app:layout_constraintWidth_max="@dimen/text_input_max_width" android:text="@string/manage_account_details_title"
app:layout_constraintStart_toStartOf="@id/sip_uri" android:drawableEnd="@{viewModel.expandDetails ? @drawable/caret_up : @drawable/caret_down, default=@drawable/caret_up}"
android:drawableTint="@color/gray_9"
android:textSize="16sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/add_picture_label"/> app:layout_constraintTop_toBottomOf="@id/add_picture_label"/>
<androidx.appcompat.widget.AppCompatEditText <ImageView
style="@style/default_text_style" android:id="@+id/details_background"
android:id="@+id/sip_uri"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="50dp" android:layout_height="0dp"
android:layout_marginStart="16dp" android:layout_marginTop="16dp"
android:layout_marginEnd="16dp" android:layout_marginStart="17dp"
android:layout_marginTop="5dp" android:layout_marginEnd="17dp"
android:paddingStart="20dp" android:src="@drawable/shape_squircle_gray_2_background"
android:paddingEnd="20dp"
android:enabled="false"
android:text="@={viewModel.sipAddress, default=`sip:johndoe@sip.example.org`}"
android:textSize="14sp"
android:textColor="@color/gray_9"
android:maxLines="1"
android:background="@drawable/edit_text_background"
android:inputType="text|textPersonName"
app:layout_constraintWidth_max="@dimen/text_input_max_width"
app:layout_constraintTop_toBottomOf="@id/sip_uri_label"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/> app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/details"
app:layout_constraintBottom_toBottomOf="@id/details_bottom_anchor"/>
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style_700" style="@style/default_text_style_700"
android:id="@+id/first_name_label" android:id="@+id/sip_address_label"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginStart="17dp"
android:layout_marginEnd="16dp" android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="@string/sip_address"
android:textSize="13sp"
app:layout_constraintStart_toStartOf="@id/details_background"
app:layout_constraintTop_toTopOf="@id/details_background"/>
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/sip_address"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="@={viewModel.sipAddress, default=`sip:johndoe@sip.example.org`}"
android:textSize="14sp"
android:maxLines="1"
android:ellipsize="end"
app:layout_constraintStart_toEndOf="@id/sip_address_label"
app:layout_constraintEnd_toEndOf="@id/details_background"
app:layout_constraintTop_toTopOf="@id/details_background"/>
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style_700"
android:id="@+id/display_name_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="17dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="@string/sip_address_display_name" android:text="@string/sip_address_display_name"
android:textSize="13sp" android:textSize="13sp"
app:layout_constraintWidth_max="@dimen/text_input_max_width" app:layout_constraintStart_toStartOf="@id/details_background"
app:layout_constraintStart_toStartOf="@id/first_name" app:layout_constraintTop_toBottomOf="@id/sip_address"/>
app:layout_constraintTop_toBottomOf="@id/sip_uri"/>
<androidx.appcompat.widget.AppCompatEditText <androidx.appcompat.widget.AppCompatEditText
style="@style/default_text_style" style="@style/default_text_style"
android:id="@+id/first_name" android:id="@+id/display_name"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:paddingStart="20dp" android:paddingStart="20dp"
@ -150,41 +196,191 @@
android:background="@drawable/edit_text_background" android:background="@drawable/edit_text_background"
android:inputType="text|textPersonName" android:inputType="text|textPersonName"
app:layout_constraintWidth_max="@dimen/text_input_max_width" app:layout_constraintWidth_max="@dimen/text_input_max_width"
app:layout_constraintTop_toBottomOf="@id/first_name_label" app:layout_constraintTop_toBottomOf="@id/display_name_label"
app:layout_constraintStart_toStartOf="@id/display_name_label"
app:layout_constraintEnd_toEndOf="@id/details_background"/>
<View
android:id="@+id/details_bottom_anchor"
android:layout_width="1dp"
android:layout_height="1dp"
android:layout_marginTop="21dp"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/> app:layout_constraintTop_toBottomOf="@id/display_name"/>
<ImageView
android:id="@+id/connection_background"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="16dp"
android:layout_marginStart="17dp"
android:layout_marginEnd="17dp"
android:src="@drawable/shape_squircle_gray_2_background"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/details_background"
app:layout_constraintBottom_toBottomOf="@id/connection_bottom_anchor"/>
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/connected_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="17dp"
android:layout_marginTop="21dp"
android:checked="true"
app:thumbTint="@color/white"
app:trackTint="@color/blue_trusted"
app:layout_constraintStart_toStartOf="@id/connection_background"
app:layout_constraintTop_toTopOf="@id/connection_background" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style_700" style="@style/default_text_style_700"
android:id="@+id/international_prefix_label" android:id="@+id/connected_label"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="30dp" android:layout_marginStart="16dp"
android:layout_marginEnd="16dp" android:text="Connected"
android:text="@string/manage_account_international_prefix"
android:textSize="13sp" android:textSize="13sp"
app:layout_constraintWidth_max="@dimen/text_input_max_width" app:layout_constraintStart_toEndOf="@id/connected_switch"
app:layout_constraintStart_toStartOf="@id/international_prefix" app:layout_constraintTop_toTopOf="@id/connected_switch"
app:layout_constraintTop_toBottomOf="@id/first_name"/> app:layout_constraintBottom_toBottomOf="@id/connected_switch" />
<androidx.appcompat.widget.AppCompatEditText <androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style" style="@style/default_text_style"
android:id="@+id/international_prefix" android:id="@+id/connected_summary"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="50dp" android:layout_height="wrap_content"
android:layout_marginStart="17dp"
android:layout_marginEnd="17dp"
android:layout_marginTop="16dp"
android:textSize="14sp"
android:text="This account is online, everyone can call you"
app:layout_constraintStart_toStartOf="@id/connection_background"
app:layout_constraintEnd_toEndOf="@id/connection_background"
app:layout_constraintTop_toBottomOf="@id/connected_label" />
<View
android:id="@+id/connection_bottom_anchor"
android:layout_width="1dp"
android:layout_height="1dp"
android:layout_marginTop="21dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/connected_summary"/>
<ImageView
android:id="@+id/mode_background"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="16dp"
android:layout_marginStart="17dp"
android:layout_marginEnd="17dp"
android:src="@drawable/shape_squircle_gray_2_background"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/connection_background"
app:layout_constraintBottom_toBottomOf="@id/change_mode"/>
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style_700"
android:id="@+id/current_mode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginTop="5dp" android:text="Mode Interop ?"
android:paddingStart="20dp" android:textSize="13sp"
android:paddingEnd="20dp"
android:text="@={viewModel.internationalPrefix, default=`+1`}"
android:textSize="14sp"
android:textColor="@color/gray_9" android:textColor="@color/gray_9"
app:layout_constraintTop_toTopOf="@id/mode_background"
app:layout_constraintStart_toStartOf="@id/mode_background"
app:layout_constraintBottom_toBottomOf="@id/mode_background"/>
<androidx.appcompat.widget.AppCompatTextView
android:onClick="@{changeModeClickListener}"
style="@style/default_text_style_600"
android:id="@+id/change_mode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="17dp"
android:background="@drawable/tertiary_button_background"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:paddingTop="6dp"
android:paddingBottom="6dp"
android:gravity="center"
android:text="@string/manage_account_change_mode"
android:textColor="@color/tertiary_button_label_color"
android:textSize="13sp"
android:maxLines="1" android:maxLines="1"
android:background="@drawable/edit_text_background" android:ellipsize="end"
android:inputType="number|phone" app:layout_constraintEnd_toEndOf="@id/mode_background"
app:layout_constraintWidth_max="@dimen/text_input_max_width" app:layout_constraintTop_toTopOf="@id/mode_background"
app:layout_constraintTop_toBottomOf="@id/international_prefix_label" app:layout_constraintBottom_toBottomOf="@id/mode_background"/>
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style_800"
android:id="@+id/actions"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:padding="5dp"
android:layout_marginStart="26dp"
android:layout_marginEnd="26dp"
android:layout_marginTop="16dp"
android:text="@string/contact_details_actions_title"
android:textSize="16sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/mode_background"/>
<ImageView
android:id="@+id/actions_background"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="10dp"
android:layout_marginStart="17dp"
android:layout_marginEnd="17dp"
android:src="@drawable/shape_squircle_gray_2_background"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/actions"
app:layout_constraintBottom_toBottomOf="@id/action_delete" />
<androidx.appcompat.widget.AppCompatTextView
android:onClick="@{settingsClickListener}"
style="@style/context_menu_action_label_style"
android:id="@+id/action_settings"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="17dp"
android:layout_marginEnd="17dp"
android:background="@drawable/action_background"
android:text="@string/manage_account_settings"
android:drawableStart="@drawable/user_gear"
app:layout_constraintTop_toTopOf="@id/actions_background"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginStart="17dp"
android:layout_marginEnd="17dp"
android:background="@color/blue_light"
app:layout_constraintStart_toStartOf="@id/action_settings"
app:layout_constraintEnd_toEndOf="@id/action_settings"
app:layout_constraintTop_toBottomOf="@+id/action_settings"/>
<androidx.appcompat.widget.AppCompatTextView
android:onClick="@{deleteClickListener}"
style="@style/context_menu_danger_action_label_style"
android:id="@+id/action_delete"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="17dp"
android:layout_marginEnd="17dp"
android:background="@drawable/action_background"
android:text="@string/manage_account_delete"
android:drawableStart="@drawable/trash_simple"
app:layout_constraintTop_toBottomOf="@id/action_settings"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/> app:layout_constraintEnd_toEndOf="parent"/>

View file

@ -70,7 +70,6 @@
android:id="@+id/scrollView" android:id="@+id/scrollView"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:background="@color/gray_7"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/invisible_title" app:layout_constraintTop_toBottomOf="@id/invisible_title"
@ -263,7 +262,7 @@
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:padding="10dp" android:padding="10dp"
android:background="@drawable/shape_squircle_white_background" android:background="@drawable/shape_squircle_gray_2_background"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/numbers_and_addresses_label" app:layout_constraintTop_toBottomOf="@id/numbers_and_addresses_label"
@ -277,7 +276,7 @@
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginStart="17dp" android:layout_marginStart="17dp"
android:layout_marginEnd="17dp" android:layout_marginEnd="17dp"
android:src="@drawable/shape_squircle_white_background" android:src="@drawable/shape_squircle_gray_2_background"
android:visibility="@{viewModel.title.length() > 0 || viewModel.company.length() > 0 ? View.VISIBLE : View.GONE}" android:visibility="@{viewModel.title.length() > 0 || viewModel.company.length() > 0 ? View.VISIBLE : View.GONE}"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -382,7 +381,7 @@
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_marginStart="17dp" android:layout_marginStart="17dp"
android:layout_marginEnd="17dp" android:layout_marginEnd="17dp"
android:src="@drawable/shape_squircle_white_background" android:src="@drawable/shape_squircle_gray_2_background"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/trust_label" app:layout_constraintTop_toBottomOf="@id/trust_label"
@ -469,7 +468,7 @@
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_marginStart="17dp" android:layout_marginStart="17dp"
android:layout_marginEnd="17dp" android:layout_marginEnd="17dp"
android:src="@drawable/shape_squircle_white_background" android:src="@drawable/shape_squircle_gray_2_background"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/actions" app:layout_constraintTop_toBottomOf="@id/actions"

View file

@ -40,6 +40,14 @@
<argument <argument
android:name="accountIdentity" android:name="accountIdentity"
app:argType="string" /> app:argType="string" />
<action
android:id="@+id/action_accountProfileFragment_to_profileModeFragment"
app:destination="@id/profileModeFragment"
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> </fragment>
<action <action
@ -106,4 +114,10 @@
app:popExitAnim="@anim/slide_out" app:popExitAnim="@anim/slide_out"
app:launchSingleTop="true" /> app:launchSingleTop="true" />
<fragment
android:id="@+id/profileModeFragment"
android:name="org.linphone.ui.assistant.fragment.ProfileModeFragment"
android:label="ProfileModeFragment"
tools:layout="@layout/assistant_secure_mode_fragment"/>
</navigation> </navigation>

View file

@ -104,10 +104,14 @@
<string name="recordings_title">Recordings</string> <string name="recordings_title">Recordings</string>
<string name="help_title">Help</string> <string name="help_title">Help</string>
<string name="manage_account_title">Account profile</string> <string name="manage_account_title">Manage account</string>
<string name="manage_account_details_title">Details</string>
<string name="manage_account_add_picture">Add a picture</string> <string name="manage_account_add_picture">Add a picture</string>
<string name="manage_account_edit_picture">Edit picture</string> <string name="manage_account_edit_picture">Edit picture</string>
<string name="manage_account_change_mode">Change mode</string>
<string name="manage_account_international_prefix">International Prefix</string> <string name="manage_account_international_prefix">International Prefix</string>
<string name="manage_account_settings">Account settings</string>
<string name="manage_account_delete">Delete account</string>
<string name="friend_presence_status_online">Online</string> <string name="friend_presence_status_online">Online</string>
<string name="friend_presence_status_was_online_on">Online on %s</string> <string name="friend_presence_status_was_online_on">Online on %s</string>
@ -153,7 +157,7 @@
<string name="contact_details_job_title">Job title:</string> <string name="contact_details_job_title">Job title:</string>
<string name="contact_details_trust_title">Trust</string> <string name="contact_details_trust_title">Trust</string>
<string name="contact_details_trusted_devices_count">Number of trusted devices:</string> <string name="contact_details_trusted_devices_count">Number of trusted devices:</string>
<string name="contact_details_actions_title">Trust</string> <string name="contact_details_actions_title">Other actions</string>
<string name="contact_details_edit">Edit</string> <string name="contact_details_edit">Edit</string>
<string name="contact_details_add_to_favourites">Add to favourites</string> <string name="contact_details_add_to_favourites">Add to favourites</string>
<string name="contact_details_remove_from_favourites">Remove from favourites</string> <string name="contact_details_remove_from_favourites">Remove from favourites</string>