voucher fixes

This commit is contained in:
2020-08-15 11:49:29 +03:00
parent 74dae33e40
commit f7c1ec6764
4 changed files with 19 additions and 9 deletions

Binary file not shown.

View File

@@ -299,14 +299,24 @@ public class ProfileFragment extends BaseFragment {
} }
private void initPersonalCouponCodesRecyclerView(ArrayList<PersonalCouponModel> personalCouponList){ private void initPersonalCouponCodesRecyclerView(ArrayList<PersonalCouponModel> personalCouponList){
if(personalCouponList == null || personalCouponList.isEmpty()){ if(personalCouponList == null || personalCouponList.isEmpty()){
personalCouponCodesTextView.setVisibility(View.GONE); personalCouponCodesTextView.setVisibility(View.GONE);
personalCouponCodesRecyclerView.setVisibility(View.GONE); personalCouponCodesRecyclerView.setVisibility(View.GONE);
return; return;
} }
ArrayList<PersonalCouponModel> filteredPersonalCouponList = new ArrayList<>();
for(PersonalCouponModel personalCouponModel: personalCouponList){
if(filteredPersonalCouponList.size() == 10){
break;
}
filteredPersonalCouponList.add(personalCouponModel);
}
personalCouponCodesTextView.setVisibility(View.VISIBLE); personalCouponCodesTextView.setVisibility(View.VISIBLE);
personalCouponCodesRecyclerView.setVisibility(View.VISIBLE); personalCouponCodesRecyclerView.setVisibility(View.VISIBLE);
personalCouponCodesRecyclerAdapter = new PersonalCouponCodesRecyclerAdapter(BaseActivity.currentActivity, personalCouponList); personalCouponCodesRecyclerAdapter = new PersonalCouponCodesRecyclerAdapter(BaseActivity.currentActivity, filteredPersonalCouponList);
personalCouponCodesRecyclerView.setLayoutManager(new LinearLayoutManager(BaseActivity.currentActivity)); personalCouponCodesRecyclerView.setLayoutManager(new LinearLayoutManager(BaseActivity.currentActivity));
personalCouponCodesRecyclerView.setNestedScrollingEnabled(false); personalCouponCodesRecyclerView.setNestedScrollingEnabled(false);
personalCouponCodesRecyclerView.setAdapter(personalCouponCodesRecyclerAdapter); personalCouponCodesRecyclerView.setAdapter(personalCouponCodesRecyclerAdapter);

View File

@@ -25,7 +25,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
fontPath="fonts/Quicksand-Regular.ttf" fontPath="fonts/Quicksand-Regular.ttf"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="12sp" android:textSize="10sp"
android:text="@string/voucher_code"/> android:text="@string/voucher_code"/>
<TextView <TextView
@@ -50,7 +50,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
fontPath="fonts/Quicksand-Regular.ttf" fontPath="fonts/Quicksand-Regular.ttf"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="12sp" android:textSize="10sp"
android:text="@string/voucher_total_amount"/> android:text="@string/voucher_total_amount"/>
<TextView <TextView
@@ -75,7 +75,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
fontPath="fonts/Quicksand-Regular.ttf" fontPath="fonts/Quicksand-Regular.ttf"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="12sp" android:textSize="10sp"
android:text="@string/voucher_remaining_amount"/> android:text="@string/voucher_remaining_amount"/>
<TextView <TextView
@@ -100,7 +100,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
fontPath="fonts/Quicksand-Regular.ttf" fontPath="fonts/Quicksand-Regular.ttf"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="12sp" android:textSize="10sp"
android:text="@string/voucher_remaining_status"/> android:text="@string/voucher_remaining_status"/>
<TextView <TextView

View File

@@ -223,11 +223,11 @@
<string name="change_post_code">Postleitzahl Ändern</string>     <string name="change_post_code">Postleitzahl Ändern</string>    
<string name="alert_logout">Möchten Sie sich abmelden?</string> <string name="alert_logout">Möchten Sie sich abmelden?</string>
<string name="button_logout">Abmelden</string>  <string name="button_logout">Abmelden</string> 
<string name="vouchers_title">VOUCHERS</string>  <string name="vouchers_title">GUTSCHEINE</string> 
<string name="voucher_code">Code:</string>  <string name="voucher_code">Code:</string> 
<string name="voucher_total_amount">Total:</string>  <string name="voucher_total_amount">Belastet:</string> 
<string name="voucher_remaining_amount">Remaining:</string>  <string name="voucher_remaining_amount">Restguthaben:</string> 
<string name="voucher_remaining_status">Active:</string>  <string name="voucher_remaining_status">Aktiv:</string> 
<!-- ProfileFragment--> <!-- ProfileFragment-->
<!-- UpdateProfilectivity--> <!-- UpdateProfilectivity-->