Commit 943b2d76 authored by Ahmad Abi Mulya's avatar Ahmad Abi Mulya

fix cart layout

parent c91ca33f
......@@ -60,7 +60,7 @@ public class PaymentActivity extends AppCompatActivity {
public void btnPay(View view) {
if (TextUtils.isEmpty(binding.etAmountPaid.getText().toString())){
ViewUtil.showMessage(view, "Amount paid not empty");
ViewUtil.showMessage(view, "Please input Amount Paid by Customer!");
}else {
int amountPaid = Integer.parseInt(binding.etAmountPaid.getText().toString());
refund = amountPaid - amount;
......
......@@ -39,7 +39,7 @@
<TextView
android:id="@+id/cart"
android:layout_width="134dp"
android:layout_width="50dp"
android:layout_height="36dp"
android:gravity="top"
android:text="@string/cart"
......@@ -64,21 +64,21 @@
<View
android:id="@+id/amount"
android:layout_width="100dp"
android:layout_height="50dp"
android:layout_width="150dp"
android:layout_height="60dp"
android:layout_marginTop="72dp"
android:layout_marginEnd="20dp"
android:background="@drawable/rectangle_1"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="62dp"
android:layout_marginEnd="52dp"
app:layout_constraintStart_toEndOf="@+id/items"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvTotalPrice"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_height="wrap_content"
android:gravity="top"
android:textColor="#fff"
android:textSize="20sp"
android:textAppearance="@style/some_id"
app:layout_constraintBottom_toBottomOf="@+id/amount"
app:layout_constraintEnd_toEndOf="@+id/amount"
......
......@@ -58,16 +58,17 @@
android:layout_width="match_parent"
android:layout_height="100dp"
android:paddingVertical="5dp">
<ImageView
android:id="@+id/iv_cash"
android:layout_width="200dp"
android:layout_width="150dp"
android:layout_height="0dp"
android:layout_marginStart="4dp"
android:src="@drawable/ic_undraw_wallet"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.466"
tools:layout_editor_absoluteX="117dp" />
app:layout_constraintVertical_bias="1.0" />
<CheckBox
android:id="@+id/cbCash"
......@@ -102,14 +103,12 @@
<ImageView
android:id="@+id/iv_card"
android:layout_width="200dp"
android:layout_width="150dp"
android:layout_height="0dp"
android:src="@drawable/ic_undraw_credit_card"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.466"
tools:layout_editor_absoluteX="117dp" />
app:layout_constraintTop_toTopOf="parent" />
<CheckBox
android:id="@+id/cbCard"
......
......@@ -19,11 +19,12 @@
</data>
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_margin="5dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="130dp">
<!-- Burger Medium -->
......@@ -31,7 +32,8 @@
<ImageView
android:id="@+id/imageView"
android:layout_width="107dp"
android:layout_height="110dp"
android:layout_height="match_parent"
android:layout_margin="5dp"
app:file="@{cartProduct.image}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
......@@ -61,6 +63,7 @@
android:id="@+id/some_id"
android:layout_width="82dp"
android:layout_height="23dp"
android:layout_margin="5dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:gravity="top"
......@@ -75,7 +78,7 @@
<View
android:id="@+id/v_add"
android:layout_width="78dp"
android:layout_width="90dp"
android:layout_height="40dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
......@@ -115,7 +118,7 @@
<TextView
android:id="@+id/tv_qty"
android:layout_width="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{cartProduct.qty + ``}"
app:layout_constraintBottom_toBottomOf="@+id/v_add"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment