Replaced fragment switching functionality in MainActivity.kt with Navigation component, simplifying logic significantly; upgraded to AGP 8.0.1

This commit is contained in:
denizk0461
2023-05-02 20:52:56 +02:00
parent 51c4c9120b
commit 36a7ae0035
12 changed files with 73 additions and 119 deletions
@@ -0,0 +1,22 @@
<?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/main_nav_graph"
app:startDestination="@id/schedule">
<fragment
android:id="@+id/schedule"
android:name="com.denizk0461.studip.fragment.EventFragment"
android:label="EventFragment"
tools:layout="@layout/fragment_event"/>
<fragment
android:id="@+id/canteen"
android:name="com.denizk0461.studip.fragment.CanteenFragment"
android:label="CanteenFragment"/>
<fragment
android:id="@+id/settings"
android:name="com.denizk0461.studip.fragment.SettingsFragment"
android:label="SettingsFragment"
tools:layout="@layout/fragment_settings"/>
</navigation>