Galera is able to capture the selected RadioButon to save in the bank, I need to capture the radio button in 3 methods, these 2 radiobutons are in a RadioGroup, the radioButton is the type.
private Adicionar setAdicionar(Cursor cursor) {
Adicionar adicionar = new Adicionar();
adicionar.setId(cursor.getInt(cursor.getColumnIndex("_id")));
adicionar.setValor(cursor.getString(cursor.getColumnIndex("valor")));
adicionar.setTipo(cursor.getString(cursor.getColumnIndex("tipo")));
adicionar.setCategoria(cursor.getString(cursor.getColumnIndex("categoria")));
adicionar.setData(cursor.getString(cursor.getColumnIndex("data")));
adicionar.setDescricao(cursor.getString(cursor.getColumnIndex("descricao")));
return adicionar;
}
}
And here too I need to get the selected one
private Adicionar lerDadosDoForm(Adicionar adicionar) {
adicionar.setValor(txtValor.getText().toString());
adicionar.setCategoria(edtCategoria.getText().toString());
adicionar.setData(edtData.getText().toString());
adicionar.setDescricao(edtDescricao.getText().toString());
adicionar.setTipo(rdbGasto.getText().toString());
return adicionar;
}