Как решить Когда я вернусь, получим дубликаты данных Android Spinner, это ниже моего кода.
List<IrrigationMasterMainDb> mIrrigationList;
mIrrigationList = AppUtils.getIrrigationDb();
private void irratypeadapter() {
mIrrigationList.clear();
IrrigationMasterMainDb irrdb = new IrrigationMasterMainDb();
irrdb.setName("");
mIrrigationList.add(irrdb);
mIdList = AppUtils.getIrrigationDb();
for (int i = 0; i < mIdList.size(); i++) {
mIrrigationList.add(mIdList.get(i));
}
SpinnerAfdapterIrrigation factoryAdapter = new SpinnerAfdapterIrrigation(getActivity().getApplicationContext(), mIrrigationList);
mIrrigationType.setAdapter(factoryAdapter);
}