Commit f562c45b authored by iman Fauzi's avatar iman Fauzi

fix button redirect to payment

parent 037f62b8
......@@ -18,6 +18,7 @@ import android.view.Window;
import android.view.WindowManager;
import android.widget.Adapter;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Filter;
import android.widget.ImageButton;
import android.widget.TextView;
......@@ -57,6 +58,7 @@ public class CartActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_cart);
Button btnCheckout;
Window w = getWindow();
w.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
......@@ -70,6 +72,7 @@ public class CartActivity extends AppCompatActivity {
recyclerView = findViewById(R.id.rvCart);
cartAdapter = new CartAdapter();
btnCheckout = findViewById(R.id.btCheckout);
LinearLayoutManager llm = new LinearLayoutManager(this);
recyclerView.setLayoutManager(llm);
......@@ -112,7 +115,6 @@ public class CartActivity extends AppCompatActivity {
@Override
public void onCheckout(ProductCartModels productCartModels) {
}
});
......@@ -149,15 +151,14 @@ public class CartActivity extends AppCompatActivity {
// countTotal();
// }
// });
//
// btnCheckout.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// startActivity(new Intent(CartActivity.this, PaymentActivity.class));
// finish();
// }
// });
// }
btnCheckout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(CartActivity.this, PaymentActivity.class));
}
});
}
//
// private void countTotal() {
// int price = prices;
......@@ -175,7 +176,6 @@ public class CartActivity extends AppCompatActivity {
// return NumberFormat.getCurrencyInstance(ID);
// }
}
}
/**
......
......@@ -109,6 +109,8 @@ public class CartAdapter extends RecyclerView.Adapter<CartAdapter.MyViewHolder>
binding.btMinus.setOnClickListener(view -> {
listener.onUpdateQuantityMinus(cartModels);
});
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment