package Ġcom . null gr . android core . keyboard anim ator Ċ Ċ import Ġandroid . annotation . Target Api Ċ import Ġandroid . os . Build Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . annotation . Requires Api Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroid . view . WindowManager Ċ import Ġcom . null gr . android core . R Ċ import Ġcom . null gr . android core . keyboard anim ator . dialog . Simple Bottom Sheet Dialog Ċ import Ġcom . null gr . core . ui . keyboard anim ator . Base Keyboard Animator Ċ import Ġcom . null gr . core . ui . keyboard anim ator . simple . Simple Keyboard Animator Ċ import Ġkotlinx . android . synt hetic . main . activity _ keyboard _ anim ator _ example .* Ċ Ċ @ Requires Api ( Build . VERSION _ CODES . LO L LI POP ) Ċ @ Target Api ( Build . VERSION _ CODES . LO L LI POP ) Ċ class ĠKeyboard Animator Example Activity Ġ: ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġanim ator : ĠBase Keyboard Animator Ġby Ġlazy ( Lazy Thread Safety Mode . NONE ) Ġ{ ĠSimple Keyboard Animator ( window ) Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ Ġwindow . set Soft Input Mode ( WindowManager . LayoutParams . SOFT _ INPUT _ ADJ UST _ RE SIZE ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . activity _ keyboard _ anim ator _ example ) ĊĠĠĠĠĠĠĠ Ġshow Bottom Sheet View . setOnClickListener Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSimple Bottom Sheet Dialog ( this , ĠcheckBox View . isChecked ). show () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ ĠcheckBox View . setOn Checked ChangeListener Ġ{ Ġ_, Ġis Checked Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( isChecked ) Ġanim ator . start () Ġelse Ġanim ator . stop () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }