package Ġcom . f em ir as . framework . mv vm . ui . sp al ash ĊĊ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġcom . f em ir as . framework . mv vm . R Ċ import Ġcom . f em ir as . framework . mv vm . databinding . Fragment Splash Screen Binding Ċ import Ġandroidx . lifecycle . lifecycle Scope Ċ import Ġandroidx . navigation . fragment . find Nav Controller Ċ import Ġcom . f em ir as . framework . mv vm . extension . on Transition Completed Listener Ċ import Ġkotlinx . coroutines . launch Ċ Ċ class ĠSpl ash Screen Fragment : ĠFragment () Ġ Ġ{ ĊĊĠĠĠ Ġprivate Ġvar Ġ_ binding : ĠFragment Splash Screen Binding Ġ? Ġ= Ġnull ĊĠĠĠ Ġprivate Ġval Ġbinding Ġget () Ġ= Ġ_ binding !! ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġ@ Jvm Static ĊĠĠĠĠĠĠĠ Ġfun Ġnew Instance () Ġ= ĠSpl ash Screen Fragment () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( in flater : ĠLayoutInflater , Ġcontainer : ĠViewGroup ?, ĠsavedInstanceState : ĠBundle ?, Ġ): ĠView Ġ{ ĊĠĠĠĠĠĠĠ Ġ_ binding Ġ= ĠFragment Splash Screen Binding . inflate ( in flater , Ġcontainer , Ġfalse ) ĊĠĠĠĠĠĠĠ Ġreturn Ġbinding . root ĊĠĠĠ Ġ} ĊĠĠĠ Ġoverride Ġfun Ġon Destroy View () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Destroy View () ĊĠĠĠĠĠĠĠ Ġ_ binding Ġ= Ġnull ĊĠĠĠ Ġ} ĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on View Created ( view , ĠsavedInstanceState ) ĊĠĠĠĠĠĠĠ Ġbinding . splash Screen Motion Layout . on Transition Completed Listener Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlifecycle Scope . launch Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġif ( find Nav Controller (). current Destination ?. id Ġ!= ĠR . id . signIn Fragment Ġ&& Ġfind Nav Controller (). current Destination ?. id Ġ== ĠR . id . splash Screen Fragment ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġfind Nav Controller (). navigate ( Splash Screen Fragment Directions . action Splash Screen Fragment To SignIn Fragment ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊ Ċ }