mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-03 15:11:42 +01:00
Add avatar picker and defaults.
This commit is contained in:
committed by
Greyson Parrelli
parent
0093e1d3eb
commit
ed23c3fe7c
98
app/src/main/res/navigation/avatar_picker.xml
Normal file
98
app/src/main/res/navigation/avatar_picker.xml
Normal file
@@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/avatar_picker"
|
||||
app:startDestination="@id/avatarPickerFragment">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/avatarPickerFragment"
|
||||
android:name="org.thoughtcrime.securesms.avatar.picker.AvatarPickerFragment"
|
||||
android:label="fragment_pick_avatar"
|
||||
tools:layout="@layout/avatar_picker_fragment">
|
||||
<action
|
||||
android:id="@+id/action_avatarPickerFragment_to_textAvatarCreationFragment"
|
||||
app:destination="@id/textAvatarCreationFragment"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_open_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit">
|
||||
|
||||
<argument
|
||||
android:name="text_avatar"
|
||||
app:argType="android.os.Bundle"
|
||||
app:nullable="true" />
|
||||
|
||||
</action>
|
||||
|
||||
<action
|
||||
android:id="@+id/action_avatarPickerFragment_to_vectorAvatarCreationFragment"
|
||||
app:destination="@id/vectorAvatarCreationFragment"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_open_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit">
|
||||
|
||||
<argument
|
||||
android:name="vector_avatar"
|
||||
app:argType="android.os.Bundle" />
|
||||
|
||||
</action>
|
||||
|
||||
<action
|
||||
android:id="@+id/action_avatarPickerFragment_to_avatarPhotoEditorFragment"
|
||||
app:destination="@id/avatarPhotoEditorFragment"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_open_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit">
|
||||
<argument
|
||||
android:name="photo_avatar"
|
||||
app:argType="android.os.Bundle" />
|
||||
</action>
|
||||
|
||||
<argument
|
||||
android:name="group_id"
|
||||
app:argType="org.thoughtcrime.securesms.groups.ParcelableGroupId"
|
||||
app:nullable="true" />
|
||||
|
||||
<argument
|
||||
android:name="is_new_group"
|
||||
android:defaultValue="false"
|
||||
app:argType="boolean" />
|
||||
|
||||
<argument
|
||||
android:name="group_avatar_media"
|
||||
app:argType="org.thoughtcrime.securesms.mediasend.Media"
|
||||
app:nullable="true" />
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/vectorAvatarCreationFragment"
|
||||
android:name="org.thoughtcrime.securesms.avatar.vector.VectorAvatarCreationFragment"
|
||||
android:label="fragment_vector_avatar_creation">
|
||||
<argument
|
||||
android:name="vector_avatar"
|
||||
app:argType="android.os.Bundle" />
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/textAvatarCreationFragment"
|
||||
android:name="org.thoughtcrime.securesms.avatar.text.TextAvatarCreationFragment"
|
||||
android:label="fragment_text_avatar_creation">
|
||||
<argument
|
||||
android:name="text_avatar"
|
||||
app:argType="android.os.Bundle"
|
||||
app:nullable="true" />
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/avatarPhotoEditorFragment"
|
||||
android:name="org.thoughtcrime.securesms.avatar.photo.PhotoEditorFragment"
|
||||
android:label="fragment_avatar_photo_editor">
|
||||
<argument
|
||||
android:name="photo_avatar"
|
||||
app:argType="android.os.Bundle" />
|
||||
</fragment>
|
||||
|
||||
</navigation>
|
||||
@@ -16,6 +16,32 @@
|
||||
app:argType="org.thoughtcrime.securesms.recipients.RecipientId[]"
|
||||
app:nullable="false" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_addGroupDetailsFragment_to_avatar_picker"
|
||||
app:destination="@id/avatar_picker"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_open_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit">
|
||||
|
||||
<argument
|
||||
android:name="group_id"
|
||||
app:argType="org.thoughtcrime.securesms.groups.ParcelableGroupId"
|
||||
app:nullable="true" />
|
||||
|
||||
<argument
|
||||
android:name="is_new_group"
|
||||
app:argType="boolean"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<argument
|
||||
android:name="group_avatar_media"
|
||||
app:argType="org.thoughtcrime.securesms.mediasend.Media"
|
||||
app:nullable="true" />
|
||||
</action>
|
||||
|
||||
</fragment>
|
||||
|
||||
<include app:graph="@navigation/avatar_picker" />
|
||||
|
||||
</navigation>
|
||||
@@ -19,6 +19,24 @@
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_createProfileFragment_to_avatar_picker"
|
||||
app:destination="@id/avatar_picker"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim">
|
||||
<argument
|
||||
android:name="group_id"
|
||||
app:argType="org.thoughtcrime.securesms.groups.ParcelableGroupId"
|
||||
app:nullable="true" />
|
||||
|
||||
<argument
|
||||
android:name="group_avatar_media"
|
||||
app:argType="org.thoughtcrime.securesms.mediasend.Media"
|
||||
app:nullable="true" />
|
||||
</action>
|
||||
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
@@ -27,4 +45,6 @@
|
||||
android:label="fragment_edit_username"
|
||||
tools:layout="@layout/username_edit_fragment" />
|
||||
|
||||
<include app:graph="@navigation/avatar_picker" />
|
||||
|
||||
</navigation>
|
||||
@@ -35,6 +35,26 @@
|
||||
app:popEnterAnim="@anim/slide_from_start"
|
||||
app:popExitAnim="@anim/slide_to_end" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_manageProfileFragment_to_avatar_picker"
|
||||
app:destination="@id/avatar_picker"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim">
|
||||
|
||||
<argument
|
||||
android:name="group_id"
|
||||
app:argType="org.thoughtcrime.securesms.groups.ParcelableGroupId"
|
||||
app:nullable="true" />
|
||||
|
||||
<argument
|
||||
android:name="group_avatar_media"
|
||||
app:argType="org.thoughtcrime.securesms.mediasend.Media"
|
||||
app:nullable="true" />
|
||||
|
||||
</action>
|
||||
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
@@ -55,4 +75,6 @@
|
||||
android:label="fragment_manage_about"
|
||||
tools:layout="@layout/edit_about_fragment" />
|
||||
|
||||
<include app:graph="@navigation/avatar_picker" />
|
||||
|
||||
</navigation>
|
||||
Reference in New Issue
Block a user