package Ġapp . mov i eb ase . android x . widget . dialog Ċ Ċ import Ġandroid . app . Dialog Ċ import Ġandroid . widget . Frame Layout Ċ import Ġcom . google . android . material . bottom sheet . Bottom Sheet Behavior Ċ import Ġcom . google . android . material . bottom sheet . Bottom Sheet Dialog Ċ Ċ fun ĠDialog . add State Expanded () Ġ{ ĊĠĠĠ Ġset On Show Listener Ġ{ Ġdialog Ġ-> ĊĠĠĠĠĠĠĠ Ġval Ġbottom Sheet Dialog Ġ= Ġdialog Ġas ĠBottom Sheet Dialog ĊĠĠĠĠĠĠĠ Ġval Ġbottom Sheet Ġ= Ġbottom Sheet Dialog . findViewById < Frame Layout >( com . google . android . material . R . id . design _ bottom _ sheet ) ĊĠĠĠĠĠĠĠ ĠcheckNotNull ( bottom Sheet ) ĊĊĠĠĠĠĠĠĠ Ġval Ġbehaviour Ġ= ĠBottom Sheet Behavior . from ( bottom Sheet ) ĊĠĠĠĠĠĠĠ Ġbehaviour . state Ġ= ĠBottom Sheet Behavior . STATE _ EXP AN DED ĊĠĠĠ Ġ} Ċ } Ċ