Showing
2 changed files
with
3 additions
and
3 deletions
| ... | @@ -211,13 +211,13 @@ public class UnifiedCouponInfoActivity extends Activity implements View.OnClickL | ... | @@ -211,13 +211,13 @@ public class UnifiedCouponInfoActivity extends Activity implements View.OnClickL |
| 211 | // mTvActiveValue.setText(HtmlCompat.fromHtml(String.format(getString(R.string.cos_unified_subtitle), String.valueOf(activeValue)), HtmlCompat.FROM_HTML_MODE_COMPACT)); | 211 | // mTvActiveValue.setText(HtmlCompat.fromHtml(String.format(getString(R.string.cos_unified_subtitle), String.valueOf(activeValue)), HtmlCompat.FROM_HTML_MODE_COMPACT)); |
| 212 | mTvActiveValue.setText(getString(R.string.cos_unified_subtitle2)); | 212 | mTvActiveValue.setText(getString(R.string.cos_unified_subtitle2)); |
| 213 | 213 | ||
| 214 | - Collections.sort(cpnlist, (coupon1, coupon2) -> coupon1.getExpirationDate().compareTo(coupon2.getExpirationDate())); | 214 | + Collections.sort(cpnlist, (coupon1, coupon2) -> coupon2.getExpirationDate().compareTo(coupon1.getExpirationDate())); |
| 215 | for (Coupon tempItem : cpnlist) { | 215 | for (Coupon tempItem : cpnlist) { |
| 216 | if (tempItem.getStatus() == 1) { | 216 | if (tempItem.getStatus() == 1) { |
| 217 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm"); | 217 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm"); |
| 218 | Date newDate = new Date(); | 218 | Date newDate = new Date(); |
| 219 | try { | 219 | try { |
| 220 | - newDate = simpleDateFormat.parse(cpnlist.get(0).getExpiration()); | 220 | + newDate = simpleDateFormat.parse(tempItem.getExpiration()); |
| 221 | } catch (ParseException e) { | 221 | } catch (ParseException e) { |
| 222 | e.printStackTrace(); | 222 | e.printStackTrace(); |
| 223 | } | 223 | } | ... | ... |
| ... | @@ -109,7 +109,7 @@ public class MarketCouponAdapter extends RecyclerView.Adapter<MarketCouponAdapte | ... | @@ -109,7 +109,7 @@ public class MarketCouponAdapter extends RecyclerView.Adapter<MarketCouponAdapte |
| 109 | } | 109 | } |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | - Collections.sort(couponList, (coupon1, coupon2) -> coupon1.getExpirationDate().compareTo(coupon2.getExpirationDate())); | 112 | + Collections.sort(couponList, (coupon1, coupon2) -> coupon2.getExpirationDate().compareTo(coupon1.getExpirationDate())); |
| 113 | 113 | ||
| 114 | if (couponList != null && couponList.size() > 0) { | 114 | if (couponList != null && couponList.size() > 0) { |
| 115 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); | 115 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); | ... | ... |
-
Please register or login to post a comment