mirror of
https://github.com/Nezumi-2711/PRM392.git
synced 2026-09-22 13:48:29 +00:00
Fix Server App
This commit is contained in:
@@ -40,16 +40,18 @@ public class OrderDetail extends AppCompatActivity {
|
||||
order_id_value = getIntent().getStringExtra("OrderId");
|
||||
|
||||
//Set value
|
||||
order_id.setText(order_id_value);
|
||||
order_phone.setText(Common.currentRequest.getPhone());
|
||||
order_total.setText(Common.currentRequest.getTotal());
|
||||
order_address.setText(Common.currentRequest.getAddress());
|
||||
order_comment.setText(Common.currentRequest.getComment());
|
||||
order_id.setText("Mã đơn hàng: #" + order_id_value);
|
||||
order_phone.setText("Số điện thoại: " + Common.currentRequest.getPhone());
|
||||
order_total.setText("Tổng cộng: " + Common.currentRequest.getTotal());
|
||||
order_address.setText("Địa chỉ giao: " + Common.currentRequest.getAddress());
|
||||
order_comment.setText("Ghi chú: " + Common.currentRequest.getComment());
|
||||
|
||||
OrderDetailAdapter adapter = new OrderDetailAdapter(Common.currentRequest.getFoods());
|
||||
adapter.notifyDataSetChanged();
|
||||
lstFoods.setAdapter(adapter);
|
||||
|
||||
setTitle("Chi tiết đơn");
|
||||
|
||||
// calling the action bar
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
|
||||
|
||||
+4
-4
@@ -45,10 +45,10 @@ public class OrderDetailAdapter extends RecyclerView.Adapter<MyViewHolder>{
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
|
||||
Order order = myOrders.get(position);
|
||||
holder.name.setText(String.format("Name: %s", order.getProductName()));
|
||||
holder.quantity.setText(String.format("Quantity: %s", order.getQuantity()));
|
||||
holder.price.setText(String.format("Price: %s", order.getPrice()));
|
||||
holder.discount.setText(String.format("Discount: %s", order.getDiscount()));
|
||||
holder.name.setText(String.format("Tên món ăn: %s", order.getProductName()));
|
||||
holder.quantity.setText(String.format("Số lượng: %s", order.getQuantity()));
|
||||
holder.price.setText(String.format("Giá: %s", order.getPrice()));
|
||||
holder.discount.setText("Giảm giá: " + order.getDiscount() + "%");
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user