package Ġcom . ddd 4 . drop it . presentation . ui . create folder dialog Ċ Ċ import Ġandroid . content . Intent Ċ import Ġandroidx . activity . view Models Ċ import Ġandroidx . lifecycle . Observer Ċ import Ġcom . ddd 4 . drop it . presentation . R Ċ import Ġcom . ddd 4 . drop it . presentation . base . ui . Base Activity Ċ import Ġcom . ddd 4 . drop it . presentation . databinding . Activity Create Folder Dialog Binding Ċ import Ġcom . ddd 4 . drop it . presentation . ui . main . MainActivity Ċ import Ġcom . ddd 4 . drop it . presentation . util . Constants Ċ import Ġdagger . h ilt . android . Android EntryPoint Ċ Ċ @ Android EntryPoint Ċ class ĠCreate Folder Dialog Activity Ġ: ĠBase Activity < Activity Create Folder Dialog Binding >( R . layout . activity _ create _ folder _ dialog ) Ġ{ ĊĊĠĠĠ Ġprivate Ġval ĠviewModel : ĠCreate Folder Dialog ViewModel Ġby Ġview Models () ĊĠĠĠ Ġprivate Ġvar Ġitem IdList Ġ= Ġarray ListOf < Long >() ĊĊĠĠĠ Ġoverride Ġfun Ġset Bind () Ġ{ ĊĠĠĠĠĠĠĠ Ġbinding . apply { ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcreate Dialog VM Ġ= ĠviewModel ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġitem IdList Ġ= ĠgetId List ( intent ) ĊĠĠĠĠĠĠĠ ĠviewModel . start ( item IdList ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġset Ob serve () Ġ{ ĊĠĠĠĠĠĠĠ ĠviewModel . confirm Button . observe ( this , ĠObserver Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠstartActivity ( Intent ( this , ĠMainActivity :: class . java )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfinish () ĊĠĠĠĠĠĠĠ Ġ}) ĊĊĠĠĠĠĠĠĠ ĠviewModel . cancel Button . observe ( this , ĠObserver Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfinish () ĊĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun ĠgetId List ( intent : ĠIntent ): ĠArrayList < Long > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġintent . getInteger ArrayList Extra ( Constants . EXTRA _ NAME _ ITEM _ ID ) Ġas ĠArrayList < Long > Ġ?: Ġarray ListOf () ĊĠĠĠ Ġ} Ċ Ċ }