I need to create a dynamic list, I do not quite understand how it does, some people told me it's done with adapter
and so I'm trying to do it.
According to break point my data is arriving perfectly, and all of it is being set correctly in my Entity.
First I call a successful function of the JSON response, and as I said, in it I'm sure it's done correctly, I programmed it as follows:
private void sucessoResposta(String json) {
Comentarios comentariosRetorno = null;
try {
comentariosRetorno = JSONParser.parseComentarios(json);
lstComentarios = comentariosRetorno.getComentarios();
configurarAdapter();
} catch (Exception e) {
MessageUtil.showError(getApplication(), R.string.erro_desconhecido);
}
}
In function configurarAdapter()
I do this:
private void configurarAdapter() {
adapter = new GenericAdapter<>(getParent(), lstComentarios,R.layout.item_comentario);
adapter.setOnGetViewEvent(this);
lisComentarios.setAdapter(adapter);
lisComentarios.setEmptyView(lytEmptyComentarios);
}
When I am debugando
the code it stops on the first line after private void
I had to implement the class onGetView
but within it I did not add anything inside it like this:
@Override
public void onGetView(Comentarios item, View view, boolean isNewView, int position) {
}