spinner add items code example
Example: how to set list data to android spinner
// setting branch data in manually and load to spBranchName
List branchList = new ArrayList<>();
branchList.add("CHITTAGONG");
branchList.add("DHAKA");
ArrayAdapter branchListAdapter = new ArrayAdapter<>(getActivity(),
android.R.layout.simple_spinner_item, branchList);
branchListAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spBranchName.setAdapter(branchListAdapter);