I could not find the error.
My activity:
private AdapterPacientes adapterPacientes;
private static MVP.Presenter presenter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_lista_pacientes);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
if (presenter == null)
presenter = new Presenter();
presenter.setActivity(this);
presenter.retrivePacientes( savedInstanceState );
}
@Override
protected void onStart() {
super.onStart();
RecyclerView lista = (RecyclerView) findViewById(R.id.list);
lista.setHasFixedSize(true);
adapterPacientes = new AdapterPacientes(presenter.getPacientes());
lista.setAdapter(adapterPacientes);
}
@Override
public void onSaveInstanceState(Bundle outState) {
outState.putParcelableArrayList(KEY_PACIENTE, presenter.getPacientes());
super.onSaveInstanceState(outState);
}
@Override
public void refreshAdapter() {
adapterPacientes.notifyDataSetChanged();
}
// ...
error that appears in the log
I've been searching for more than two hours but I do not think ... The code structure is in the MVP pattern.
Data is being brought in and arraylist
is being populated correctly.
Thank you very much.