public void addFormaPagamento() {
btnAdd.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
boolean isInsertForma = dbApp.insertFormaPagamento(
spnForma.getSelectedItemPosition(),
spnParcelas.getSelectedItem().toString(),
edtvalor.getText().toString()
);
if (isInsertForma == true) {
verifica_Add_Forma += 1;
Toast.makeText(ActDetalheCheckout.this, "Forma de Pagamento Inserida com Sucesso", Toast.LENGTH_LONG).show();
} else {
Toast.makeText(ActDetalheCheckout.this, "Falha os Inserir Forma de pagamento", Toast.LENGTH_LONG).show();
}
}
});
}
You're giving this line an error:
boolean isInsertForma = dbApp.insertFormaPagamento(
Error presented:
FATAL EXCEPTION: maijava.lang.NullPointerException
at app.teste1.ActDetalheCheckout$1.onClick(ActDetalheCheckout.java:65