В nav_graph.xml
добавьте эту строку в качестве атрибута навигации.
app:startDestination="@+id/auth"
Вам не нужно иметь идентификатор auth
. Изменить auth
на splashFragment
<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/navigation"
app:startDestination="@id/splashFragment">
В splashFragment добавьте эти две строки
app:popUpTo="@id/nav_graph"
app:popUpToInclusive="true"
Так и должно быть
<fragment
android:id="@+id/splashFragment"
android:name="co.farouk.SplashFragment"
android:label="fragment_splash"
tools:layout="@layout/fragment_splash">
<action
app:popUpTo="@id/nav_graph"
app:popUpToInclusive="true"
android:id="@+id/action_splashFragment_to_welcomeFragment"
app:destination="@id/welcomeFragment" />
</fragment>