Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCCT-496 || Delivery Progress UI/UX Revisit #2874

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions app/res/drawable/ic_connect_arrow_forward.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="16dp"
android:height="16dp"
android:viewportWidth="16"
android:viewportHeight="16">
<path
android:pathData="M12.627,8.75H0.5V7.25H12.627L6.931,1.554L8,0.5L15.5,8L8,15.5L6.931,14.446L12.627,8.75Z"
android:fillColor="#3A42C7"/>
</vector>
9 changes: 9 additions & 0 deletions app/res/drawable/ic_connect_delivery_approved.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M9,16.17L4.83,12L3.41,13.41L9,19L21,7L19.59,5.59L9,16.17Z"
android:fillColor="#16A085"/>
</vector>
9 changes: 9 additions & 0 deletions app/res/drawable/ic_connect_delivery_check_circle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="13dp"
android:height="13dp"
android:viewportWidth="13"
android:viewportHeight="13">
<path
android:pathData="M5.387,9.169L9.869,4.687L9.167,3.985L5.387,7.764L3.487,5.864L2.785,6.567L5.387,9.169ZM6.334,12.667C5.458,12.667 4.635,12.5 3.864,12.168C3.094,11.836 2.423,11.384 1.853,10.814C1.283,10.245 0.831,9.574 0.499,8.804C0.166,8.034 0,7.21 0,6.334C0,5.458 0.166,4.635 0.499,3.864C0.831,3.094 1.282,2.423 1.852,1.853C2.422,1.283 3.092,0.831 3.863,0.499C4.633,0.166 5.456,0 6.332,0C7.208,0 8.032,0.166 8.802,0.499C9.573,0.831 10.244,1.282 10.814,1.852C11.384,2.422 11.835,3.092 12.168,3.863C12.5,4.633 12.667,5.456 12.667,6.332C12.667,7.208 12.5,8.032 12.168,8.802C11.836,9.573 11.384,10.244 10.814,10.814C10.245,11.384 9.574,11.835 8.804,12.168C8.034,12.5 7.21,12.667 6.334,12.667ZM6.333,11.667C7.822,11.667 9.083,11.15 10.117,10.117C11.15,9.083 11.667,7.822 11.667,6.333C11.667,4.844 11.15,3.583 10.117,2.55C9.083,1.517 7.822,1 6.333,1C4.844,1 3.583,1.517 2.55,2.55C1.517,3.583 1,4.844 1,6.333C1,7.822 1.517,9.083 2.55,10.117C3.583,11.15 4.844,11.667 6.333,11.667Z"
android:fillColor="#3A42C7"/>
</vector>
10 changes: 10 additions & 0 deletions app/res/drawable/ic_connect_delivery_pending.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M11.99,2C6.47,2 2,6.48 2,12C2,17.52 6.47,22 11.99,22C17.52,22 22,17.52 22,12C22,6.48 17.52,2 11.99,2ZM12,20C7.58,20 4,16.42 4,12C4,7.58 7.58,4 12,4C16.42,4 20,7.58 20,12C20,16.42 16.42,20 12,20ZM11,13.07L16.49,16.36L17.51,14.64L13,11.93V6.42H11V13.07Z"
android:fillColor="#9CA3AF"
android:fillType="evenOdd"/>
</vector>
9 changes: 9 additions & 0 deletions app/res/drawable/ic_connect_delivery_rejected.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"
android:fillColor="#EA6944"/>
</vector>
9 changes: 9 additions & 0 deletions app/res/drawable/ic_connect_thumb_up.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="14dp"
android:height="13dp"
android:viewportWidth="14"
android:viewportHeight="13">
<path
android:pathData="M10.154,12.667H3.141V4.667L7.564,0.27L8.128,0.834C8.197,0.903 8.255,0.994 8.301,1.109C8.346,1.223 8.369,1.33 8.369,1.431V1.6L7.661,4.667H12.128C12.445,4.667 12.725,4.788 12.969,5.032C13.212,5.275 13.333,5.555 13.333,5.872V6.949C13.333,7.018 13.324,7.093 13.306,7.173C13.288,7.254 13.268,7.328 13.246,7.398L11.336,11.905C11.24,12.119 11.08,12.299 10.855,12.446C10.63,12.593 10.397,12.667 10.154,12.667ZM4.141,11.667H10.154C10.201,11.667 10.249,11.654 10.298,11.628C10.347,11.603 10.385,11.56 10.41,11.5L12.333,7V5.872C12.333,5.812 12.314,5.763 12.276,5.725C12.237,5.686 12.188,5.667 12.128,5.667H6.398L7.233,2.013L4.141,5.093V11.667ZM3.141,4.667V5.667H1V11.667H3.141V12.667H0V4.667H3.141Z"
android:fillColor="#16A085"/>
</vector>
5 changes: 5 additions & 0 deletions app/res/drawable/shape_connect_delivery_approved.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/connect_light_green" />
</shape>
5 changes: 5 additions & 0 deletions app/res/drawable/shape_connect_delivery_pending.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/connect_light_grey" />
</shape>
5 changes: 5 additions & 0 deletions app/res/drawable/shape_connect_delivery_rejected.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/connect_light_orange_color" />
</shape>
69 changes: 69 additions & 0 deletions app/res/layout/connect_delivery_item.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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="wrap_content"
android:padding="10dp">

<LinearLayout
android:id="@+id/llDeliveryStatus"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/shape_connect_delivery_pending"
android:gravity="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<ImageView
android:id="@+id/imgDeliveryStatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@null"
android:src="@drawable/ic_connect_delivery_pending" />

</LinearLayout>

<org.commcare.views.connect.connecttextview.ConnectMediumTextView
android:id="@+id/delivery_item_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:textSize="14sp"
app:layout_constraintBottom_toTopOf="@+id/delivery_item_reason"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/llDeliveryStatus"
app:layout_constraintTop_toTopOf="parent" />


<org.commcare.views.connect.connecttextview.ConnectBoldTextView
android:id="@+id/delivery_item_reason"
android:layout_width="0dp"
android:layout_marginEnd="8dp"
android:layout_height="wrap_content"
android:textColor="@color/connect_yellowish_orange_color"
android:textSize="12sp"
android:layout_marginTop="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/delivery_item_date"
app:layout_constraintStart_toStartOf="@+id/delivery_item_name"
app:layout_constraintTop_toBottomOf="@+id/delivery_item_name" />


<org.commcare.views.connect.connecttextview.ConnectRegularTextView
android:id="@+id/delivery_item_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="@+id/delivery_item_reason"
app:layout_constraintEnd_toEndOf="parent" />

<org.commcare.views.connect.connecttextview.ConnectRegularTextView
android:id="@+id/delivery_item_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:visibility="gone"
tools:ignore="MissingConstraints" />

</androidx.constraintlayout.widget.ConstraintLayout>
162 changes: 162 additions & 0 deletions app/res/layout/connect_delivery_progress_item.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="15dp"
android:layout_margin="10dp"
android:id="@+id/rootView"
app:cardElevation="10dp">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">

<org.commcare.views.connect.connecttextview.ConnectMediumTextView
android:id="@+id/tvDeliveryTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<LinearLayout
android:id="@+id/linearLayout5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:weightSum="2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvDeliveryTitle">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:orientation="horizontal">

<ImageView
android:layout_width="13dp"
android:layout_height="13dp"
android:contentDescription="@null"
android:src="@drawable/ic_connect_thumb_up" />
</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:orientation="vertical">

<org.commcare.views.connect.connecttextview.ConnectMediumTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Approved"
android:textColor="@color/connect_grey"
android:textSize="11sp" />

<org.commcare.views.connect.connecttextview.ConnectBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/tvApproved"
android:layout_marginTop="3dp"
android:text="10"
android:textColor="@color/connect_green"
android:textSize="12sp" />

<org.commcare.views.connect.connecttextview.ConnectBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:id="@+id/tvDeliveryTotalAmount"
android:text="10,000 MWK"
android:textColor="@color/connect_green"
android:textSize="12sp" />
</LinearLayout>

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal">

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:orientation="horizontal">

<ImageView
android:layout_width="13dp"
android:layout_height="13dp"
android:contentDescription="@null"
android:src="@drawable/ic_connect_delivery_check_circle" />
</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginStart="6dp"
android:orientation="vertical">

<org.commcare.views.connect.connecttextview.ConnectMediumTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Remaining"
android:textColor="@color/connect_grey"
android:textSize="11sp" />

<org.commcare.views.connect.connecttextview.ConnectBoldTextView
android:layout_width="wrap_content"
android:id="@+id/tvRemaining"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_marginTop="3dp"
android:gravity="center_vertical"
android:text="6 in 3 days"
android:textColor="@color/connect_blue_color"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>

<org.commcare.views.connect.LinearProgressBar
android:id="@+id/linearProgressBar"
android:layout_width="0dp"
android:layout_height="8dp"
android:layout_marginTop="10dp"
app:layout_constraintEnd_toStartOf="@+id/guideline2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout5" />

<ImageView
android:layout_width="15dp"
android:id="@+id/imgArrowForward"
android:layout_height="15dp"
android:layout_marginRight="10dp"
android:contentDescription="@null"
android:src="@drawable/ic_connect_arrow_forward"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearProgressBar" />

<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.75" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
1 change: 1 addition & 0 deletions app/res/layout/fragment_connect_delivery_details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
app:layout_constraintTop_toTopOf="@id/connect_delivery_budget_icon" />

<androidx.cardview.widget.CardView
android:id="@+id/cardButtonLayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
Expand Down
Loading