package Ġcom . up ick . up ick . fragments . group formed Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġandroidx . lifecycle . lifecycle Scope Ċ import Ġandroidx . navigation . fragment . find Nav Controller Ċ import Ġcom . up ick . up ick . databinding . Fragment Waiting After Vote Binding Ċ import Ġkotlinx . coroutines . delay Ċ import Ġkotlinx . coroutines . launch Ċ Ċ class ĠWaiting After Vote Fragment Ġ: ĠFragment () Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġbinding : ĠFragment Waiting After Vote Binding ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( ĊĠĠĠĠĠĠĠ Ġinflater : ĠLayoutInflater , ĊĠĠĠĠĠĠĠ Ġcontainer : ĠViewGroup ?, ĊĠĠĠĠĠĠĠ ĠsavedInstanceState : ĠBundle ? ĊĠĠĠ Ġ): ĠView ? Ġ{ ĊĠĠĠĠĠĠĠ Ġbinding Ġ= ĠFragment Waiting After Vote Binding . inflate ( in flater , Ġcontainer , Ġfalse ) ĊĠĠĠĠĠĠĠ Ġreturn Ġbinding . root ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġbinding . main TextView . text Ġ= Ġ" Let 's Ġwait Ġfor Ġyour Ġfriends Ġto Ġfinish Ġsorting !" ĊĠĠĠĠĠĠĠ Ġval Ġloading Done Ġ= Ġfalse ĊĠĠĠĠĠĠĠ Ġif Ġ( loading Done ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfind Nav Controller (). navigate ( Waiting After Vote Fragment Directions . action Waiting After Vote Fragment To Result Fragment ()) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ// ĠThe Ġfollowing Ġuses ĠCo Rout ines Ġto Ġgenerate Ġa Ġ 1 s Ġdelay . ĠIt 's Ġjust Ġa Ġplaceholder Ġfor Ġthe ĊĠĠĠĠĠĠĠ Ġ// Ġactual ĠHTTP Ġrequests ĊĠĠĠĠĠĠĠ Ġlifecycle Scope . launch Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdelay ( 1 0 0 0 L ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfind Nav Controller (). navigate ( Waiting After Vote Fragment Directions . action Waiting After Vote Fragment To Result Fragment ()) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }