display store and note on card summary view

Dutch translation provided by PanderMusubi

Related issues:
https://github.com/brarcher/loyalty-card-locker/issues/23
https://github.com/brarcher/loyalty-card-locker/issues/24
This commit is contained in:
Branden Archer
2016-04-09 22:11:20 -04:00
parent f6f749de1c
commit e0a77e9628
6 changed files with 35 additions and 3 deletions

View File

@@ -36,7 +36,14 @@ class LoyaltyCardCursorAdapter extends CursorAdapter
LoyaltyCard loyaltyCard = LoyaltyCard.toLoyaltyCard(cursor);
// Populate fields with extracted properties
storeField.setText(loyaltyCard.store);
String storeAndNote = loyaltyCard.store;
if(loyaltyCard.note.isEmpty() == false)
{
String storeNameAndNoteFormat = view.getResources().getString(R.string.storeNameAndNoteFormat);
storeAndNote = String.format(storeNameAndNoteFormat, loyaltyCard.store, loyaltyCard.note);
}
storeField.setText(storeAndNote);
String cardIdFormat = view.getResources().getString(R.string.cardIdFormat);
String cardIdLabel = view.getResources().getString(R.string.cardId);