mirror of
https://github.com/Nezumi-2711/Foodify.git
synced 2026-09-22 20:00:50 +00:00
Add order and order detail screen
This commit is contained in:
@@ -15,6 +15,9 @@
|
||||
android:theme="@style/Theme.Foodify"
|
||||
tools:replace="android:theme"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name=".Activity.OrderDetailActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".Activity.OrderActivity"
|
||||
android:exported="false" />
|
||||
|
||||
@@ -4,6 +4,8 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.capstone.foodify.Fragment.Order.ViewPagerAdapter;
|
||||
import com.capstone.foodify.R;
|
||||
@@ -14,14 +16,18 @@ public class OrderActivity extends AppCompatActivity {
|
||||
TabLayout tabLayout;
|
||||
ViewPager2 viewPager2;
|
||||
ViewPagerAdapter viewPagerAdapter;
|
||||
ImageView back_image;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_order);
|
||||
|
||||
//Init Component
|
||||
tabLayout = findViewById(R.id.tab_layout);
|
||||
viewPager2 = findViewById(R.id.view_pager);
|
||||
back_image = findViewById(R.id.back_image);
|
||||
|
||||
viewPagerAdapter = new ViewPagerAdapter(this);
|
||||
viewPager2.setAdapter(viewPagerAdapter);
|
||||
|
||||
@@ -49,5 +55,12 @@ public class OrderActivity extends AppCompatActivity {
|
||||
tabLayout.getTabAt(position).select();
|
||||
}
|
||||
});
|
||||
|
||||
back_image.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
onBackPressed();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.capstone.foodify.Activity;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.capstone.foodify.Model.Order.OrderDetail;
|
||||
import com.capstone.foodify.Model.Order.OrderDetailAdapter;
|
||||
import com.capstone.foodify.R;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class OrderDetailActivity extends AppCompatActivity {
|
||||
|
||||
private TextView order_tracking_number, user_name, phone, address, orderTime, total;
|
||||
private ImageView back_image;
|
||||
public List<OrderDetail> listOrderDetails = new ArrayList<>();
|
||||
OrderDetailAdapter adapter;
|
||||
RecyclerView recyclerView;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_order_detail);
|
||||
|
||||
//Init Component
|
||||
order_tracking_number = findViewById(R.id.order_tracking_number);
|
||||
user_name = findViewById(R.id.user_name);
|
||||
phone = findViewById(R.id.phone);
|
||||
address = findViewById(R.id.address);
|
||||
orderTime = findViewById(R.id.order_time);
|
||||
total = findViewById(R.id.total);
|
||||
adapter = new OrderDetailAdapter();
|
||||
recyclerView = findViewById(R.id.recycler_view_order_detail);
|
||||
back_image = findViewById(R.id.back_image);
|
||||
|
||||
//Init temp data
|
||||
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("HH:mm:ss dd/MM/yyyy");
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
|
||||
int b = (int)(Math.random()*(999999-100000+1)+100000);
|
||||
order_tracking_number.setText("Order Id: #" + b);
|
||||
user_name.setText("Tên: Nguyễn Văn A");
|
||||
phone.setText("0987654321");
|
||||
address.setText("Phạm Như Xương, Hoà Khánh Nam, Liên Chiểu");
|
||||
orderTime.setText(dtf.format(now));
|
||||
total.setText("Tổng: 1.200.000đ");
|
||||
|
||||
for(int i = 0; i < 5; i++){
|
||||
listOrderDetails.add(new OrderDetail());
|
||||
}
|
||||
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this, RecyclerView.VERTICAL, false);
|
||||
recyclerView.setLayoutManager(linearLayoutManager);
|
||||
|
||||
adapter.setData(listOrderDetails);
|
||||
recyclerView.setAdapter(adapter);
|
||||
|
||||
back_image.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
onBackPressed();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -3,19 +3,48 @@ package com.capstone.foodify.Fragment.Order;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.capstone.foodify.Model.Order.Order;
|
||||
import com.capstone.foodify.Model.Order.OrderAdapter;
|
||||
import com.capstone.foodify.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CompleteOrderFragment extends Fragment {
|
||||
|
||||
private List<Order> listOrders = new ArrayList<>();
|
||||
RecyclerView recyclerView;
|
||||
OrderAdapter orderAdapter;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_complete_order, container, false);
|
||||
View view = inflater.inflate(R.layout.fragment_complete_order, container, false);
|
||||
|
||||
//Init Component
|
||||
recyclerView = view.findViewById(R.id.recycler_view_process_order);
|
||||
|
||||
orderAdapter = new OrderAdapter();
|
||||
|
||||
for(int i = 0; i < 5; i++){
|
||||
int b = (int)(Math.random()*(999999-100000+1)+100000);
|
||||
listOrders.add(new Order(String.valueOf(b)));
|
||||
}
|
||||
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext(), RecyclerView.VERTICAL, false);
|
||||
recyclerView.setLayoutManager(linearLayoutManager);
|
||||
|
||||
orderAdapter.setData(listOrders);
|
||||
recyclerView.setAdapter(orderAdapter);
|
||||
return view;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.capstone.foodify.Fragment.Order;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.capstone.foodify.Model.Order.Order;
|
||||
import com.capstone.foodify.Model.Order.OrderAdapter;
|
||||
import com.capstone.foodify.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PreparingFragment extends Fragment {
|
||||
|
||||
private List<Order> listOrders = new ArrayList<>();
|
||||
RecyclerView recyclerView;
|
||||
OrderAdapter orderAdapter;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
View view = inflater.inflate(R.layout.fragment_preparing, container, false);
|
||||
|
||||
//Init Component
|
||||
recyclerView = view.findViewById(R.id.recycler_view_process_order);
|
||||
|
||||
orderAdapter = new OrderAdapter();
|
||||
|
||||
for(int i = 0; i < 5; i++){
|
||||
int b = (int)(Math.random()*(999999-100000+1)+100000);
|
||||
listOrders.add(new Order(String.valueOf(b)));
|
||||
}
|
||||
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext(), RecyclerView.VERTICAL, false);
|
||||
recyclerView.setLayoutManager(linearLayoutManager);
|
||||
|
||||
orderAdapter.setData(listOrders);
|
||||
recyclerView.setAdapter(orderAdapter);
|
||||
return view;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.capstone.foodify.Fragment.Order;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.capstone.foodify.Model.Order.Order;
|
||||
import com.capstone.foodify.Model.Order.OrderAdapter;
|
||||
import com.capstone.foodify.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ProcessOderFragment extends Fragment {
|
||||
|
||||
private List<Order> listOrders = new ArrayList<>();
|
||||
RecyclerView recyclerView;
|
||||
OrderAdapter orderAdapter;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
View view = inflater.inflate(R.layout.fragment_process_order, container, false);
|
||||
|
||||
//Init Component
|
||||
recyclerView = view.findViewById(R.id.recycler_view_process_order);
|
||||
|
||||
orderAdapter = new OrderAdapter();
|
||||
|
||||
for(int i = 0; i < 5; i++){
|
||||
int b = (int)(Math.random()*(999999-100000+1)+100000);
|
||||
listOrders.add(new Order(String.valueOf(b)));
|
||||
}
|
||||
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext(), RecyclerView.VERTICAL, false);
|
||||
recyclerView.setLayoutManager(linearLayoutManager);
|
||||
|
||||
orderAdapter.setData(listOrders);
|
||||
recyclerView.setAdapter(orderAdapter);
|
||||
|
||||
return view;
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.capstone.foodify.Fragment.Order;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.capstone.foodify.R;
|
||||
|
||||
public class ProgressOderFragment extends Fragment {
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_progress_order, container, false);
|
||||
}
|
||||
}
|
||||
@@ -3,19 +3,48 @@ package com.capstone.foodify.Fragment.Order;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.capstone.foodify.Model.Order.Order;
|
||||
import com.capstone.foodify.Model.Order.OrderAdapter;
|
||||
import com.capstone.foodify.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ShipOrderFragment extends Fragment {
|
||||
|
||||
private List<Order> listOrders = new ArrayList<>();
|
||||
RecyclerView recyclerView;
|
||||
OrderAdapter orderAdapter;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_ship_order, container, false);
|
||||
View view = inflater.inflate(R.layout.fragment_ship_order, container, false);
|
||||
|
||||
//Init Component
|
||||
recyclerView = view.findViewById(R.id.recycler_view_process_order);
|
||||
|
||||
orderAdapter = new OrderAdapter();
|
||||
|
||||
for(int i = 0; i < 5; i++){
|
||||
int b = (int)(Math.random()*(999999-100000+1)+100000);
|
||||
listOrders.add(new Order(String.valueOf(b)));
|
||||
}
|
||||
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext(), RecyclerView.VERTICAL, false);
|
||||
recyclerView.setLayoutManager(linearLayoutManager);
|
||||
|
||||
orderAdapter.setData(listOrders);
|
||||
recyclerView.setAdapter(orderAdapter);
|
||||
return view;
|
||||
}
|
||||
}
|
||||
@@ -16,16 +16,18 @@ public class ViewPagerAdapter extends FragmentStateAdapter {
|
||||
public Fragment createFragment(int position) {
|
||||
switch(position){
|
||||
case 1:
|
||||
return new ShipOrderFragment();
|
||||
return new PreparingFragment();
|
||||
case 2:
|
||||
return new ShipOrderFragment();
|
||||
case 3:
|
||||
return new CompleteOrderFragment();
|
||||
default:
|
||||
return new ProgressOderFragment();
|
||||
return new ProcessOderFragment();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return 3;
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.capstone.foodify.Model.Order;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class Order {
|
||||
private int id;
|
||||
private String orderTrackingNumber;
|
||||
private int userId;
|
||||
private int shipperId;
|
||||
private String paymentMethod;
|
||||
private float productCost;
|
||||
private float shippingCost;
|
||||
private float total;
|
||||
private String status;
|
||||
private int address_id;
|
||||
private List<OrderDetail> listOrderDetail;
|
||||
|
||||
public Order(String orderTrackingNumber) {
|
||||
this.orderTrackingNumber = orderTrackingNumber;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getOrderTrackingNumber() {
|
||||
return orderTrackingNumber;
|
||||
}
|
||||
|
||||
public void setOrderTrackingNumber(String orderTrackingNumber) {
|
||||
this.orderTrackingNumber = orderTrackingNumber;
|
||||
}
|
||||
|
||||
public int getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(int userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public int getShipperId() {
|
||||
return shipperId;
|
||||
}
|
||||
|
||||
public void setShipperId(int shipperId) {
|
||||
this.shipperId = shipperId;
|
||||
}
|
||||
|
||||
public String getPaymentMethod() {
|
||||
return paymentMethod;
|
||||
}
|
||||
|
||||
public void setPaymentMethod(String paymentMethod) {
|
||||
this.paymentMethod = paymentMethod;
|
||||
}
|
||||
|
||||
public float getProductCost() {
|
||||
return productCost;
|
||||
}
|
||||
|
||||
public void setProductCost(float productCost) {
|
||||
this.productCost = productCost;
|
||||
}
|
||||
|
||||
public float getShippingCost() {
|
||||
return shippingCost;
|
||||
}
|
||||
|
||||
public void setShippingCost(float shippingCost) {
|
||||
this.shippingCost = shippingCost;
|
||||
}
|
||||
|
||||
public float getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(float total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public int getAddress_id() {
|
||||
return address_id;
|
||||
}
|
||||
|
||||
public void setAddress_id(int address_id) {
|
||||
this.address_id = address_id;
|
||||
}
|
||||
|
||||
public List<OrderDetail> getListOrderDetail() {
|
||||
return listOrderDetail;
|
||||
}
|
||||
|
||||
public void setListOrderDetail(List<OrderDetail> listOrderDetail) {
|
||||
this.listOrderDetail = listOrderDetail;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.capstone.foodify.Model.Order;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.capstone.foodify.Activity.OrderDetailActivity;
|
||||
import com.capstone.foodify.R;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
|
||||
public class OrderAdapter extends RecyclerView.Adapter<OrderAdapter.OrderViewHolder>{
|
||||
|
||||
public List<Order> listOrders;
|
||||
|
||||
public OrderAdapter() {
|
||||
}
|
||||
|
||||
public void setData(List<Order> listOrders){
|
||||
this.listOrders = listOrders;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public OrderViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_order, parent, false);
|
||||
return new OrderViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull OrderViewHolder holder, int position) {
|
||||
Order order = listOrders.get(position);
|
||||
|
||||
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("HH:mm:ss dd/MM/yyyy");
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
|
||||
if(order == null)
|
||||
return;
|
||||
|
||||
holder.order_tracking_number.setText("Order Id: #" + order.getOrderTrackingNumber());
|
||||
holder.user_name.setText("Tên: Nguyễn Văn A");
|
||||
holder.phone.setText("0987654321");
|
||||
holder.address.setText("Phạm Như Xương, Hoà Khánh Nam, Liên Chiểu");
|
||||
holder.orderTime.setText(dtf.format(now));
|
||||
holder.total.setText("Tổng: 1.200.000đ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
if(listOrders != null)
|
||||
return listOrders.size();
|
||||
return 0;
|
||||
}
|
||||
|
||||
public class OrderViewHolder extends RecyclerView.ViewHolder{
|
||||
|
||||
TextView order_tracking_number, user_name, phone, address, orderTime, total;
|
||||
Context context;
|
||||
|
||||
public OrderViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
context = itemView.getContext();
|
||||
|
||||
order_tracking_number = itemView.findViewById(R.id.order_tracking_number);
|
||||
user_name = itemView.findViewById(R.id.user_name);
|
||||
phone = itemView.findViewById(R.id.phone);
|
||||
address = itemView.findViewById(R.id.address);
|
||||
orderTime = itemView.findViewById(R.id.order_time);
|
||||
total = itemView.findViewById(R.id.total);
|
||||
|
||||
itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
context.startActivity(new Intent(context, OrderDetailActivity.class));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.capstone.foodify.Model.Order;
|
||||
|
||||
public class OrderDetail {
|
||||
private int id;
|
||||
private int orderId;
|
||||
private int productId;
|
||||
private String quantity;
|
||||
private float subTotal;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setOrderId(int orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public int getProductId() {
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setProductId(int productId) {
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public float getSubTotal() {
|
||||
return subTotal;
|
||||
}
|
||||
|
||||
public void setSubTotal(float subTotal) {
|
||||
this.subTotal = subTotal;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.capstone.foodify.Model.Order;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.capstone.foodify.R;
|
||||
import com.squareup.picasso.Picasso;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class OrderDetailAdapter extends RecyclerView.Adapter<OrderDetailAdapter.OrderDetailViewHolder>{
|
||||
|
||||
public List<OrderDetail> listOrderDetails;
|
||||
|
||||
public OrderDetailAdapter(){}
|
||||
|
||||
public void setData(List<OrderDetail> listOrderDetails){
|
||||
this.listOrderDetails = listOrderDetails;
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public OrderDetailViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_order_detail, parent, false);
|
||||
return new OrderDetailViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull OrderDetailViewHolder holder, int position) {
|
||||
OrderDetail orderDetail = listOrderDetails.get(position);
|
||||
|
||||
if(orderDetail == null)
|
||||
return;
|
||||
|
||||
Picasso.get().load("https://images.unsplash.com/photo-1546069901-ba9599a7e63c?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxleHBsb3JlLWZlZWR8MXx8fGVufDB8fHx8&w=1000&q=80").into(holder.image_view);
|
||||
holder.food_name.setText("Food Name");
|
||||
holder.shop_name.setText("Shop Name");
|
||||
holder.price.setText("120000 đ");
|
||||
holder.quantity.setText("Số lượng: 2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
if(listOrderDetails != null)
|
||||
return listOrderDetails.size();
|
||||
return 0;
|
||||
}
|
||||
|
||||
public class OrderDetailViewHolder extends RecyclerView.ViewHolder{
|
||||
ImageView image_view;
|
||||
TextView food_name, shop_name, price, quantity;
|
||||
|
||||
public OrderDetailViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
|
||||
//Init Component
|
||||
image_view = itemView.findViewById(R.id.image_view);
|
||||
food_name = itemView.findViewById(R.id.food_name_text_view);
|
||||
shop_name = itemView.findViewById(R.id.shop_name_text_view);
|
||||
price = itemView.findViewById(R.id.price_text_view);
|
||||
quantity = itemView.findViewById(R.id.quantity_text_view);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,16 +6,52 @@
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Activity.OrderActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back_image"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/back_button"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/bebas"
|
||||
android:text="Đơn hàng"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="30sp"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tab_layout"
|
||||
style="@style/MyCustomTabLayout"
|
||||
android:layout_below="@id/header"
|
||||
app:tabIndicatorColor="@color/primaryColor"
|
||||
>
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:text="Đang xử lý"
|
||||
android:text="Xử lý"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:text="Thực hiện"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
@@ -25,7 +61,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:text="Giao thành công"
|
||||
android:text="Đã giao"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Activity.OrderDetailActivity"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back_image"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/back_button"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardElevation="5dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
android:layout_marginTop="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/back_image"
|
||||
android:id="@+id/order_view"
|
||||
>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="10dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/order_tracking_number"
|
||||
android:text="Order #123456789"
|
||||
android:fontFamily="@font/bebas"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="25sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_name"
|
||||
android:text="Tên: Nguyễn Văn A"
|
||||
android:textSize="15sp"
|
||||
android:fontFamily="@font/opensans"
|
||||
android:textStyle="bold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/order_tracking_number"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/phone"
|
||||
android:text="Số điện thoại: 0987654321"
|
||||
android:textSize="15sp"
|
||||
android:fontFamily="@font/opensans"
|
||||
android:textStyle="bold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/user_name"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/address"
|
||||
android:text="Địa chỉ nhận hàng: Hẻm 215, đường Phạm Như Xương, phường Hoà Khánh Nam, quận Liên Chiểu"
|
||||
android:textSize="15sp"
|
||||
android:fontFamily="@font/opensans"
|
||||
android:textStyle="italic"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/phone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/order_time"
|
||||
android:text="Thời gian đặt: 14:05 02/02/2023"
|
||||
android:textSize="15sp"
|
||||
android:fontFamily="@font/opensans"
|
||||
android:textStyle="italic"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/address"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/total"
|
||||
android:text="Tổng đơn hàng: 1.200.000"
|
||||
android:textSize="15sp"
|
||||
android:fontFamily="@font/opensans"
|
||||
android:textStyle="bold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/order_time"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<Button
|
||||
android:id="@+id/cancel_order_button"
|
||||
android:text="Huỷ đơn hàng"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="50dp"
|
||||
android:layout_marginEnd="50dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/order_view"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/line_view"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@color/gray"
|
||||
app:layout_constraintTop_toBottomOf="@id/cancel_order_button"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view_order_detail"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
tools:listitem="@layout/item_order_detail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -31,8 +31,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/logo_image"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:src="@drawable/logo"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Fragment.Order.CompleteOrderFragment">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<TextView
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view_process_order"
|
||||
tools:listitem="@layout/item_order"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="List order have completed!" />
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
</FrameLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Fragment.Order.PreparingFragment">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view_process_order"
|
||||
tools:listitem="@layout/item_order"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:context=".Fragment.Order.ProcessOderFragment">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view_process_order"
|
||||
tools:listitem="@layout/item_order"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Fragment.Order.ProgressOderFragment">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="List order in progress status!" />
|
||||
|
||||
</FrameLayout>
|
||||
@@ -1,14 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Fragment.Order.ShipOrderFragment">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<TextView
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view_process_order"
|
||||
tools:listitem="@layout/item_order"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="List order need to ship!" />
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
</FrameLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardElevation="5dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="10dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/order_tracking_number"
|
||||
android:text="Order #123456789"
|
||||
android:fontFamily="@font/bebas"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="25sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_name"
|
||||
android:text="Tên: Nguyễn Văn A"
|
||||
android:textSize="15sp"
|
||||
android:fontFamily="@font/opensans"
|
||||
android:textStyle="bold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/order_tracking_number"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/phone"
|
||||
android:text="Số điện thoại: 0987654321"
|
||||
android:textSize="15sp"
|
||||
android:fontFamily="@font/opensans"
|
||||
android:textStyle="bold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/user_name"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/address"
|
||||
android:text="Địa chỉ nhận hàng: Hẻm 215, đường Phạm Như Xương, phường Hoà Khánh Nam, quận Liên Chiểu"
|
||||
android:textSize="15sp"
|
||||
android:fontFamily="@font/opensans"
|
||||
android:textStyle="italic"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/phone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/order_time"
|
||||
android:text="Thời gian đặt: 14:05 02/02/2023"
|
||||
android:textSize="15sp"
|
||||
android:fontFamily="@font/opensans"
|
||||
android:textStyle="italic"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/address"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/total"
|
||||
android:text="Tổng đơn hàng: 1.200.000"
|
||||
android:textSize="15sp"
|
||||
android:fontFamily="@font/opensans"
|
||||
android:textStyle="bold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/order_time"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_foreground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:background="@color/white"
|
||||
android:padding="5dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_view"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
android:src="@drawable/food"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_corner_radius="10dip"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/food_name_text_view"
|
||||
android:text="@string/food_name"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/black"
|
||||
android:fontFamily="@font/opensans"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="47dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
app:layout_constraintStart_toEndOf="@id/image_view"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="0.6"
|
||||
android:layout_marginStart="5dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/shop_name_text_view"
|
||||
android:text="Shop Name"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/secondary"
|
||||
android:fontFamily="@font/opensans"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
app:layout_constraintStart_toEndOf="@id/image_view"
|
||||
app:layout_constraintTop_toBottomOf="@id/text_view_1"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/price_text_view"
|
||||
android:text="$5.00"
|
||||
android:textSize="25sp"
|
||||
android:textColor="@color/primaryColor"
|
||||
android:fontFamily="@font/bebas"
|
||||
android:layout_width="220dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/quantity_text_view"
|
||||
android:text="Số lượng: 5"
|
||||
android:fontFamily="@font/opensans"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="0.4"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user