diff --git a/app/src/main/java/org/linphone/ui/assistant/fragment/LoginFragment.kt b/app/src/main/java/org/linphone/ui/assistant/fragment/LoginFragment.kt index 94d2b38d5..19daa71bc 100644 --- a/app/src/main/java/org/linphone/ui/assistant/fragment/LoginFragment.kt +++ b/app/src/main/java/org/linphone/ui/assistant/fragment/LoginFragment.kt @@ -114,8 +114,9 @@ class LoginFragment : Fragment() { viewModel.accountLoggedInEvent.observe(viewLifecycleOwner) { it.consume { - Log.i("$TAG Account successfully logged-in, leaving assistant") - goBack() + Log.i("$TAG Account successfully logged-in, go to profile mode fragment") + val action = LoginFragmentDirections.actionLoginFragmentToProfileModeFragment() + findNavController().navigate(action) } } diff --git a/app/src/main/java/org/linphone/ui/assistant/fragment/ProfileModeFragment.kt b/app/src/main/java/org/linphone/ui/assistant/fragment/ProfileModeFragment.kt new file mode 100644 index 000000000..2ba17294e --- /dev/null +++ b/app/src/main/java/org/linphone/ui/assistant/fragment/ProfileModeFragment.kt @@ -0,0 +1,85 @@ +/* + * 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 . + */ +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.core.content.ContextCompat +import androidx.fragment.app.Fragment +import androidx.lifecycle.lifecycleScope +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.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 +class ProfileModeFragment : Fragment() { + companion object { + private const val TAG = "[Profile Mode Fragment]" + } + + private lateinit var binding: AssistantSecureModeFragmentBinding + + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ): View { + binding = AssistantSecureModeFragmentBinding.inflate(layoutInflater) + return binding.root + } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + + binding.lifecycleOwner = viewLifecycleOwner + + binding.setBackClickListener { + findNavController().popBackStack() + } + + binding.setContinueClickListener { + requireActivity().finish() + } + + binding.setDefaultModeTooltipClickListener { + // TODO + } + + binding.setInteropModeTooltipClickListener { + // TODO + } + } +} diff --git a/app/src/main/java/org/linphone/ui/main/contacts/fragment/ContactFragment.kt b/app/src/main/java/org/linphone/ui/main/contacts/fragment/ContactFragment.kt index 244e5b515..aa5f7afd2 100644 --- a/app/src/main/java/org/linphone/ui/main/contacts/fragment/ContactFragment.kt +++ b/app/src/main/java/org/linphone/ui/main/contacts/fragment/ContactFragment.kt @@ -102,7 +102,7 @@ class ContactFragment : GenericFragment() { binding.setDeleteClickListener { viewModel.deleteContact() goBack() - // TODO: show toast ? + // TODO: show toast ? show confirmation dialog ? } sharedViewModel.isSlidingPaneSlideable.observe(viewLifecycleOwner) { slideable -> diff --git a/app/src/main/res/drawable/arrow_right_fill.xml b/app/src/main/res/drawable/arrow_right_fill.xml new file mode 100644 index 000000000..68e8c6dd8 --- /dev/null +++ b/app/src/main/res/drawable/arrow_right_fill.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/info.xml b/app/src/main/res/drawable/info.xml new file mode 100644 index 000000000..779c5996c --- /dev/null +++ b/app/src/main/res/drawable/info.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/shape_squircle_gray_2_background.xml b/app/src/main/res/drawable/shape_squircle_gray_2_background.xml new file mode 100644 index 000000000..31ec2d7dc --- /dev/null +++ b/app/src/main/res/drawable/shape_squircle_gray_2_background.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/shape_squircle_gray_background.xml b/app/src/main/res/drawable/shape_squircle_gray_3_background.xml similarity index 100% rename from app/src/main/res/drawable/shape_squircle_gray_background.xml rename to app/src/main/res/drawable/shape_squircle_gray_3_background.xml diff --git a/app/src/main/res/layout/account_list_cell.xml b/app/src/main/res/layout/account_list_cell.xml index 9027d4ef1..8782df3d4 100644 --- a/app/src/main/res/layout/account_list_cell.xml +++ b/app/src/main/res/layout/account_list_cell.xml @@ -80,7 +80,7 @@ android:paddingEnd="8dp" android:paddingTop="4dp" android:paddingBottom="4dp" - android:background="@drawable/shape_squircle_gray_background" + android:background="@drawable/shape_squircle_gray_3_background" android:gravity="center" android:text="@{model.registrationState, default=@string/drawer_menu_account_connection_status_connected}" android:textColor="@{model.isConnected ? @color/green_online : model.inError ? @color/red_danger : @color/gray_1, default=@color/green_online}" diff --git a/app/src/main/res/layout/assistant_login_fragment.xml b/app/src/main/res/layout/assistant_login_fragment.xml index 3e702e029..4058fc8ad 100644 --- a/app/src/main/res/layout/assistant_login_fragment.xml +++ b/app/src/main/res/layout/assistant_login_fragment.xml @@ -47,9 +47,10 @@ app:layout_constraintStart_toStartOf="parent"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/welcome_page_1.xml b/app/src/main/res/layout/welcome_page_1.xml index d2a9ccead..1fb819eda 100644 --- a/app/src/main/res/layout/welcome_page_1.xml +++ b/app/src/main/res/layout/welcome_page_1.xml @@ -4,14 +4,27 @@ android:layout_width="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto"> + + @@ -22,8 +35,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="65dp" + android:paddingBottom="16dp" android:text="in Linphone" - android:textColor="@color/black" + android:textColor="@color/white" android:textSize="26sp" app:layout_constraintTop_toBottomOf="@id/title_first_line" app:layout_constraintEnd_toEndOf="parent"/> diff --git a/app/src/main/res/layout/welcome_page_2.xml b/app/src/main/res/layout/welcome_page_2.xml index 7a770349b..0b639afb0 100644 --- a/app/src/main/res/layout/welcome_page_2.xml +++ b/app/src/main/res/layout/welcome_page_2.xml @@ -4,14 +4,27 @@ android:layout_width="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto"> + + @@ -22,8 +35,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="65dp" + android:paddingBottom="16dp" android:text="in Linphone" - android:textColor="@color/black" + android:textColor="@color/white" android:textSize="26sp" app:layout_constraintTop_toBottomOf="@id/title_first_line" app:layout_constraintEnd_toEndOf="parent"/> diff --git a/app/src/main/res/layout/welcome_page_3.xml b/app/src/main/res/layout/welcome_page_3.xml index dac266fa1..2532401f0 100644 --- a/app/src/main/res/layout/welcome_page_3.xml +++ b/app/src/main/res/layout/welcome_page_3.xml @@ -4,14 +4,27 @@ android:layout_width="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto"> + + @@ -22,8 +35,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="65dp" + android:paddingBottom="16dp" android:text="in Linphone" - android:textColor="@color/black" + android:textColor="@color/white" android:textSize="26sp" app:layout_constraintTop_toBottomOf="@id/title_first_line" app:layout_constraintEnd_toEndOf="parent"/> diff --git a/app/src/main/res/navigation/assistant_nav_graph.xml b/app/src/main/res/navigation/assistant_nav_graph.xml index 37cbc45ed..46cb36fe3 100644 --- a/app/src/main/res/navigation/assistant_nav_graph.xml +++ b/app/src/main/res/navigation/assistant_nav_graph.xml @@ -37,6 +37,14 @@ app:popEnterAnim="@anim/slide_in_left" app:popExitAnim="@anim/slide_out_right" app:launchSingleTop="true" /> + @@ -118,4 +126,10 @@ + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1fe7c4e63..a8709917d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -85,6 +85,10 @@ Some features require a Linphone account, such as group messaging, video conferences…\n\nThese features are hidden when you register with a third party SIP account.\n\nTo enable it in a commercial project, please contact us. I prefer to create an account I understand + Personalize your profile mode + You may change that mode later + Default + Interoperable Default Manage the profile