0
In the example image it shows three checkboxes in a line of a listview. But I have to make a way in which, by checking 1 checkbox, uncheck others on the same line that are marked. You have how to do this?
public View getView(int position, View convertView, ViewGroup parent) {
PedidoItem item = itens.get(position);
LayoutInflater inflater = LayoutInflater.from(context);
View view = inflater.inflate(R.layout.item_separacao, null);
TextView referencia = view.findViewById(R.id.txt_ref_sep);
referencia.setText(item.getProduto());
TextView tamanho = view.findViewById(R.id.txt_tam_sep);
tamanho.setText(String.valueOf(item.getTamanho()));
CheckBox separado = view.findViewById(R.id.ch_sep);
CheckBox corrigir = view.findViewById(R.id.ch_corrigir);
CheckBox manual = view.findViewById(R.id.ch_manual);
return view;
}
I tried doing that:
if(corrigir.isChecked()){
separado.setChecked(false);
manual.setChecked(false);
}
if(manual.isChecked()){
separado.setChecked(false);
corrigir.setChecked(false);
}
still does not clear