ArrayList<String> gender =new ArrayList<>();
gender.add("**Select Gender**");
gender.add("Male");
gender.add("Female");
gender.add("Other");
ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, gender);
dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
hiringFormBinding.genderspinner.setAdapter(dataAdapter);
0 Comments