lundi 13 janvier 2020

IF statement definition for spinner in string arrays

I wanna define an if statment in my spinner resources which gets arrays from string array resources.

For example if I choose VQE in spinner_type spinner, I have to choose call_VQ array list in String resource. If I choose TFE in spinner-type spinner, I have to choose call_TF array list in String

spinner code is :Spinner spinner_mode = findViewById(R.id.spinner_mode); ArrayAdapter<String> myAdapter_mode = new ArrayAdapter<String>(New.this,android.R.layout.simple_list_item_1,getResources().getStringArray(R.array.call_VQ)); myAdapter_mode.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinner_mode.setAdapter (myAdapter_mode);

I hope I can explain clearly :)

Thanks in advance

Aucun commentaire:

Enregistrer un commentaire