Commit a6323d0f authored by zhang_z's avatar zhang_z

Merge branch 'master' of 192.168.254.154:w525721508/TangKuPos

# Conflicts:
#	app/src/main/AndroidManifest.xml
parent f04be52d
......@@ -18,41 +18,41 @@ public class PayAdapter extends BaseAdapter<Pay, ItemPayBinding> {
@Override
protected void convert(ItemPayBinding mViewBinding, Pay item) {
// int resLogo, resBackground;
// switch (item.getPayType()) {
// case C.PAY_CHANNEL.CASH:
// resLogo = R.mipmap.pay_cash;
// resBackground = R.color.red_diaochan;
// break;
// case C.PAY_CHANNEL.WECHAT:
// resLogo = R.mipmap.pay_wechat;
// resBackground = R.color.green_kongrun;
// break;
// case C.PAY_CHANNEL.ALI:
// resLogo = R.mipmap.pay_alipay;
// resBackground = R.color.blue_yuefei;
// break;
// case C.PAY_CHANNEL.BANK:
// resLogo = R.mipmap.pay_card;
// resBackground = R.color.cyan_liubei;
// break;
// case C.PAY_CHANNEL.CARD:
// resLogo = R.mipmap.pay_membershipcard;
// resBackground = R.color.yellow_huangxin;
// break;
// case C.PAY_CHANNEL.TALLY:
// resLogo = R.mipmap.pay_credit;
// resBackground = R.color.purple_yanqing;
// break;
// default:
// resLogo = R.mipmap.pay_cash;
// resBackground = R.color.red_diaochan;
// break;
// }
// mViewBinding.ivLogo.setImageResource(resLogo);
//
// GenericDraweeHierarchy hierarchy = mViewBinding.ivBackground.getHierarchy();
// hierarchy.setBackgroundImage(mContext.getResources().getDrawable(resBackground));
// mViewBinding.ivBackground.setHierarchy(hierarchy);
int resLogo, resBackground;
switch (item.getPayType()) {
case C.PAY_CHANNEL.CASH:
resLogo = R.mipmap.pay_cash;
resBackground = R.color.red_diaochan;
break;
case C.PAY_CHANNEL.WECHAT:
resLogo = R.mipmap.pay_wechat;
resBackground = R.color.green_kongrun;
break;
case C.PAY_CHANNEL.ALI:
resLogo = R.mipmap.pay_alipay;
resBackground = R.color.blue_yuefei;
break;
case C.PAY_CHANNEL.BANK:
resLogo = R.mipmap.pay_card;
resBackground = R.color.cyan_liubei;
break;
case C.PAY_CHANNEL.CARD:
resLogo = R.mipmap.pay_membershipcard;
resBackground = R.color.yellow_huangxin;
break;
case C.PAY_CHANNEL.TALLY:
resLogo = R.mipmap.pay_credit;
resBackground = R.color.purple_yanqing;
break;
default:
resLogo = R.mipmap.pay_cash;
resBackground = R.color.red_diaochan;
break;
}
mViewBinding.ivLogo.setImageResource(resLogo);
GenericDraweeHierarchy hierarchy = mViewBinding.ivBackground.getHierarchy();
hierarchy.setBackgroundImage(mContext.getResources().getDrawable(resBackground));
mViewBinding.ivBackground.setHierarchy(hierarchy);
}
}
......@@ -59,7 +59,7 @@ public class CashPayFragment extends BaseFragment<SettlePresenter, FragmentPayCa
* @param payAmt 实付价格
*/
private void clickSettle(Long payAmt) {
if (payAmt - mOrderAmt > 0) {
if (payAmt - mOrderAmt >= 0) {
mPresenter.payInCash(payAmt, payAmt - mOrderAmt);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment