package Ġio . github . ach mad h af id . z pack . extension Ċ Ċ import Ġandroid . view . Window Ċ import Ġandroid . view . WindowManager Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroidx . fragment . app . Fragment Ċ Ċ fun ĠWindow . adjust Keyboard ( isVisible : ĠBoolean Ġ= Ġfalse ) Ġ{ ĊĠĠĠ Ġval Ġstate Ġ= ĊĠĠĠĠĠĠĠ Ġif Ġ( isVisible ) ĠWindow Manager . LayoutParams . SOFT _ INPUT _ STATE _ VISIBLE ĊĠĠĠĠĠĠĠ Ġelse ĠWindow Manager . LayoutParams . SOFT _ INPUT _ STATE _ HIDDEN ĊĊĠĠĠ Ġ@ Suppress (" DE PREC ATION ") ĊĠĠĠ Ġset Soft Input Mode ( state Ġor ĠWindow Manager . LayoutParams . SOFT _ INPUT _ ADJ UST _ RE SIZE ) Ċ } Ċ Ċ fun ĠFragment . dismiss Keyboard () Ġ= ĊĠĠĠ Ġcontext ?. input Method Manager ?. hide Soft Input From Window ( view ?. root View ?. window Token , Ġ 0 ) Ċ Ċ fun ĠAppCompatActivity . dismiss Keyboard () Ġ= ĊĠĠĠ Ġinput Method Manager . hide Soft Input From Window ( window ?. decor View ?. window Token , Ġ 0 ) Ċ