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){
//Don't have user comment
user_comment_layout.setVisibility(View.INVISIBLE);
user_comment_layout.setVisibility(View.GONE);
showUI();
} else {
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
rating_button.setVisibility(View.VISIBLE);
user_comment_layout.setVisibility(View.INVISIBLE);
user_comment_layout.setVisibility(View.GONE);
//Update information food
progressLayout.setVisibility(View.VISIBLE);
@@ -11,6 +11,7 @@ import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
@@ -42,6 +43,7 @@ public class CancelOrderFragment extends Fragment {
NestedScrollView nestedScrollView;
private ProgressBar progressBar;
private TextView endOfListText;
private LinearLayout empty_layout;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
@@ -79,6 +81,7 @@ public class CancelOrderFragment extends Fragment {
nestedScrollView = view.findViewById(R.id.root_view);
progressBar = view.findViewById(R.id.progress_bar);
endOfListText = view.findViewById(R.id.end_of_list_text);
empty_layout = view.findViewById(R.id.empty_layout);
}
private void getOrderUser(int page){
@@ -96,6 +99,17 @@ public class CancelOrderFragment extends Fragment {
if(LAST_PAGE)
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);
recyclerView.setAdapter(orderAdapter);
} else {
@@ -11,6 +11,7 @@ import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
@@ -43,6 +44,7 @@ public class CompleteOrderFragment extends Fragment {
NestedScrollView nestedScrollView;
private ProgressBar progressBar;
private TextView endOfListText;
private LinearLayout empty_layout;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
@@ -81,6 +83,7 @@ public class CompleteOrderFragment extends Fragment {
nestedScrollView = view.findViewById(R.id.root_view);
progressBar = view.findViewById(R.id.progress_bar);
endOfListText = view.findViewById(R.id.end_of_list_text);
empty_layout = view.findViewById(R.id.empty_layout);
}
private void getOrderUser(int page){
@@ -98,6 +101,17 @@ public class CompleteOrderFragment extends Fragment {
if(LAST_PAGE)
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);
recyclerView.setAdapter(orderAdapter);
} else {
@@ -11,6 +11,7 @@ import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
@@ -42,6 +43,7 @@ public class PreparingFragment extends Fragment {
NestedScrollView nestedScrollView;
private ProgressBar progressBar;
private TextView endOfListText;
private LinearLayout empty_layout;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
@@ -80,6 +82,7 @@ public class PreparingFragment extends Fragment {
nestedScrollView = view.findViewById(R.id.root_view);
progressBar = view.findViewById(R.id.progress_bar);
endOfListText = view.findViewById(R.id.end_of_list_text);
empty_layout = view.findViewById(R.id.empty_layout);
}
private void getOrderUser(int page){
@@ -97,6 +100,17 @@ public class PreparingFragment extends Fragment {
if(LAST_PAGE)
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);
recyclerView.setAdapter(orderAdapter);
} else {
@@ -5,6 +5,7 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
@@ -42,6 +43,7 @@ public class ProcessOderFragment extends Fragment {
NestedScrollView nestedScrollView;
private ProgressBar progressBar;
private TextView endOfListText;
private LinearLayout empty_layout;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
@@ -82,6 +84,7 @@ public class ProcessOderFragment extends Fragment {
nestedScrollView = view.findViewById(R.id.root_view);
progressBar = view.findViewById(R.id.progress_bar);
endOfListText = view.findViewById(R.id.end_of_list_text);
empty_layout = view.findViewById(R.id.empty_layout);
}
private void getOrderUser(int page){
@@ -99,6 +102,17 @@ public class ProcessOderFragment extends Fragment {
if(LAST_PAGE)
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);
recyclerView.setAdapter(orderAdapter);
} else {
@@ -11,6 +11,7 @@ import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
@@ -43,6 +44,7 @@ public class ShipOrderFragment extends Fragment {
NestedScrollView nestedScrollView;
private ProgressBar progressBar;
private TextView endOfListText;
private LinearLayout empty_layout;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
@@ -80,6 +82,7 @@ public class ShipOrderFragment extends Fragment {
nestedScrollView = view.findViewById(R.id.root_view);
progressBar = view.findViewById(R.id.progress_bar);
endOfListText = view.findViewById(R.id.end_of_list_text);
empty_layout = view.findViewById(R.id.empty_layout);
}
private void getOrderUser(int page){
@@ -97,6 +100,17 @@ public class ShipOrderFragment extends Fragment {
if(LAST_PAGE)
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);
recyclerView.setAdapter(orderAdapter);
} else {
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

@@ -1,47 +1,85 @@
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
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_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list_order"
tools:listitem="@layout/item_order"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:id="@+id/root_view"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
/>
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"
/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list_order"
tools:listitem="@layout/item_order"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
/>
<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
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:textColor="@color/gray"
android:text="Không có đơn hàng nào ở đây cả!"
android:layout_marginTop="10dp"
android:layout_width="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"?>
<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"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
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_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list_order"
tools:listitem="@layout/item_order"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:id="@+id/root_view"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
/>
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"
/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list_order"
tools:listitem="@layout/item_order"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
/>
<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
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:textColor="@color/gray"
android:text="Không có đơn hàng nào ở đây cả!"
android:layout_marginTop="10dp"
android:layout_width="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"?>
<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"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
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_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list_order"
tools:listitem="@layout/item_order"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:id="@+id/root_view"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
/>
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"
/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list_order"
tools:listitem="@layout/item_order"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
/>
<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
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:textColor="@color/gray"
android:text="Không có đơn hàng nào ở đây cả!"
android:layout_marginTop="10dp"
android:layout_width="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"?>
<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"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
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_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list_order"
tools:listitem="@layout/item_order"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:id="@+id/root_view"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
/>
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"
/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list_order"
tools:listitem="@layout/item_order"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
/>
<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
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:textColor="@color/gray"
android:text="Không có đơn hàng nào ở đây cả!"
android:layout_marginTop="10dp"
android:layout_width="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"?>
<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"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
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_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list_order"
tools:listitem="@layout/item_order"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:id="@+id/root_view"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
/>
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"
/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list_order"
tools:listitem="@layout/item_order"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
/>
<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
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:textColor="@color/gray"
android:text="Không có đơn hàng nào ở đây cả!"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>