Fix some layout and bug

This commit is contained in:
Nezumi
2023-03-30 18:02:26 +07:00
parent bedfc013ba
commit 19983d5bd1
12 changed files with 411 additions and 153 deletions
@@ -356,7 +356,7 @@ public class FoodDetailActivity extends AppCompatActivity {
} }
} else if(response.code() == 404){ } else if(response.code() == 404){
//Don't have user comment //Don't have user comment
user_comment_layout.setVisibility(View.INVISIBLE); user_comment_layout.setVisibility(View.GONE);
showUI(); showUI();
} else { } else {
Toast.makeText(FoodDetailActivity.this, "Có lỗi từ hệ thống! Mã lỗi: " + response.code(), Toast.LENGTH_SHORT).show(); Toast.makeText(FoodDetailActivity.this, "Có lỗi từ hệ thống! Mã lỗi: " + response.code(), Toast.LENGTH_SHORT).show();
@@ -689,7 +689,7 @@ public class FoodDetailActivity extends AppCompatActivity {
//Remove layout comment //Remove layout comment
rating_button.setVisibility(View.VISIBLE); rating_button.setVisibility(View.VISIBLE);
user_comment_layout.setVisibility(View.INVISIBLE); user_comment_layout.setVisibility(View.GONE);
//Update information food //Update information food
progressLayout.setVisibility(View.VISIBLE); progressLayout.setVisibility(View.VISIBLE);
@@ -11,6 +11,7 @@ import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
@@ -42,6 +43,7 @@ public class CancelOrderFragment extends Fragment {
NestedScrollView nestedScrollView; NestedScrollView nestedScrollView;
private ProgressBar progressBar; private ProgressBar progressBar;
private TextView endOfListText; private TextView endOfListText;
private LinearLayout empty_layout;
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
@@ -79,6 +81,7 @@ public class CancelOrderFragment extends Fragment {
nestedScrollView = view.findViewById(R.id.root_view); nestedScrollView = view.findViewById(R.id.root_view);
progressBar = view.findViewById(R.id.progress_bar); progressBar = view.findViewById(R.id.progress_bar);
endOfListText = view.findViewById(R.id.end_of_list_text); endOfListText = view.findViewById(R.id.end_of_list_text);
empty_layout = view.findViewById(R.id.empty_layout);
} }
private void getOrderUser(int page){ private void getOrderUser(int page){
@@ -96,6 +99,17 @@ public class CancelOrderFragment extends Fragment {
if(LAST_PAGE) if(LAST_PAGE)
hideProgressBarAndShowEndOfList(); hideProgressBarAndShowEndOfList();
//If don't have order
if(listOrders.size() == 0){
nestedScrollView.setVisibility(View.GONE);
empty_layout.setVisibility(View.VISIBLE);
} else {
nestedScrollView.setVisibility(View.VISIBLE);
empty_layout.setVisibility(View.GONE);
}
orderAdapter.setData(listOrders); orderAdapter.setData(listOrders);
recyclerView.setAdapter(orderAdapter); recyclerView.setAdapter(orderAdapter);
} else { } else {
@@ -11,6 +11,7 @@ import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
@@ -43,6 +44,7 @@ public class CompleteOrderFragment extends Fragment {
NestedScrollView nestedScrollView; NestedScrollView nestedScrollView;
private ProgressBar progressBar; private ProgressBar progressBar;
private TextView endOfListText; private TextView endOfListText;
private LinearLayout empty_layout;
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
@@ -81,6 +83,7 @@ public class CompleteOrderFragment extends Fragment {
nestedScrollView = view.findViewById(R.id.root_view); nestedScrollView = view.findViewById(R.id.root_view);
progressBar = view.findViewById(R.id.progress_bar); progressBar = view.findViewById(R.id.progress_bar);
endOfListText = view.findViewById(R.id.end_of_list_text); endOfListText = view.findViewById(R.id.end_of_list_text);
empty_layout = view.findViewById(R.id.empty_layout);
} }
private void getOrderUser(int page){ private void getOrderUser(int page){
@@ -98,6 +101,17 @@ public class CompleteOrderFragment extends Fragment {
if(LAST_PAGE) if(LAST_PAGE)
hideProgressBarAndShowEndOfList(); hideProgressBarAndShowEndOfList();
//If don't have order
if(listOrders.size() == 0){
nestedScrollView.setVisibility(View.GONE);
empty_layout.setVisibility(View.VISIBLE);
} else {
nestedScrollView.setVisibility(View.VISIBLE);
empty_layout.setVisibility(View.GONE);
}
orderAdapter.setData(listOrders); orderAdapter.setData(listOrders);
recyclerView.setAdapter(orderAdapter); recyclerView.setAdapter(orderAdapter);
} else { } else {
@@ -11,6 +11,7 @@ import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
@@ -42,6 +43,7 @@ public class PreparingFragment extends Fragment {
NestedScrollView nestedScrollView; NestedScrollView nestedScrollView;
private ProgressBar progressBar; private ProgressBar progressBar;
private TextView endOfListText; private TextView endOfListText;
private LinearLayout empty_layout;
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
@@ -80,6 +82,7 @@ public class PreparingFragment extends Fragment {
nestedScrollView = view.findViewById(R.id.root_view); nestedScrollView = view.findViewById(R.id.root_view);
progressBar = view.findViewById(R.id.progress_bar); progressBar = view.findViewById(R.id.progress_bar);
endOfListText = view.findViewById(R.id.end_of_list_text); endOfListText = view.findViewById(R.id.end_of_list_text);
empty_layout = view.findViewById(R.id.empty_layout);
} }
private void getOrderUser(int page){ private void getOrderUser(int page){
@@ -97,6 +100,17 @@ public class PreparingFragment extends Fragment {
if(LAST_PAGE) if(LAST_PAGE)
hideProgressBarAndShowEndOfList(); hideProgressBarAndShowEndOfList();
//If don't have order
if(listOrders.size() == 0){
nestedScrollView.setVisibility(View.GONE);
empty_layout.setVisibility(View.VISIBLE);
} else {
nestedScrollView.setVisibility(View.VISIBLE);
empty_layout.setVisibility(View.GONE);
}
orderAdapter.setData(listOrders); orderAdapter.setData(listOrders);
recyclerView.setAdapter(orderAdapter); recyclerView.setAdapter(orderAdapter);
} else { } else {
@@ -5,6 +5,7 @@ import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.Button; import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
@@ -42,6 +43,7 @@ public class ProcessOderFragment extends Fragment {
NestedScrollView nestedScrollView; NestedScrollView nestedScrollView;
private ProgressBar progressBar; private ProgressBar progressBar;
private TextView endOfListText; private TextView endOfListText;
private LinearLayout empty_layout;
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
@@ -82,6 +84,7 @@ public class ProcessOderFragment extends Fragment {
nestedScrollView = view.findViewById(R.id.root_view); nestedScrollView = view.findViewById(R.id.root_view);
progressBar = view.findViewById(R.id.progress_bar); progressBar = view.findViewById(R.id.progress_bar);
endOfListText = view.findViewById(R.id.end_of_list_text); endOfListText = view.findViewById(R.id.end_of_list_text);
empty_layout = view.findViewById(R.id.empty_layout);
} }
private void getOrderUser(int page){ private void getOrderUser(int page){
@@ -99,6 +102,17 @@ public class ProcessOderFragment extends Fragment {
if(LAST_PAGE) if(LAST_PAGE)
hideProgressBarAndShowEndOfList(); hideProgressBarAndShowEndOfList();
//If don't have order
if(listOrders.size() == 0){
nestedScrollView.setVisibility(View.GONE);
empty_layout.setVisibility(View.VISIBLE);
} else {
nestedScrollView.setVisibility(View.VISIBLE);
empty_layout.setVisibility(View.GONE);
}
orderAdapter.setData(listOrders); orderAdapter.setData(listOrders);
recyclerView.setAdapter(orderAdapter); recyclerView.setAdapter(orderAdapter);
} else { } else {
@@ -11,6 +11,7 @@ import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
@@ -43,6 +44,7 @@ public class ShipOrderFragment extends Fragment {
NestedScrollView nestedScrollView; NestedScrollView nestedScrollView;
private ProgressBar progressBar; private ProgressBar progressBar;
private TextView endOfListText; private TextView endOfListText;
private LinearLayout empty_layout;
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
@@ -80,6 +82,7 @@ public class ShipOrderFragment extends Fragment {
nestedScrollView = view.findViewById(R.id.root_view); nestedScrollView = view.findViewById(R.id.root_view);
progressBar = view.findViewById(R.id.progress_bar); progressBar = view.findViewById(R.id.progress_bar);
endOfListText = view.findViewById(R.id.end_of_list_text); endOfListText = view.findViewById(R.id.end_of_list_text);
empty_layout = view.findViewById(R.id.empty_layout);
} }
private void getOrderUser(int page){ private void getOrderUser(int page){
@@ -97,6 +100,17 @@ public class ShipOrderFragment extends Fragment {
if(LAST_PAGE) if(LAST_PAGE)
hideProgressBarAndShowEndOfList(); hideProgressBarAndShowEndOfList();
//If don't have order
if(listOrders.size() == 0){
nestedScrollView.setVisibility(View.GONE);
empty_layout.setVisibility(View.VISIBLE);
} else {
nestedScrollView.setVisibility(View.VISIBLE);
empty_layout.setVisibility(View.GONE);
}
orderAdapter.setData(listOrders); orderAdapter.setData(listOrders);
recyclerView.setAdapter(orderAdapter); recyclerView.setAdapter(orderAdapter);
} else { } else {
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

@@ -1,47 +1,85 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".Fragment.Order.CancelOrderFragment" tools:context=".Fragment.Order.CancelOrderFragment"
android:id="@+id/root_view"> >
<androidx.constraintlayout.widget.ConstraintLayout <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
<androidx.recyclerview.widget.RecyclerView app:layout_constraintTop_toTopOf="parent"
android:id="@+id/list_order" app:layout_constraintEnd_toEndOf="parent"
tools:listitem="@layout/item_order" android:id="@+id/root_view"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
app:layout_constraintTop_toTopOf="parent"
/>
<ProgressBar <androidx.recyclerview.widget.RecyclerView
android:id="@+id/progress_bar" android:id="@+id/list_order"
android:indeterminateTint="@color/primaryColor" tools:listitem="@layout/item_order"
app:layout_constraintTop_toBottomOf="@id/list_order" android:layout_width="match_parent"
app:layout_constraintStart_toStartOf="parent" android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent"
android:layout_width="wrap_content" />
android:layout_height="wrap_content"
/>
<ProgressBar
android:id="@+id/progress_bar"
android:indeterminateTint="@color/primaryColor"
app:layout_constraintTop_toBottomOf="@id/list_order"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/end_of_list_text"
android:text="End of list"
android:fontFamily="@font/opensans"
android:textColor="@color/grayLight"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@id/progress_bar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
<LinearLayout
android:id="@+id/empty_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:orientation="vertical"
android:visibility="gone"
>
<ImageView
android:src="@drawable/empty_order"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_gravity="center"
/>
<TextView <TextView
android:id="@+id/end_of_list_text"
android:text="End of list"
android:fontFamily="@font/opensans" android:fontFamily="@font/opensans"
android:textColor="@color/grayLight" android:textColor="@color/gray"
android:visibility="gone" android:text="Không có đơn hàng nào ở đây cả!"
app:layout_constraintTop_toBottomOf="@id/progress_bar" android:layout_marginTop="10dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -1,48 +1,85 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".Fragment.Order.CompleteOrderFragment" tools:context=".Fragment.Order.CompleteOrderFragment"
android:id="@+id/root_view"
> >
<androidx.constraintlayout.widget.ConstraintLayout <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
<androidx.recyclerview.widget.RecyclerView app:layout_constraintTop_toTopOf="parent"
android:id="@+id/list_order" app:layout_constraintEnd_toEndOf="parent"
tools:listitem="@layout/item_order" android:id="@+id/root_view"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
app:layout_constraintTop_toTopOf="parent"
/>
<ProgressBar <androidx.recyclerview.widget.RecyclerView
android:id="@+id/progress_bar" android:id="@+id/list_order"
android:indeterminateTint="@color/primaryColor" tools:listitem="@layout/item_order"
app:layout_constraintTop_toBottomOf="@id/list_order" android:layout_width="match_parent"
app:layout_constraintStart_toStartOf="parent" android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent"
android:layout_width="wrap_content" />
android:layout_height="wrap_content"
/>
<ProgressBar
android:id="@+id/progress_bar"
android:indeterminateTint="@color/primaryColor"
app:layout_constraintTop_toBottomOf="@id/list_order"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/end_of_list_text"
android:text="End of list"
android:fontFamily="@font/opensans"
android:textColor="@color/grayLight"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@id/progress_bar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
<LinearLayout
android:id="@+id/empty_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:orientation="vertical"
android:visibility="gone"
>
<ImageView
android:src="@drawable/empty_order"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_gravity="center"
/>
<TextView <TextView
android:id="@+id/end_of_list_text"
android:text="End of list"
android:fontFamily="@font/opensans" android:fontFamily="@font/opensans"
android:textColor="@color/grayLight" android:textColor="@color/gray"
android:visibility="gone" android:text="Không có đơn hàng nào ở đây cả!"
app:layout_constraintTop_toBottomOf="@id/progress_bar" android:layout_marginTop="10dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
+67 -30
View File
@@ -1,48 +1,85 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".Fragment.Order.PreparingFragment" tools:context=".Fragment.Order.PreparingFragment"
android:id="@+id/root_view"
> >
<androidx.constraintlayout.widget.ConstraintLayout <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
<androidx.recyclerview.widget.RecyclerView app:layout_constraintTop_toTopOf="parent"
android:id="@+id/list_order" app:layout_constraintEnd_toEndOf="parent"
tools:listitem="@layout/item_order" android:id="@+id/root_view"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
app:layout_constraintTop_toTopOf="parent"
/>
<ProgressBar <androidx.recyclerview.widget.RecyclerView
android:id="@+id/progress_bar" android:id="@+id/list_order"
android:indeterminateTint="@color/primaryColor" tools:listitem="@layout/item_order"
app:layout_constraintTop_toBottomOf="@id/list_order" android:layout_width="match_parent"
app:layout_constraintStart_toStartOf="parent" android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent"
android:layout_width="wrap_content" />
android:layout_height="wrap_content"
/>
<ProgressBar
android:id="@+id/progress_bar"
android:indeterminateTint="@color/primaryColor"
app:layout_constraintTop_toBottomOf="@id/list_order"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/end_of_list_text"
android:text="End of list"
android:fontFamily="@font/opensans"
android:textColor="@color/grayLight"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@id/progress_bar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
<LinearLayout
android:id="@+id/empty_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:orientation="vertical"
android:visibility="gone"
>
<ImageView
android:src="@drawable/empty_order"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_gravity="center"
/>
<TextView <TextView
android:id="@+id/end_of_list_text"
android:text="End of list"
android:fontFamily="@font/opensans" android:fontFamily="@font/opensans"
android:textColor="@color/grayLight" android:textColor="@color/gray"
android:visibility="gone" android:text="Không có đơn hàng nào ở đây cả!"
app:layout_constraintTop_toBottomOf="@id/progress_bar" android:layout_marginTop="10dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -1,47 +1,85 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".Fragment.Order.ProcessOderFragment" tools:context=".Fragment.Order.ProcessOderFragment"
android:id="@+id/root_view"> >
<androidx.constraintlayout.widget.ConstraintLayout <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
<androidx.recyclerview.widget.RecyclerView app:layout_constraintTop_toTopOf="parent"
android:id="@+id/list_order" app:layout_constraintEnd_toEndOf="parent"
tools:listitem="@layout/item_order" android:id="@+id/root_view"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
app:layout_constraintTop_toTopOf="parent"
/>
<ProgressBar <androidx.recyclerview.widget.RecyclerView
android:id="@+id/progress_bar" android:id="@+id/list_order"
android:indeterminateTint="@color/primaryColor" tools:listitem="@layout/item_order"
app:layout_constraintTop_toBottomOf="@id/list_order" android:layout_width="match_parent"
app:layout_constraintStart_toStartOf="parent" android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent"
android:layout_width="wrap_content" />
android:layout_height="wrap_content"
/>
<ProgressBar
android:id="@+id/progress_bar"
android:indeterminateTint="@color/primaryColor"
app:layout_constraintTop_toBottomOf="@id/list_order"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/end_of_list_text"
android:text="End of list"
android:fontFamily="@font/opensans"
android:textColor="@color/grayLight"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@id/progress_bar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
<LinearLayout
android:id="@+id/empty_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:orientation="vertical"
android:visibility="gone"
>
<ImageView
android:src="@drawable/empty_order"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_gravity="center"
/>
<TextView <TextView
android:id="@+id/end_of_list_text"
android:text="End of list"
android:fontFamily="@font/opensans" android:fontFamily="@font/opensans"
android:textColor="@color/grayLight" android:textColor="@color/gray"
android:visibility="gone" android:text="Không có đơn hàng nào ở đây cả!"
app:layout_constraintTop_toBottomOf="@id/progress_bar" android:layout_marginTop="10dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
+68 -30
View File
@@ -1,47 +1,85 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".Fragment.Order.ShipOrderFragment" tools:context=".Fragment.Order.ShipOrderFragment"
android:id="@+id/root_view"> >
<androidx.constraintlayout.widget.ConstraintLayout <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
<androidx.recyclerview.widget.RecyclerView app:layout_constraintTop_toTopOf="parent"
android:id="@+id/list_order" app:layout_constraintEnd_toEndOf="parent"
tools:listitem="@layout/item_order" android:id="@+id/root_view"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
app:layout_constraintTop_toTopOf="parent"
/>
<ProgressBar <androidx.recyclerview.widget.RecyclerView
android:id="@+id/progress_bar" android:id="@+id/list_order"
android:indeterminateTint="@color/primaryColor" tools:listitem="@layout/item_order"
app:layout_constraintTop_toBottomOf="@id/list_order" android:layout_width="match_parent"
app:layout_constraintStart_toStartOf="parent" android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent"
android:layout_width="wrap_content" />
android:layout_height="wrap_content"
/>
<ProgressBar
android:id="@+id/progress_bar"
android:indeterminateTint="@color/primaryColor"
app:layout_constraintTop_toBottomOf="@id/list_order"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/end_of_list_text"
android:text="End of list"
android:fontFamily="@font/opensans"
android:textColor="@color/grayLight"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@id/progress_bar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
<LinearLayout
android:id="@+id/empty_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:orientation="vertical"
android:visibility="gone"
>
<ImageView
android:src="@drawable/empty_order"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_gravity="center"
/>
<TextView <TextView
android:id="@+id/end_of_list_text"
android:text="End of list"
android:fontFamily="@font/opensans" android:fontFamily="@font/opensans"
android:textColor="@color/grayLight" android:textColor="@color/gray"
android:visibility="gone" android:text="Không có đơn hàng nào ở đây cả!"
app:layout_constraintTop_toBottomOf="@id/progress_bar" android:layout_marginTop="10dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>