Created account image settings

This commit is contained in:
Pierre HUBERT
2018-09-01 17:46:11 +02:00
parent d12c4014fd
commit aef18b085a
23 changed files with 852 additions and 8 deletions

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="@color/default_drawable_color"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,5c1.66,0 3,1.34 3,3s-1.34,3 -3,3 -3,-1.34 -3,-3 1.34,-3 3,-3zM12,19.2c-2.5,0 -4.71,-1.28 -6,-3.22 0.03,-1.99 4,-3.08 6,-3.08 1.99,0 5.97,1.09 6,3.08 -1.29,1.94 -3.5,3.22 -6,3.22z"/>
</vector>

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<org.communiquons.android.comunic.client.ui.views.WebUserAccountImage
android:id="@+id/account_image"
android:layout_width="@dimen/account_image_default_width"
android:layout_height="@dimen/account_image_default_height"
android:layout_marginBottom="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/default_account_image" />
<TextView
android:id="@+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/prefence_update_account_image_title"
android:textSize="18sp"
app:layout_constraintStart_toEndOf="@+id/account_image"
app:layout_constraintTop_toTopOf="@+id/account_image" />
<TextView
android:id="@+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/prefence_update_account_image_description"
app:layout_constraintStart_toStartOf="@+id/textView7"
app:layout_constraintTop_toBottomOf="@+id/textView7" />
</android.support.constraint.ConstraintLayout>

View File

@ -5,23 +5,28 @@
<!-- Search user -->
<item
android:id="@+id/action_search_user"
android:title="@string/main_menu_search_user"/>
android:title="@string/main_menu_search_user" />
<!-- Account settings -->
<item
android:id="@+id/action_account_settings"
android:title="@string/action_account_settings" />
<!-- Settings -->
<item
android:id="@+id/action_settings"
android:title="@string/action_settings"/>
android:title="@string/action_settings" />
<!-- About activity -->
<item
android:id="@+id/action_about"
android:title="@string/action_about"/>
android:title="@string/action_about" />
<!-- Sign out -->
<item
android:id="@+id/action_logout"
android:title="@string/main_menu_logout"
android:orderInCategory="101"
app:showAsAction="never"/>
android:title="@string/main_menu_logout"
app:showAsAction="never" />
</menu>

View File

@ -270,4 +270,18 @@
<string name="notice_no_post_yet">Il n\'y a aucun post à afficher ici pour le moment.</string>
<string name="post_visibility_icon">Visiblité du post</string>
<string name="err_get_related_groups_info">Une erreur a survenue lors de la récupération d\'information sur les groupes liés !</string>
<string name="action_account_settings">Paramètres du compte</string>
<string name="activity_account_settings_label">Paramètres du compte</string>
<string name="preferences_account_image_title">Image du compte</string>
<string name="preference_account_image_summary">Mettre à jour votre image de compte et sa visibilité</string>
<string name="prefence_update_account_image_title">Mettre à jour votre image de compte</string>
<string name="prefence_update_account_image_description">Touchez ici pour mettre une nouvelle image de compte en ligne</string>
<string name="err_get_account_image_settings">Une erreur a survenue lors de la récupération des paramètres d\'image de compte !</string>
<string name="action_delete_account_image">Supprimer votre image de compte</string>
<string name="dialog_delete_accountimage_title">Suppression de l\'image de compte</string>
<string name="dialog_delete_accountimage_message">Voulez vous vraiment supprimer votre image de compte ? Cette opération est irréversible !</string>
<string name="dialog_delete_accountimage_cancel">Annuler</string>
<string name="dialog_delete_accountimage_confirm">Supprimer</string>
<string name="err_delete_account_image">Une erreur a survenu lors de la suppression de votre image de compte !</string>
<string name="err_upload_account_image">Une erreur a survenu lors de la mise en ligne de votre nouvelle image de compte !</string>
</resources>

View File

@ -269,4 +269,18 @@
<string name="notice_no_post_yet">There is no post to display here yet.</string>
<string name="post_visibility_icon">Post visibility</string>
<string name="err_get_related_groups_info">Could not get information about related groups!</string>
<string name="action_account_settings">Account Settings</string>
<string name="activity_account_settings_label">Account settings</string>
<string name="preferences_account_image_title">Account image</string>
<string name="preference_account_image_summary">Update your account image and its visibility</string>
<string name="prefence_update_account_image_title">Update account image</string>
<string name="prefence_update_account_image_description">Click here to upload a new account image</string>
<string name="err_get_account_image_settings">Could not get account image settings!</string>
<string name="action_delete_account_image">Delete account image</string>
<string name="dialog_delete_accountimage_title">Delete account image</string>
<string name="dialog_delete_accountimage_message">Are you sure to do this? This operation can not be recovered!</string>
<string name="dialog_delete_accountimage_cancel">Cancel</string>
<string name="dialog_delete_accountimage_confirm">Delete</string>
<string name="err_delete_account_image">Could not delete your account image!</string>
<string name="err_upload_account_image">Could not upload new account image!</string>
</resources>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<org.communiquons.android.comunic.client.ui.preference.AccountImagePreference
android:key="update_account_image" />
<Preference
android:key="delete_account_image"
android:title="@string/action_delete_account_image" />
</PreferenceScreen>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<Preference
android:key="preference_category_account_image"
android:title="@string/preferences_account_image_title"
android:icon="@drawable/ic_account_circle"
android:summary="@string/preference_account_image_summary"/>
</PreferenceScreen>