Method:
spnCondPagamento.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
List listaCondPagamento = new ArrayList<>();
for (int i = 0; i < condPagDao.getListaCondPagamento().size(); i++) {
listaCondPagamento.add(condPagDao.getListaCondPagamento().get(i).getDescricao());
listaIdCondPag.add(condPagDao.getListaCondPagamento().get(i).getId());
}
ArrayAdapter condPagAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, listaCondPagamento);
condPagAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);
spnCondPagamento.setAdapter(condPagAdapter);
}
});
The problem is that it is showing erro
:
ArrayAdapter condPagAdapter = new ArrayAdapter