I have visited How to update RecyclerView Adapter Data?
There is a list of providers on the signup page all the providers are coming from an API of providers. there is an array list named providers there is also a spinner item named signupspinner2 and a String variable listType. this is the chunk of code
signuppageText6.setText("Providers");
listType="PROVIDERS";
signuppageSpinner2.setAdapter(new ArrayAdapter<String>
(SignUp.this,android.R.layout.simple_spinner_dropdown_item,providers));
signuppageSpinner2.setOnItemSelectedListener(SignUp.this);
signuppageSignUpButton.setClickable(true);
Log.i("providers",providers.toString());
now the problem is the data in my array adapter is repeating and which it should not be. I know the best possible thing I can do is to update the adapter values and the command is:
adapter.notifyDataSetChanged();
but since this is not my code I am a bit confused about what could be done if someone could help me I would be grateful.