package Ġcom . example . android studio . motion layout integrations Ċ Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroid . os . Bundle Ċ import Ġcom . example . android studio . motion layout integrations . databinding . Activity Entr ance Binding Ċ Ċ private Ġval ĠS IS _ MOT ION _ LAYOUT _ STATE : ĠString Ġ= Ġ" sis _ motion _ layout _ start " Ċ Ċ class ĠEn tr ance Ġ: ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġbinding : ĠActivity Entr ance Binding ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ Ġbinding Ġ= ĠActivity Entr ance Binding . inflate ( layout Inflater ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( binding . root ) ĊĊĠĠĠĠĠĠĠ ĠsavedInstanceState ?. let Ġ{ ĊĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Restore InstanceState ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Restore InstanceState ( savedInstanceState ) ĊĠĠĠĠĠĠĠ Ġval Ġmotion Layout State Ġ= ĠsavedInstanceState ?. get Bundle ( SIS _ MOT ION _ LAYOUT _ STATE ) ĊĠĠĠĠĠĠĠ Ġmotion Layout State ?. let Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbinding . motion Layout . transition State Ġ= Ġmotion Layout State ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Save InstanceState ( out State : ĠBundle ) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Save InstanceState ( out State ) ĊĠĠĠĠĠĠĠ Ġout State . put Bundle ( SIS _ MOT ION _ LAYOUT _ STATE , Ġbinding . motion Layout . transition State ) ĊĠĠĠ Ġ} Ċ } Ċ