package Ġcom . github . viv char . example Ċ Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroidx . fragment . app . FragmentManager Ċ import Ġcom . github . viv char . example . pages . github . Github Fragment Ċ import Ġcom . github . viv char . example . pages . simple .* Ċ Ċ /** Ċ Ġ* ĠCreated Ġby ĠV iv char ĠV it aly Ġon Ġ 1 2 / 2 8 / 1 7 . Ċ Ġ*/ Ċ class ĠUI Router ( context : ĠAppCompatActivity ) Ġ{ Ċ ĉ private Ġval Ġfragment Manager : ĠFragment Manager Ġ= Ġcontext . support FragmentManager ĊĊ ĉ private Ġfun Ġshow Fragment ( fragment : ĠBase Screen Fragment ) Ġ{ Ċĉ ĉ try Ġ{ Ċĉĉ ĉ fragment Manager . beginTransaction () Ċĉĉĉ ĉ . replace ( R . id . screen _ container , Ġfragment , Ġfragment :: class . simple Name ) Ċĉĉĉ ĉ . commit Allow ing State Loss () Ċĉ ĉ } Ġcatch Ġ( ignored : ĠIllegalStateException ) Ġ{ Ċĉ ĉ } Ċ ĉ } ĊĊ ĉ fun Ġopen View Renderer Page () Ġ= Ġshow Fragment ( View Renderer Fragment ()) Ċ ĉ fun Ġopen Composite View Renderer Page () Ġ= Ġshow Fragment ( Composite View Renderer Fragment ()) Ċ ĉ fun Ġopen ViewState Page () Ġ= Ġshow Fragment ( ViewState Fragment ()) Ċ ĉ fun Ġopen Diff Util Page () Ġ= Ġshow Fragment ( Diff Util Fragment ()) Ċ ĉ fun Ġopen Payload Page () Ġ= Ġshow Fragment ( Payload Fragment ()) Ċ ĉ fun Ġopen Load More Page () Ġ= Ġshow Fragment ( Load More Fragment ()) Ċ ĉ fun Ġopen Inputs Page () Ġ= Ġshow Fragment ( Inputs Fragment ()) Ċ ĉ fun Ġopen Github Page () Ġ= Ġshow Fragment ( Github Fragment ()) Ċ }