Commit a9aebfdb by wjg

init

parent cdeeadd6
...@@ -135,6 +135,7 @@ public class ConfirmOrderDialog extends Dialog { ...@@ -135,6 +135,7 @@ public class ConfirmOrderDialog extends Dialog {
OnDismissListener dismissListener = new OnDismissListener() { OnDismissListener dismissListener = new OnDismissListener() {
@Override @Override
public void onDismiss(DialogInterface dialog) { public void onDismiss(DialogInterface dialog) {
Utils.sendClearGoodsBroadcast(getContext());
if (expireThread != null) { if (expireThread != null) {
expireThread.interrupt(); expireThread.interrupt();
} }
...@@ -206,7 +207,6 @@ public class ConfirmOrderDialog extends Dialog { ...@@ -206,7 +207,6 @@ public class ConfirmOrderDialog extends Dialog {
Integer expireTimes = (Integer) msg.obj; Integer expireTimes = (Integer) msg.obj;
txtExpire.setText(getContext().getString(R.string.expire_times, expireTimes.toString())); txtExpire.setText(getContext().getString(R.string.expire_times, expireTimes.toString()));
if (expireTimes <= 0) { if (expireTimes <= 0) {
Utils.sendClearGoodsBroadcast(getContext());
dismiss(); dismiss();
} }
break; break;
...@@ -214,7 +214,6 @@ public class ConfirmOrderDialog extends Dialog { ...@@ -214,7 +214,6 @@ public class ConfirmOrderDialog extends Dialog {
Integer returnTimes = (Integer) msg.obj; Integer returnTimes = (Integer) msg.obj;
txtReturn.setText(getContext().getString(R.string.scan_succeed, returnTimes.toString())); txtReturn.setText(getContext().getString(R.string.scan_succeed, returnTimes.toString()));
if (returnTimes <= 0) { if (returnTimes <= 0) {
Utils.sendClearGoodsBroadcast(getContext());
dismiss(); dismiss();
} }
break; break;
......
...@@ -67,7 +67,7 @@ public class TrolleyView extends RelativeLayout { ...@@ -67,7 +67,7 @@ public class TrolleyView extends RelativeLayout {
} }
public void addGoods(Goods goods, Sku sku, Integer count) { public void addGoods(Goods goods, Sku sku, Integer count) {
if (getCheckedCount() >= Datas.COUNT_OF_ORDER) { if (getCount() >= Datas.COUNT_OF_ORDER) {
Toast.makeText(this.getContext(), getContext().getString(R.string.count_limit, Datas.COUNT_OF_ORDER.toString()), Toast.LENGTH_SHORT).show(); Toast.makeText(this.getContext(), getContext().getString(R.string.count_limit, Datas.COUNT_OF_ORDER.toString()), Toast.LENGTH_SHORT).show();
return; return;
} }
...@@ -99,7 +99,7 @@ public class TrolleyView extends RelativeLayout { ...@@ -99,7 +99,7 @@ public class TrolleyView extends RelativeLayout {
} }
public void addGoods(Integer position) { public void addGoods(Integer position) {
if (getCheckedCount() >= Datas.COUNT_OF_ORDER) { if (getCount() >= Datas.COUNT_OF_ORDER) {
Toast.makeText(this.getContext(), getContext().getString(R.string.count_limit, Datas.COUNT_OF_ORDER.toString()), Toast.LENGTH_SHORT).show(); Toast.makeText(this.getContext(), getContext().getString(R.string.count_limit, Datas.COUNT_OF_ORDER.toString()), Toast.LENGTH_SHORT).show();
return; return;
} }
...@@ -127,7 +127,7 @@ public class TrolleyView extends RelativeLayout { ...@@ -127,7 +127,7 @@ public class TrolleyView extends RelativeLayout {
} }
public Boolean checkGoodsCount() { public Boolean checkGoodsCount() {
if (getCheckedCount() > Datas.COUNT_OF_ORDER) { if (getCount() > Datas.COUNT_OF_ORDER) {
Toast.makeText(this.getContext(), getContext().getString(R.string.count_limit, Datas.COUNT_OF_ORDER.toString()), Toast.LENGTH_SHORT).show(); Toast.makeText(this.getContext(), getContext().getString(R.string.count_limit, Datas.COUNT_OF_ORDER.toString()), Toast.LENGTH_SHORT).show();
return false; return false;
} }
......
<resources> <resources>
<string name="app_name">hooloo</string> <string name="app_name">hooloo</string>
<string name="not_found_goods">未找到相应商品</string> <string name="not_found_goods">未找到相应商品</string>
<string name="count_limit">每个订单商品数量不能超过%1$s</string> <string name="count_limit">单次最多购买%1$s杯,请结算后再次下单</string>
<string name="error_get_qrcode">获取二维码失败</string> <string name="error_get_qrcode">获取二维码失败</string>
<string name="expire_times">%1$s秒后失效</string> <string name="expire_times">%1$s秒后失效</string>
<string name="scan_succeed">扫码成功(%s秒后转到首页)</string> <string name="scan_succeed">扫码成功(%s秒后转到首页)</string>
......
## 未解决事项
*****
1. 首页获取商品列表
2. 添加购物车时的SKU是否售罄校验
3. 生成二维码图片
4. 推送对接
5. 菜单屏
\ No newline at end of file
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