package Ġcom . j cs . can buy Ċ Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġcom . j cs . can buy . databinding . Activity Main Binding Ċ import Ġcom . j cs . can buy . ui . fragments . Fragment Main Ċ import Ġdagger . h ilt . android . Android EntryPoint Ċ Ċ @ Android EntryPoint Ċ class ĠMainActivity Ġ: ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġbinding : ĠActivity Main Binding ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠThread . sleep ( 2 0 0 0 ) ĊĠĠĠĠĠĠĠ Ġset Theme ( R . style . Theme _ Can Buy ) ĊĊĠĠĠĠĠĠĠ Ġbinding Ġ= ĠActivity Main Binding . inflate ( layout Inflater ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( binding . root ) ĊĠĠĠĠĠĠĠ Ġset Support ActionBar ( binding . toolbar Main ) ĊĊĠĠĠĠĠĠĠ Ġif ( savedInstanceState Ġ== Ġnull ){ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsupport FragmentManager . beginTransaction () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. add ( R . id . fragment _ container , ĠFragment Main ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. commit () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġreplace Fragment ( fragment : ĠFragment ){ ĊĠĠĠĠĠĠĠ Ġval Ġfragment Manager Ġ= Ġsupport FragmentManager ĊĠĠĠĠĠĠĠ Ġval Ġfragment Transaction Ġ= Ġfragment Manager . beginTransaction () ĊĠĠĠĠĠĠĠ Ġfragment Transaction . replace ( R . id . fragment _ container , Ġfragment ) ĊĠĠĠĠĠĠĠ Ġfragment Transaction . commit () ĊĠĠĠ Ġ} Ċ Ċ }