package Ġorg . nek ob as u . core . test Ċ Ċ import Ġandroid . content . Intent Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroid . widget . LinearLayout Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġandroidx . fragment . app . Fragment Activity Ċ import Ġorg . nek ob as u . core .* Ċ import Ġorg . ro bo lectric . Ro bo lectric Ċ import Ġorg . ro bo lectric . android . controller . Activity Controller Ċ Ċ fun ĠGeneric Screen Stack Param . start Visible (): ĠActivity Controller < out ĠFragment Activity > Ġ{ ĊĠĠĠ Ġval Ġactivity Controller Ġ= ĠRo bo lectric . build Activity < Generic Single Module Activity >( Generic Single Module Activity :: class . java , ĠSingle Module Activity . add Params To Activity Intent ( Intent (), Ġthis )) ĊĠĠĠ Ġreturn Ġactivity Controller . setup () Ċ } Ċ Ċ class ĠGeneric Single Module Activity Ġ: ĠSingle Module Activity () Ġ{ ĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ Ġset Theme ( R . style . Theme _ AppCompat ) ĊĠĠĠ Ġ} Ċ } Ċ Ċ class ĠGeneric Screen Stack Param ( val Ġscreen Params : ĠList < Param >) Ġ: ĠParam ( module Class Ġ= ĠGeneric Screen Stack Module :: class . java ) Ċ class ĠGeneric Screen Stack ViewModel ( private Ġval Ġparams : ĠGeneric Screen Stack Param ) Ġ: ĠScreen Stack ViewModel () Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġget Initial Screen (): ĠScreen Update Ġ= ĠScreen Update ( params . screen Params [ 0 ]) ĊĊĠĠĠ Ġinit Ġ{ ĊĠĠĠĠĠĠĠ Ġfor Ġ( i Ġin Ġ( 1 Ġuntil Ġparams . screen Params . size )) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpush Update ( params . screen Params [ i ]) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ Ċ class ĠGeneric Screen Stack Module ( param : ĠGeneric Screen Stack Param ) Ġ: ĠScreen Stack Fragment Module < Generic Screen Stack ViewModel , ĠGeneric Screen Stack Param >( param ) Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( in flater : ĠLayoutInflater , Ġcontainer : ĠViewGroup ?, ĠsavedInstanceState : ĠBundle ?): ĠView ? Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate View ( in flater , Ġcontainer , ĠsavedInstanceState ) ĊĠĠĠĠĠĠĠ Ġval Ġview Ġ= ĠLinearLayout ( context ) ĊĠĠĠĠĠĠĠ Ġview . id Ġ= Ġ 1 ĊĊĠĠĠĠĠĠĠ Ġreturn Ġview ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġmain Container Id (): ĠInt Ġ= Ġ 1 ĊĊĠĠĠ Ġoverride Ġfun Ġget ViewModel Class ( params : ĠGeneric Screen Stack Param ) Ġ= ĠGeneric Screen Stack ViewModel :: class . java Ċ }