|
|
@@ -37,16 +37,19 @@ public class MyCoinDetailItemViewHolder extends MyCoinDetailViewHolder {
|
|
|
|
|
|
@Override
|
|
|
public void bind(CoinInfoBean bean, IEventListener listener) {
|
|
|
- boolean isMinus = LifeplusData.isTrue(bean.getDecreasing());
|
|
|
- textViewCoinUseTitle.setText(bean.getGoodsName());
|
|
|
- String date = bean.getDate();
|
|
|
- if (StringUtil.isFull(date) && date.length() == 8) {
|
|
|
- textViewCoinUseDate.setText(Formatter.format(StringUtil.getPureNumber(date), "yyyyMMdd", "yyyy.MM.dd")); // 20181010 -> 날짜 2018.05.27
|
|
|
+ if (null != bean) {
|
|
|
+ boolean isMinus = LifeplusData.isTrue(bean.getDecreasing());
|
|
|
+ textViewCoinUseTitle.setText(bean.getGoodsName());
|
|
|
+ String date = bean.getDate();
|
|
|
+ if (StringUtil.isFull(date) && date.length() == 8) {
|
|
|
+ textViewCoinUseDate.setText(Formatter.format(StringUtil.getPureNumber(date), "yyyyMMdd", "yyyy.MM.dd")); // 20181010 -> 날짜 2018.05.27
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ textViewCoinUseDate.setText(null == date ? "" : date);
|
|
|
+ }
|
|
|
+ textViewCoinUseFlag.setText(isMinus ? "사용" : "적립"); // 사용 적립
|
|
|
+ textViewCoinUseDetail.setText(String.format("%s%s", isMinus ? "-" : "", bean.getGoodsAmount())); // -4000
|
|
|
}
|
|
|
- else {
|
|
|
- textViewCoinUseDate.setText(null == date ? "" : date);
|
|
|
- }
|
|
|
- textViewCoinUseFlag.setText(isMinus ? "사용" : "적립"); // 사용 적립
|
|
|
- textViewCoinUseDetail.setText(String.format("%s%s", isMinus ? "-" : "", bean.getGoodsAmount())); // -4000
|
|
|
+
|
|
|
}
|
|
|
}
|