package Ġcom . vic pin . sample . view . activity Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroid . view . Menu Ċ import Ġandroid . view . MenuItem Ċ import Ġcom . vic pin . sample . R Ċ import Ġcom . vic pin . sample . view . fragment . Manual Binding Fragment ĊĊ Ċ class ĠManual Binding Activity Ġ: ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ Ġsupport FragmentManager . beginTransaction (). replace ( android . R . id . content , ĠManual Binding Fragment ()). commit () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate Options Menu ( menu : ĠMenu ?): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġmenu Inflater . inflate ( R . menu . main _ menu , Ġmenu ) ĊĠĠĠĠĠĠĠ Ġreturn Ġsuper . onCreate Options Menu ( menu ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Options ItemSelected ( item : ĠMenuItem ?): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġ( support FragmentManager . find Fragment ById ( android . R . id . content ) Ġas ĠManual Binding Fragment ). toggle Adapter () ĊĠĠĠĠĠĠĠ Ġreturn Ġsuper . on Options ItemSelected ( item ) ĊĠĠĠ Ġ} Ċ } Ċ