Commit 2dcd04f9 authored by zhang_z's avatar zhang_z

Merge remote-tracking branch 'origin/master'

parents 094b38f6 49cd5cf6
......@@ -55,6 +55,8 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind
public boolean isShowing;
private long recLen = -1;
private boolean shutDown = false;
//强制关闭时间
long time = 0;
static {
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
......@@ -302,18 +304,24 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind
}
}
/**
* 强制关闭dialog
*/
public void toughDismiss() {
if (shutDown) {
if (System.currentTimeMillis() - time < 500) {
dismiss();
} else {
if (recLen <= 0) {
dismiss();
} else {
ToastUtils.showLong(recLen + "s 后可关闭");
ToastUtils.showLong(recLen + "s 后可关闭,双击返回按钮可强制关闭");
}
}
time = System.currentTimeMillis();
}
}
/**
......@@ -343,5 +351,4 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind
mBaseBinding.btnConfirm.setText(OK);
return this;
}
}
\ No newline at end of file
......@@ -259,11 +259,11 @@ public class Cs implements BaseOrderPrint, com.xingdata.zzdpos.base.BaseBean {
}
public String getOperName() {
if (operName == null) {
operName = DB.getInstance().get(InventoryPresenter.class).where(Oper.class)
.equalTo("operId", getCreateOperId())
.findFirst().getOperName();
}
// if (operName == null) {
// operName = DB.getInstance().get(InventoryPresenter.class).where(Oper.class)
// .equalTo("operId", getCreateOperId())
// .findFirst().getOperName();
// }
return operName;
}
@Override
......
......@@ -31,10 +31,10 @@ public class LoadingDialog extends BaseDialog<BasePresenter, DialogLoadingBindin
this.getDialog().setOnKeyListener(new DialogInterface.OnKeyListener() {
@Override
public boolean onKey(DialogInterface dialogInterface, int i, KeyEvent keyEvent) {
if (i == keyEvent.KEYCODE_BACK) {
if (i == keyEvent.KEYCODE_BACK && keyEvent.getAction() == KeyEvent.ACTION_DOWN) {
toughDismiss();
}
return true;
return false;
}
});
}
......
......@@ -26,7 +26,9 @@ public class InventoryAdapter extends BaseAdapter<Cs, ItemInventoryBinding> {
@Override
protected void convert(ItemInventoryBinding mViewBinding, Cs item) {
if (item.getOperName() != null) {
mViewBinding.tvName.setText(item.getOperName());
}
mViewBinding.tvPhone.setText(item.getOper_mobile());
mViewBinding.tvDate.setText(TimeUtils.millis2String(item.getCreateTime()) + "");
mViewBinding.tvNum.setText(item.getCsdetailCount() + "");
......
......@@ -29,7 +29,7 @@ public final class SystemUtil {
*/
public static String getDeviceModel() {
// return DeviceUtils.getModel();
return "AECRC10";
return "X990";
}
......@@ -57,7 +57,7 @@ public final class SystemUtil {
e.printStackTrace();
}
}
return "test2018";
return "test2019";
// return deviceSN;
}
......
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