Coupon layout updated
This commit is contained in:
@@ -34,13 +34,9 @@ public class CouponAdapter extends RecyclerView.Adapter<CouponAdapter.CouponView
|
|||||||
itemView.setOnClickListener(this);
|
itemView.setOnClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTextViewCode(String text){
|
|
||||||
this.couponCode = itemView.findViewById(R.id.coupon_code);
|
|
||||||
this.couponCode.setText(text);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTextViewReward(String text){
|
public void setTextViewName(String text){
|
||||||
this.couponReward = itemView.findViewById(R.id.coupon_waarde);
|
this.couponReward = itemView.findViewById(R.id.coupon_name);
|
||||||
this.couponReward.setText(text);
|
this.couponReward.setText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,8 +63,7 @@ public class CouponAdapter extends RecyclerView.Adapter<CouponAdapter.CouponView
|
|||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull CouponViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull CouponViewHolder holder, int position) {
|
||||||
Coupon coupon = couponList.get(position);
|
Coupon coupon = couponList.get(position);
|
||||||
holder.setTextViewCode(coupon.getCode());
|
holder.setTextViewName(coupon.getReward());
|
||||||
holder.setTextViewReward(coupon.getReward());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
android:layout_marginHorizontal="20dp"
|
android:layout_marginHorizontal="20dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:background="@color/secondaryColour"
|
|
||||||
|
|
||||||
|
android:background="@color/secondaryColour"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.4"
|
app:layout_constraintHorizontal_bias="0.4"
|
||||||
@@ -20,38 +20,16 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/coupon_code"
|
android:id="@+id/coupon_name"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Code"
|
|
||||||
android:textColor="@color/black"
|
|
||||||
android:textSize="20sp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="@id/Balk"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/Balk"
|
|
||||||
android:layout_width="1dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="@color/black"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/coupon_waarde"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="200dp"
|
android:layout_marginStart="20dp"
|
||||||
android:text="Waarde"
|
android:text="Naam"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="@id/Balk"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user