@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.button2:
Intent intent = new Intent(this, Korzina.class);
startActivity(intent);
break;
case R.id.button:
Intent intentcold = new Intent(this, Cold.class);
startActivity(intentcold);
break;
default:
break;
}
}
startActivity(intent);
finish();
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);