From ccf2a477cadfb211751b988e83717bf7eb2e96cb Mon Sep 17 00:00:00 2001 From: Taras Smakula <tarassmakula@gmail.com> Date: Mon, 11 Mar 2024 14:51:23 +0200 Subject: [PATCH] Add new items to settings --- app/src/main/res/drawable/ic_email.xml | 5 ++ app/src/main/res/layout/fragment_settings.xml | 48 +++++++++++++++---- auth/src/main/res/values/strings.xml | 1 + 3 files changed, 45 insertions(+), 9 deletions(-) create mode 100644 app/src/main/res/drawable/ic_email.xml diff --git a/app/src/main/res/drawable/ic_email.xml b/app/src/main/res/drawable/ic_email.xml new file mode 100644 index 000000000..80111c8e0 --- /dev/null +++ b/app/src/main/res/drawable/ic_email.xml @@ -0,0 +1,5 @@ +<vector android:height="24dp" android:tint="#FFFFFF" + android:viewportHeight="24" android:viewportWidth="24" + android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,8l-8,5 -8,-5L4,6l8,5 8,-5v2z"/> +</vector> diff --git a/app/src/main/res/layout/fragment_settings.xml b/app/src/main/res/layout/fragment_settings.xml index 11aaa6952..852b7f66d 100644 --- a/app/src/main/res/layout/fragment_settings.xml +++ b/app/src/main/res/layout/fragment_settings.xml @@ -12,12 +12,14 @@ android:clipToPadding="false" android:orientation="vertical"> - <ImageView - android:id="@+id/ivLogo" - style="@style/AuthLogoStyle" - android:layout_width="150dp" - android:layout_height="150dp" - android:layout_gravity="center" /> + <TextView + android:id="@+id/tvUserId" + style="@style/title2" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="16dp" + tools:text="@t22:nl.circles-dev.net" /> + <LinearLayout android:id="@+id/lMediaStorage" @@ -97,6 +99,20 @@ android:layout_height="wrap_content" android:text="@string/account" /> + <org.futo.circles.core.view.SettingsMenuItemView + android:id="@+id/tvEditProfile" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:optionIcon="@drawable/ic_edit" + app:optionName="@string/edit_profile" /> + + <org.futo.circles.core.view.SettingsMenuItemView + android:id="@+id/tvShareProfile" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:optionIcon="@drawable/ic_qr" + app:optionName="@string/share_profile" /> + <org.futo.circles.core.view.SettingsMenuItemView android:id="@+id/tvChangePassword" @@ -106,11 +122,11 @@ app:optionName="@string/change_password" /> <org.futo.circles.core.view.SettingsMenuItemView - android:id="@+id/tvSwitchUser" + android:id="@+id/tvChangeEmail" android:layout_width="match_parent" android:layout_height="wrap_content" - app:optionIcon="@drawable/ic_switch_user" - app:optionName="@string/switch_user" /> + app:optionIcon="@drawable/ic_email" + app:optionName="@string/change_email_address" /> <org.futo.circles.core.view.SettingsMenuItemView android:id="@+id/tvClearCache" @@ -120,6 +136,20 @@ app:optionName="@string/clear_cache_and_reload" /> + <TextView + style="@style/settingMenuHeader" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/log_in" /> + + <org.futo.circles.core.view.SettingsMenuItemView + android:id="@+id/tvSwitchUser" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:optionIcon="@drawable/ic_switch_user" + app:optionName="@string/switch_user" /> + + <org.futo.circles.core.view.SettingsMenuItemView android:id="@+id/tvLogout" android:layout_width="match_parent" diff --git a/auth/src/main/res/values/strings.xml b/auth/src/main/res/values/strings.xml index d7879e36f..d8fe8dc58 100644 --- a/auth/src/main/res/values/strings.xml +++ b/auth/src/main/res/values/strings.xml @@ -91,6 +91,7 @@ <string name="switch_user_message">Are you sure you want to switch user?</string> <string name="switch_str">Switch</string> <string name="change_password">Change password</string> + <string name="change_email_address">Change email address</string> <string name="new_password">New password</string> <string name="old_password">Old Password</string> <string name="repeat_new_password">Repeat new password</string> -- GitLab