To get the value of the checkbox, you check if it is checked and assigns a reference value, eg: [x] Beer:
String valores;
if(cerveja.isChecked()){
valores += "1";
}
So if you have another check you will add the values, but then you say: As this 1 can identify which beer was marked, as it has more checkbox the string can be: values="12354"; then as each value represents an item, you do:
//Isso aqui na outra activity
if(valores.contais("1")){
//cerveja tava marcado
}
But if you want to get the checkbox text you do:
String valor = checkbox.getText().toString();
To pass values between activities you use this:
Intent it = new Intent(context, proximaAcitivy.class);
//Cada chave deve ser unica
it.putExtra("chave", valor);
startActivity(it);
In the other activity to recover you do:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Intent intent = getIntent();
String text = intent.getStringExtra("chave");
}
On the prices, every checkbox is checked, you save the values and move to another activity and sum to the next value, make the next msm until you reach the last