1
0
Fork 0
mirror of https://gitlab.com/dadada_/uuidgen.git synced 2025-06-08 01:53:57 +02:00

Fix global navigation

This commit is contained in:
Tim Schubert 2020-11-12 20:24:35 +01:00
parent 6e2bbbabf1
commit 7ec26bb4e6
Signed by: dadada
GPG key ID: EEB8D1CE62C4DFEA
2 changed files with 7 additions and 8 deletions

View file

@ -28,7 +28,7 @@ class MainActivity : AppCompatActivity(), CoroutineScope by MainScope() {
return when (item.itemId) { return when (item.itemId) {
R.id.action_history -> { R.id.action_history -> {
findNavController(R.id.nav_host_fragment) findNavController(R.id.nav_host_fragment)
.navigate(R.id.action_uuid_gen_fragment_to_uuid_list_fragment) .navigate(R.id.action_global_uuid_list_fragment)
true true
} }
else -> super.onOptionsItemSelected(item) else -> super.onOptionsItemSelected(item)

View file

@ -8,15 +8,14 @@
<fragment <fragment
android:id="@+id/uuid_gen_fragment" android:id="@+id/uuid_gen_fragment"
android:name="li.dadada.uuidgen.ui.UuidGenFragment" android:name="li.dadada.uuidgen.ui.UuidGenFragment"
android:label="@string/first_fragment_label" android:label="@string/first_fragment_label">
tools:layout="@layout/uuid_list_fragment" >
<action
android:id="@+id/action_uuid_gen_fragment_to_uuid_list_fragment"
app:destination="@id/uuid_list_fragment" />
</fragment> </fragment>
<fragment <fragment
android:id="@+id/uuid_list_fragment" android:id="@+id/uuid_list_fragment"
android:name="li.dadada.uuidgen.ui.UuidListFragment" android:name="li.dadada.uuidgen.ui.UuidListFragment" />
tools:layout="@layout/uuid_list_fragment" />
<action android:id="@+id/action_global_uuid_list_fragment"
app:destination="@id/uuid_list_fragment"/>
</navigation> </navigation>