From 74b9860784913c097ae59e58b0958da7744ebc2e Mon Sep 17 00:00:00 2001 From: Guillaume Jacquart Date: Fri, 9 Jun 2023 06:34:09 +0000 Subject: 1227: use navigation graph component, avoid view (fragments) duplications --- app/src/main/res/layout/activity_main.xml | 27 ++++++++- app/src/main/res/navigation/nav_graph.xml | 91 +++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+), 3 deletions(-) create mode 100644 app/src/main/res/navigation/nav_graph.xml (limited to 'app/src/main/res') diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 2627a32..a5816f4 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,6 +1,27 @@ - + \ No newline at end of file + + app:defaultNavHost="true" + app:navGraph="@navigation/nav_graph" + /> diff --git a/app/src/main/res/navigation/nav_graph.xml b/app/src/main/res/navigation/nav_graph.xml new file mode 100644 index 0000000..52a1677 --- /dev/null +++ b/app/src/main/res/navigation/nav_graph.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.1