general.xml 8.51 KB
Newer Older
1
2
3
4
<?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"
    android:id="@+id/general"
Aleks's avatar
Aleks committed
5
    app:startDestination="@id/onboardingStartFragment">
6

7
    <!-- Reverse animations to make it feel like we're returning home-->
8
9
10
    <action
        android:id="@+id/homeRestart"
        app:destination="@id/homeFragment"
11
12
        app:enterAnim="@anim/slide_pop_enter"
        app:exitAnim="@anim/slide_pop_exit"
13
        app:launchSingleTop="true"
14
15
        app:popEnterAnim="@anim/slide_enter"
        app:popExitAnim="@anim/slide_exit"
16
        app:popUpTo="@id/homeFragment" />
17

18
    <fragment
Aleks's avatar
Aleks committed
19
20
        android:id="@+id/onboardingStartFragment"
        android:name="org.dpppt.android.app.onboarding.OnboardingStartFragment">
21
        <!-- No animations here, because this is in intermediate screen that decides the next navigation step -->
22
23
24
        <action
            android:id="@+id/home"
            app:destination="@id/homeFragment"
Aleks's avatar
Aleks committed
25
            app:popUpTo="@id/onboardingStartFragment"
26
            app:popUpToInclusive="true" />
Aleks's avatar
Aleks committed
27
28
29
30
        <action
            android:id="@+id/intro"
            app:destination="@id/onboardingIntroFragment"
            app:popUpTo="@id/onboardingStartFragment"
31
            app:popUpToInclusive="true" />
32
33
34
35
36
        <action
            android:id="@+id/crossCountry"
            app:destination="@id/crossCountryFragment"
            app:popUpTo="@id/onboardingStartFragment"
            app:popUpToInclusive="true" />
37
38
39
40
    </fragment>

    <fragment
        android:id="@+id/homeFragment"
lita_kornilova's avatar
lita_kornilova committed
41
        android:name="org.dpppt.android.app.home.HomeFragment">
42

43
44
        <action
            android:id="@+id/contacts"
45
46
47
48
49
            app:destination="@id/contactsFragment"
            app:enterAnim="@anim/slide_enter"
            app:exitAnim="@anim/slide_exit"
            app:popEnterAnim="@anim/slide_pop_enter"
            app:popExitAnim="@anim/slide_pop_exit" />
50
51
        <action
            android:id="@+id/debug"
52
53
54
55
56
            app:destination="@id/debugFragment"
            app:enterAnim="@anim/slide_enter"
            app:exitAnim="@anim/slide_exit"
            app:popEnterAnim="@anim/slide_pop_enter"
            app:popExitAnim="@anim/slide_pop_exit" />
57
        <action
lauris's avatar
lauris committed
58
            android:id="@+id/confirmInfectionDate"
59
60
61
62
63
            app:destination="@id/confirmInfectionDateFragment"
            app:enterAnim="@anim/slide_enter"
            app:exitAnim="@anim/slide_exit"
            app:popEnterAnim="@anim/slide_pop_enter"
            app:popExitAnim="@anim/slide_pop_exit" />
Aleks's avatar
Aleks committed
64
65
        <action
            android:id="@+id/settings"
66
67
68
69
70
            app:destination="@id/settingsFragment"
            app:enterAnim="@anim/slide_enter"
            app:exitAnim="@anim/slide_exit"
            app:popEnterAnim="@anim/slide_pop_enter"
            app:popExitAnim="@anim/slide_pop_exit" />
71
72
        <action
            android:id="@+id/myData"
73
74
75
76
77
            app:destination="@id/myDataFragment"
            app:enterAnim="@anim/slide_enter"
            app:exitAnim="@anim/slide_exit"
            app:popEnterAnim="@anim/slide_pop_enter"
            app:popExitAnim="@anim/slide_pop_exit" />
78
79
80
81
    </fragment>

    <fragment
        android:id="@+id/contactsFragment"
82
        android:name="org.dpppt.android.app.contacts.ContactsFragment">
83
84

        <!-- Reverse animations to make it feel like we're returning home-->
85
86
        <action
            android:id="@+id/home"
87
            app:destination="@id/homeFragment"
88
89
90
91
            app:enterAnim="@anim/slide_pop_enter"
            app:exitAnim="@anim/slide_pop_exit"
            app:popEnterAnim="@anim/slide_enter"
            app:popExitAnim="@anim/slide_exit" />
92
    </fragment>
93
94
95

    <fragment
        android:id="@+id/debugFragment"
96
        android:name="org.dpppt.android.app.debug.debugmenu.DebugMenuFragment">
97
98
99
100
101
102
103
        <action
            android:id="@+id/confirmInfectionResult"
            app:destination="@id/confirmInfectionResultFragment"
            app:enterAnim="@anim/slide_enter"
            app:exitAnim="@anim/slide_exit"
            app:popEnterAnim="@anim/slide_pop_enter"
            app:popExitAnim="@anim/slide_pop_exit" />
104
105
106
107
108
109
110
111

        <action
            android:id="@+id/settingsCrossCountry"
            app:destination="@id/settingsFragment"
            app:enterAnim="@anim/slide_enter"
            app:exitAnim="@anim/slide_exit"
            app:popEnterAnim="@anim/slide_pop_enter"
            app:popExitAnim="@anim/slide_pop_exit" />
112
113
114

        <action
            android:id="@+id/crossCountryPopUp"
115
            app:destination="@id/crossCountryFragment" />
116

117
    </fragment>
118

119
    <fragment
lauris's avatar
lauris committed
120
        android:id="@+id/confirmInfectionDateFragment"
121
122
123
        android:name="org.dpppt.android.app.infection.date.ConfirmInfectionDateFragment">
        <action
            android:id="@+id/confirmInfectionPatientPortal"
124
125
126
127
128
            app:destination="@id/confirmInfectionPatientPortalFragment"
            app:enterAnim="@anim/slide_enter"
            app:exitAnim="@anim/slide_exit"
            app:popEnterAnim="@anim/slide_pop_enter"
            app:popExitAnim="@anim/slide_pop_exit" />
129
130
131
132
    </fragment>

    <fragment
        android:id="@+id/confirmInfectionPatientPortalFragment"
133
        android:name="org.dpppt.android.app.infection.patientportal.ConfirmInfectionPatientPortalFragment">
134

135
136
        <action
            android:id="@+id/confirmInfectionResult"
137
138
139
140
141
            app:destination="@id/confirmInfectionResultFragment"
            app:enterAnim="@anim/slide_enter"
            app:exitAnim="@anim/slide_exit"
            app:popEnterAnim="@anim/slide_pop_enter"
            app:popExitAnim="@anim/slide_pop_exit"
142
            app:popUpTo="@id/confirmInfectionDateFragment"
143
            app:popUpToInclusive="true" />
144
145
146
147
148
149
150
    </fragment>

    <fragment
        android:id="@+id/confirmInfectionResultFragment"
        android:name="org.dpppt.android.app.infection.result.ConfirmInfectionResultFragment">
        <argument
            android:name="callbackResult"
151
            app:argType="org.dpppt.android.app.domain.entity.enums.PatientPortalResult"
152
153
            app:nullable="false" />
    </fragment>
154

Aleks's avatar
Aleks committed
155
156
157
158
159
160
    <fragment
        android:id="@+id/onboardingIntroFragment"
        android:name="org.dpppt.android.app.onboarding.OnboardingIntroFragment">
        <action
            android:id="@+id/setup"
            app:destination="@id/onboardingSetupFragment"
161
162
163
164
            app:enterAnim="@anim/slide_enter"
            app:exitAnim="@anim/slide_exit"
            app:popEnterAnim="@anim/slide_pop_enter"
            app:popExitAnim="@anim/slide_pop_exit"
Aleks's avatar
Aleks committed
165
166
167
168
169
170
171
            app:popUpTo="@id/onboardingIntroFragment"
            app:popUpToInclusive="true" />
    </fragment>

    <fragment
        android:id="@+id/onboardingSetupFragment"
        android:name="org.dpppt.android.app.onboarding.OnboardingSetupFragment">
172
173
174
        <action
            android:id="@+id/setupComplete"
            app:destination="@id/onboardingCompleteFragment"
175
176
177
178
            app:enterAnim="@anim/slide_enter"
            app:exitAnim="@anim/slide_exit"
            app:popEnterAnim="@anim/slide_pop_enter"
            app:popExitAnim="@anim/slide_pop_exit"
179
180
181
182
183
184
185
            app:popUpTo="@id/onboardingSetupFragment"
            app:popUpToInclusive="true" />
    </fragment>

    <fragment
        android:id="@+id/onboardingCompleteFragment"
        android:name="org.dpppt.android.app.onboarding.OnboardingCompleteFragment">
186

Aleks's avatar
Aleks committed
187
        <action
188
189
            android:id="@+id/crossCountry"
            app:destination="@id/crossCountryFragment"
190
            app:popUpTo="@id/onboardingCompleteFragment"
Aleks's avatar
Aleks committed
191
192
193
            app:popUpToInclusive="true" />
    </fragment>

194
195
    <fragment
        android:id="@+id/myDataFragment"
196
        android:name="org.dpppt.android.app.mydata.MyDataFragment" />
197

Aleks's avatar
Aleks committed
198
199
    <fragment
        android:id="@+id/settingsFragment"
200
201
202
203
204
        android:name="org.dpppt.android.app.settings.SettingsFragment">
        <argument
            android:name="scrollDestination"
            app:argType="org.dpppt.android.app.domain.entity.enums.SettingsScrollDestination" />
    </fragment>
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221

    <fragment
        android:id="@+id/crossCountryFragment"
        android:name="org.dpppt.android.app.crosscountry.CrossCountryFragment">

        <action
            android:id="@+id/home"
            app:destination="@id/homeFragment"
            app:popUpTo="@id/crossCountryFragment"
            app:popUpToInclusive="true"/>

        <action
            android:id="@+id/settingsCrossCountry"
            app:destination="@id/settingsFragment"
            app:popUpTo="@id/crossCountryFragment"
            app:popUpToInclusive="true"/>
    </fragment>
222
</navigation>