package Ġcom . dev dd . recipe . ui . splash Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . fragment . app . view Models Ċ import Ġandroidx . lifecycle . lifecycle Scope Ċ import Ġandroidx . navigation . fragment . find Nav Controller Ċ import Ġcom . dev dd . recipe . R Ċ import Ġcom . dev dd . recipe . base _ android . utils . extensions . observe Event Ċ import Ġcom . dev dd . recipe . databinding . Fragment Splash Binding Ċ import Ġcom . dev dd . recipe . ui . base . Dev Fragment Ċ import Ġcom . dev dd . recipe . utils . extensions . navigate Once Ċ import Ġdagger . h ilt . android . Android EntryPoint Ċ import Ġkotlinx . coroutines . delay Ċ Ċ @ Android EntryPoint Ċ class ĠSpl ash Fragment Ġ: ĠDev Fragment < Fragment Splash Binding >( R . layout . fragment _ splash ) Ġ{ ĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġval ĠTAG : ĠString Ġ= Ġthis :: class . java . simple Name ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġval ĠviewModel Ġby Ġview Models < Splash ViewModel >() ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( binding : ĠFragment Splash Binding , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĊĠĠĠĠĠĠĠ Ġlifecycle Scope . launch When Res umed Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdelay ( 2 0 0 0 ) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠviewModel . dec ide Destination () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ ĠviewModel . navigation . observe Event ( view Lifecycle Owner ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfind Nav Controller (). navigate Once ( it ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ