package Ġcom . company _ name . digital _ covid 1 9 . activity Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . Intent Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . widget . Adapter View . On ItemClickListener Ċ import Ġandroid . widget . Array Adapter Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroidx . databinding . Data Binding Util Ċ import Ġcom . company _ name . digital _ covid 1 9 . R Ċ import Ġcom . company _ name . digital _ covid 1 9 . databinding . Activity Country Selection Binding ĊĊ Ċ class ĠCountry Selection Activity Ġ: ĠAppCompatActivity () Ġ{ ĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĊĠĠĠĠĠĠĠ Ġfun Ġnew Intent ( context : ĠContext ): ĠIntent Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn ĠIntent ( context , ĠCountry Selection Activity :: class . java ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġbinding : ĠActivity Country Selection Binding ĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . activity _ country _ selection ) ĊĠĠĠĠĠĠĠ Ġbinding Ġ= ĠData Binding Util . set ContentView ( this , ĠR . layout . activity _ country _ selection ) ĊĠĠĠĠĠĠĠ Ġval Ġcountries : ĠArray < out ĠString > Ġ= Ġresources . getString Array ( R . array . countries ) ĊĠĠĠĠĠĠĠ ĠArray Adapter ( this , Ġandroid . R . layout . simple _ list _ item _ 1 , Ġcountries ). also Ġ{ Ġadapter Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbinding . country EditText . setAdapter ( adapter ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġthis . init () ĊĠĠĠ Ġ} ĊĠĠĠ Ġprivate Ġfun Ġinit (){ ĊĠĠĠĠĠĠĠ Ġbinding . country EditText . on ItemClickListener Ġ= ĠOn ItemClickListener Ġ{ Ġparent , Ġview , Ġposition , Ġid Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġselected Item Ġ= Ġparent . getItem At Position ( position ) Ġas ĠString ĊĠĠĠĠĠĠĠĠĠĠĠ Ġthis . start Sy mptoms Second Activity ( true , selected Item ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠĠĠ Ġprivate Ġfun Ġstart Sy mptoms Second Activity ( ab ro aded : Boolean , country : String ) Ġ{ ĊĊĠĠĠĠĠĠĠ Ġthis . startActivity ( Sy mptoms Second Activity . new Intent ( this , ab ro aded , country )) ĊĠĠĠ Ġ} Ċ Ċ } Ċ