package Ġcom . doctor . yum yum . presentation . ui . my page Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġcom . doctor . yum yum . R Ċ import Ġcom . doctor . yum yum . common . base . Base Dialog Ċ import Ġcom . doctor . yum yum . databinding . Dialog Grade Up Binding Ċ Ċ class ĠGr ade Up Dialog ( private Ġval Ġgrade : ĠString ) Ġ: ĊĠĠĠ ĠBase Dialog < Dialog Grade Up Binding >( R . layout . dialog _ grade _ up ) Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġgrade Badge : ĠMap < String , ĠInt > Ġby Ġlazy Ġ{ ĊĠĠĠĠĠĠĠ Ġmap Of ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠgetString ( R . string . grade _ b ache lor ) Ġto ĠR . drawable . ic _ grade _ up _ b ache lor , ĊĠĠĠĠĠĠĠĠĠĠĠ ĠgetString ( R . string . grade _ master ) Ġto ĠR . drawable . ic _ grade _ up _ master , ĊĠĠĠĠĠĠĠĠĠĠĠ ĠgetString ( R . string . grade _ expert ) Ġto ĠR . drawable . ic _ grade _ up _ expert , ĊĠĠĠĠĠĠĠĠĠĠĠ ĠgetString ( R . string . grade _ prof essor ) Ġto ĠR . drawable . ic _ grade _ up _ prof essor ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( ĊĠĠĠĠĠĠĠ Ġinflater : ĠLayoutInflater , ĊĠĠĠĠĠĠĠ Ġcontainer : ĠViewGroup ?, ĊĠĠĠĠĠĠĠ ĠsavedInstanceState : ĠBundle ? ĊĠĠĠ Ġ): ĠView Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate View ( in flater , Ġcontainer , ĠsavedInstanceState ) ĊĠĠĠĠĠĠĠ Ġbinding . dialog Grade Up Tv Content . text Ġ= ĠgetString ( R . string . dialog _ grade _ up _ content , Ġgrade ) ĊĠĠĠĠĠĠĠ Ġgrade Badge [ grade ]?. let Ġ{ Ġbinding . dialog Grade Up Iv Badge . setImage Resource ( it ) Ġ} ĊĠĠĠĠĠĠĠ Ġbinding . dialog Grade Up Btn Ok . setOnClickListener Ġ{ Ġdismiss () Ġ} ĊĠĠĠĠĠĠĠ Ġreturn Ġbinding . root ĊĠĠĠ Ġ} Ċ }