@@ -301,7 +301,7 @@ public class BatchSync { | |||
} | |||
} | |||
if(CompleteCount==goods.size()) { | |||
WaitDialog.TimeOut("商品同步完成!成功:"+CompleteCount+",失败:"+FaultCount); | |||
WaitDialog.TimeOut("商品同步完成!成功:"+CompleteCount+",失败:"+FaultCount,"Synchronous products successfully!Success:"+CompleteCount+",Fail:"+FaultCount); | |||
Log.i("sync", "商品同步完成!成功:"+CompleteCount+",失败:"+FaultCount); | |||
} | |||
else{ | |||
@@ -309,7 +309,7 @@ public class BatchSync { | |||
for (String error:FaultGoodName){ | |||
sb.append(error).append("、"); | |||
} | |||
WaitDialog.TimeOut("商品同步完成!成功:"+CompleteCount+",失败:"+FaultCount+"\r\n \r\n失败商品:"+sb.toString().substring(0,sb.toString().length()-1)); | |||
WaitDialog.TimeOut("商品同步完成!成功:"+CompleteCount+",失败:"+FaultCount+"\r\n \r\n失败商品:"+sb.toString().substring(0,sb.toString().length()-1),"Synchronous products successfully!Success:"+CompleteCount+",Fail:"+FaultCount+"\r\n \r\nProducts:"+sb.toString().substring(0,sb.toString().length()-1)); | |||
Log.i("sync", "商品同步完成!成功:"+CompleteCount+",失败:"+FaultCount+"\r\n \r\n失败商品:"+sb.toString().substring(0,sb.toString().length()-1)); | |||
} | |||
} | |||
@@ -46,7 +46,22 @@ public class WaitDialog { | |||
} | |||
} | |||
public static void TimeOut(String info,String info_en){ | |||
if(activity==null) return; | |||
if(progressDialog==null) return; | |||
activity.runOnUiThread(()->{ progressDialog.dismiss();}); | |||
activity.runOnUiThread(()->{ | |||
AlertDialogUtils.showDialog(context, "提示", info,"Tips",info_en, new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
context=null; | |||
activity=null; | |||
dialog.dismiss(); | |||
} | |||
}); | |||
}); | |||
} | |||
public static void TimeOut(String info){ | |||
if(activity==null) return; | |||
if(progressDialog==null) return; | |||
@@ -101,8 +101,10 @@ public abstract class FileProgressDialogCallBack extends FileCallback { | |||
private void initDialog(final Context context) { | |||
if (NetworkUtils.isActiveNetworkMobile(context)) { | |||
String title = "温馨提示!"; | |||
String title_en = "Tips"; | |||
String message_en = "The current network is a mobile network, which may consume a lot of mobile traffic data, are you sure to download it?"; | |||
String message = "当前网络为移动网络,可能会消耗大量移动流量数据,确定要下载吗?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,title_en,message_en, new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
downloadingDialog(context); | |||
@@ -98,7 +98,7 @@ public abstract class FileProgressDialogCallBack2 extends FileCallback2 { | |||
if (NetworkUtils.isActiveNetworkMobile(context)) { | |||
String title = "温馨提示!"; | |||
String message = "当前网络为移动网络,可能会消耗大量移动流量数据,确定要下载吗?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,"Tips","The current network is a mobile network, which may consume a lot of mobile traffic data, are you sure to download it?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
downloadingDialog(context, totalSize); | |||
@@ -76,27 +76,22 @@ public class AlertDialogUtils { | |||
.addAction("确定", onClickListener) | |||
.create(mCurrentDialogStyle).show(); | |||
} | |||
/** | |||
* 对话框,有取消确定按钮 | |||
* */ | |||
public static void showDialog(Context context, String title, String message,String title_en,String message_en, QMUIDialogAction.ActionListener onClickListener) { | |||
String top = ""; | |||
String mes=""; | |||
switch (ConfigName.getInstance().app.getString(R.string.language)){ | |||
case "en": | |||
top = title_en; | |||
mes = message_en; | |||
title = title_en; | |||
message = message_en; | |||
break; | |||
case "zh": | |||
top = title; | |||
mes = message; | |||
break; | |||
} | |||
new QMUIDialog.MessageDialogBuilder(context) | |||
.setCancelable(false) | |||
.setTitle(top) | |||
.setMessage(mes) | |||
.setTitle(title) | |||
.setMessage(message) | |||
.setCanceledOnTouchOutside(false) | |||
.addAction(ConfigName.getInstance().app.getString(R.string.btn_cancel), new QMUIDialogAction.ActionListener() { | |||
@Override | |||
@@ -107,6 +102,7 @@ public class AlertDialogUtils { | |||
.addAction(ConfigName.getInstance().app.getString(R.string.tip_save_confirm), onClickListener) | |||
.create(mCurrentDialogStyle).show(); | |||
} | |||
/** | |||
* 对话框,自定义确定按钮 | |||
* */ | |||
@@ -128,7 +128,7 @@ public class good_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> | |||
//按钮点击 | |||
String title = "删除菜品操作提示!"; | |||
String message = "请问客官确定要删除[" + name + "]菜品吗?"; | |||
AlertDialogUtils.showDialog(holder.itemView.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(holder.itemView.getContext(), title, message,"Remove menu prompts","Are you sure you want to delete the dishes[" + name + "]?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
if (mListener != null) { | |||
@@ -148,7 +148,7 @@ public class good_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> | |||
//按钮点击 | |||
String title = "收藏菜品操作提示!"; | |||
String message = "请问客官确定要[" + (myViewHolder.IsSC ? "取消收藏" : "收藏") + "]菜品吗?"; | |||
AlertDialogUtils.showDialog(holder.itemView.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(holder.itemView.getContext(), title, message,"Collection dishes operation tips", "Are you sure to[" + (myViewHolder.IsSC ? "uncollect" : "collect") + "] dishes?",new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
myViewHolder.IsSC = !myViewHolder.IsSC; | |||
@@ -65,7 +65,7 @@ public class image_sp_adapter extends RecyclerView.Adapter<RecyclerView.ViewHold | |||
//按钮点击 | |||
String title = "选择菜品操作提示!"; | |||
String message = "请问客官确定要选择该图片吗?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,"Select dishes operation tips","Are you sure you want to choose this picture?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
if(mListener!=null) | |||
@@ -222,7 +222,7 @@ public class lc_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { | |||
//按钮点击 | |||
String title = "料仓操作提示!"; | |||
String message = "请问客官确定要将["+lcModes.get(index).materialName+"]加满吗?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,"Bunker operation tips","Are you sure you want to fill["+lcModes.get(index).materialName+"]up?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
DataBus.getInstance().TopUp(index); | |||
@@ -66,7 +66,7 @@ public class sp_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { | |||
//按钮点击 | |||
String title = "选择菜品操作提示!"; | |||
String message = "请问客官确定要选择["+goods.get(position).name+"],开始制作吗?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message, "Select dishes operation tips","Is the guest sure to select ["+goods.get(position).name+"] and start production?",new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
if(mListener!=null) | |||
@@ -102,7 +102,7 @@ public class Home4Fragment extends BaseFragment { | |||
case R.id.zhuxiaodenglu: | |||
String title = "温馨提示!"; | |||
String message = "客官确定要退出程序吗,小菠萝会想你的哦?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,"Tips","Are you sure you want to quit the program?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
skipToLoginActivity(); | |||
@@ -771,7 +771,7 @@ public class HomeFragmentSBKZ extends BaseFragment { | |||
*/ | |||
public void GoOutToDinner() { | |||
ExecuteTheRecipe.BottomClick("出菜"); | |||
ToastUtils.warning("出餐"); | |||
ToastUtils.warning(getString(R.string.text_servedish)); | |||
} | |||
@@ -259,7 +259,7 @@ public class CpActivity extends BaseActivity { | |||
public void onClick(View v) { | |||
String title = "同步云端菜谱操作提示!"; | |||
String message = "请问客官确定要同步菜谱吗?此操作将完全复刻云端菜谱,本地菜谱将清除!请确认本地菜谱已上传云端!!!!"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,"Sync Tips","Are you sure you want to synchronize recipes? This action will completely copy the cloud recipe and the local recipe will be cleared! Make sure local recipes are uploaded to !!!!", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
@@ -536,7 +536,7 @@ public class DishTestActivity extends BaseActivity { | |||
//按钮点击 | |||
String title = "生成菜谱操作提示!"; | |||
String message = "请问客官确定要生成[" + DataBus.getInstance().ShowGoodName + "]菜谱吗?"; | |||
AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(view.getContext(), title, message,"Creat recipe tips","Are you sure you want to generate the [" + DataBus.getInstance().ShowGoodName + "] recipe?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
boolean isSucess = QueryDB.GetGoodsIs(DataBus.getInstance().ShowGoodName); | |||
@@ -511,7 +511,7 @@ public class DiyActivity extends BaseActivity { | |||
//按钮点击 | |||
String title = "生成菜谱操作提示!"; | |||
String message = "请问客官确定要生成[" + name + "]菜谱吗?"; | |||
AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(view.getContext(), title, message,"Create Recipe tips","Are you sure you want to generate [" + name + "] menu?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
int sc = 60 * 3; | |||
@@ -493,7 +493,7 @@ public class DiyUpdate1Activity extends BaseActivity { | |||
//按钮点击 | |||
String title = "生成菜谱操作提示!"; | |||
String message = "请问客官确定要生成[" + name1 + "]菜谱吗?"; | |||
AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(view.getContext(), title, message,"Create recipe tips","Are you sure you want to generate [" + name1 + "] recipe?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
int sc = 60 * 3; | |||
@@ -545,7 +545,7 @@ public class DiyUpdate1Activity extends BaseActivity { | |||
//按钮点击 | |||
String title = "保存菜谱操作提示!"; | |||
String message = "请问客官确定要保存[" + name + "]菜谱吗?"; | |||
AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(view.getContext(), title, message,"Save recipe","Are you sure you want to save the [" + name + "] recipe?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
int sc = 60 * 3; | |||
@@ -562,7 +562,7 @@ public class DiyUpdateActivity extends BaseActivity { | |||
//按钮点击 | |||
String title = "生成菜谱操作提示!"; | |||
String message = "请问客官确定要生成["+name1+"]菜谱吗?"; | |||
AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(view.getContext(), title, message,"Create recipe tips","Are you sure you want to generate ["+name1+"] recipes?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
int sc=60*3; | |||
@@ -620,7 +620,7 @@ public class DiyUpdateActivity extends BaseActivity { | |||
//按钮点击 | |||
String title = "保存菜谱操作提示!"; | |||
String message = "请问客官确定要保存["+name+"]菜谱吗?"; | |||
AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(view.getContext(), title, message,"Save recipe","Are you sure you want to save the ["+name+"] recipe?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
int sc=60*3; | |||
@@ -389,7 +389,7 @@ public class AutoTestOneFragment extends BaseFragment { | |||
} else { | |||
String title = "停止操作提示!"; | |||
String message = "请问客官确定要运行测试吗?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,"Stop operation","Are you sure you want to run the test?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
//强制结束 | |||
@@ -117,7 +117,7 @@ public class SystemCsPLCFragment extends BaseFragment { | |||
case R.id.chushihua: | |||
String title = "温馨提示!"; | |||
String message = "客官确定要初始化PLC地址吗,小菠萝温馨提示你,此操作将会影响到实际运行哦?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,"Tips", "Is the guest officer sure to initialize the PLC address? Remind you that this operation will affect the actual operation?",new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
load_view.setVisibility(View.VISIBLE); | |||
@@ -236,7 +236,7 @@ public class SystemSeasoningsetFragment extends BaseFragment implements MyClickL | |||
case R.id.huifuchuchang://恢复出 | |||
String title = "温馨提示!"; | |||
String message = "客官确定要初始化PLC地址吗,小菠萝温馨提示你,此操作将会影响到实际运行哦?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,"Tips","Is the guest officer sure to initialize the PLC address?Remind you that this operation will affect the actual operation?",new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
ConfigData.getInstance().RevertPLCProcess(); | |||
@@ -133,7 +133,7 @@ public class QDListSectionAdapter extends QMUIDefaultStickySectionAdapter { | |||
//按钮点击 | |||
String title = "删除菜品操作提示!"; | |||
String message = "请问客官确定要删除["+name+"]菜品吗?"; | |||
AlertDialogUtils.showDialog(holder.itemView.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(holder.itemView.getContext(), title, message,"Delete recipe","Are you sure you want to delete ["+name+"] dishes?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
MessageManager.getInstance().sendMessage(MessageName.DeleteGood, ((SectionItem)section.getItemAt(itemIndex))); | |||
@@ -151,7 +151,7 @@ public class QDListSectionAdapter extends QMUIDefaultStickySectionAdapter { | |||
//按钮点击 | |||
String title = "收藏菜品操作提示!"; | |||
String message = "请问客官确定要["+(IsSC?"取消收藏":"收藏")+"]菜品吗?"; | |||
AlertDialogUtils.showDialog(holder.itemView.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(holder.itemView.getContext(), title, message,"Collect operation tips","Are you sure to["+(IsSC?"uncollect":"collect")+"]dishes?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
IsSC=!IsSC; | |||
@@ -270,7 +270,7 @@ public class add_silos_message extends LinearLayout { | |||
return "③"; | |||
}else if(num==4) | |||
{ | |||
return "④(水阀)"; | |||
return ConfigName.getInstance().app.getString(R.string.text_valve); | |||
}else if(num==5) | |||
{ | |||
return "⑤"; | |||
@@ -304,7 +304,7 @@ public class add_silos_message extends LinearLayout { | |||
materials.add(item); | |||
} | |||
BPA_MATERIAL wsz = new BPA_MATERIAL(); | |||
wsz.name = "未设置"; | |||
wsz.name = ConfigName.getInstance().app.getString(R.string.text_waterset); | |||
wsz.id = ""; | |||
materials.add(wsz); | |||
names.clear(); | |||
@@ -88,7 +88,7 @@ public class fragment_plc extends LinearLayout { | |||
String title = "温馨提示!"; | |||
String message = "客官确定要修改["+model.name+"]地址吗,小菠萝温馨提示你,此操作将会影响到实际运行哦?"; | |||
AlertDialogUtils.showDialog(getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(getContext(), title, message,"Tips","Is the guest officer sure to modify the ["+model.name+"] address, reminds you that this operation will affect the actual operation?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
model.address=text; | |||
@@ -34,6 +34,8 @@ public class imagebuttom extends LinearLayout { | |||
ImageView image_u; | |||
private int ks_ys = R.mipmap.zhizuo_ks; | |||
private int tz_ys = R.mipmap.zhizuo_js; | |||
private int ks_ys_en = R.mipmap.zhizuo_ks; | |||
private int tz_ys_en = R.mipmap.zhizuo_js; | |||
/** | |||
* 当前状态 | |||
*/ | |||
@@ -59,6 +61,8 @@ public class imagebuttom extends LinearLayout { | |||
try { | |||
ks_ys = typedArray.getResourceId(R.styleable.imagebutton_control_imagesrc_ks, R.mipmap.zhizuo_ks); | |||
tz_ys = typedArray.getResourceId(R.styleable.imagebutton_control_imagesrc_tz,R.mipmap.zhizuo_js); | |||
ks_ys_en = typedArray.getResourceId(R.styleable.imagebutton_control_imagesrc_ks_en, R.mipmap.zhizuo_ks); | |||
tz_ys_en = typedArray.getResourceId(R.styleable.imagebutton_control_imagesrc_tz_en,R.mipmap.zhizuo_js); | |||
typedArray.recycle(); | |||
}catch (Exception exception) | |||
{ | |||
@@ -151,12 +155,26 @@ public class imagebuttom extends LinearLayout { | |||
public void SetStatus(boolean status) | |||
{ | |||
Status=status; | |||
if(status) | |||
{ | |||
image_u.setImageResource(tz_ys); | |||
}else | |||
{ | |||
image_u.setImageResource(ks_ys); | |||
switch (ConfigName.getInstance().app.getString(R.string.language)){ | |||
case "en": | |||
if(status) | |||
{ | |||
image_u.setImageResource(tz_ys_en); | |||
}else | |||
{ | |||
image_u.setImageResource(ks_ys_en); | |||
} | |||
break; | |||
case "zh": | |||
if(status) | |||
{ | |||
image_u.setImageResource(tz_ys); | |||
}else | |||
{ | |||
image_u.setImageResource(ks_ys); | |||
} | |||
break; | |||
} | |||
} | |||
} |
@@ -12,6 +12,7 @@ import android.widget.TextView; | |||
import androidx.annotation.Nullable; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.db.res.lcMode; | |||
import com.bonait.bnframework.common.helper.I.MyClickListener; | |||
@@ -129,7 +130,7 @@ public class jingdutiao1 extends LinearLayout { | |||
return "③"; | |||
}else if(num==4) | |||
{ | |||
return "④(水阀)"; | |||
return ConfigName.getInstance().app.getString(R.string.text_valve); | |||
}else if(num==5) | |||
{ | |||
return "⑤"; | |||
@@ -164,7 +164,7 @@ public class MyFragment extends BaseFragment { | |||
public void onClickListener(SuperTextView superTextView) { | |||
String title = "温馨提示!"; | |||
String message = "客官确定要退出程序吗,小菠萝会想你的哦?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,"Tips!","Are you sure you want to exit the program?" ,new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
skipToLoginActivity(); | |||
@@ -355,7 +355,7 @@ public class MyFragment extends BaseFragment { | |||
public void onClickListener(SuperTextView superTextView) { | |||
String title = "温馨提示!"; | |||
String message = "客官确定要恢复出厂设置吗,小菠萝温馨提示你,此操作将会影响到实际运行哦?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,"Tips!","Are you sure you want to restore factory Settings,this operation will affect the actual operation?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
ConfigData.getInstance().RevertPLCProcess(); | |||
@@ -145,7 +145,7 @@ public class UserActivity extends BaseActivity implements MyClickListener { | |||
String title = "温馨提示!"; | |||
String message = "客官确定要恢复出厂账户吗?"; | |||
AlertDialogUtils.showDialog(this, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(this, title, message, "Tips","Are you sure you want to restore the factory account?",new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
ArrayList<BPA_USER> users=QueryDB.GetUserALL(); | |||
@@ -113,7 +113,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
}else { | |||
progressDialog.dismiss(); | |||
} | |||
progressDialog.setTitleAndMessage("温馨提示","正在保存工序,请稍等..."); | |||
progressDialog.setTitleAndMessage("温馨提示","正在保存工序,请稍等...","Tips","Saving processes,please wait..."); | |||
progressDialog.setCancelable(false); | |||
progressDialog.show(); | |||
List<BPA_GOODS_PROCESS_DETAIL> processDetails1 = GoodsProcessDetailDBUtil.getByGroupId(subAttributeGroupId); | |||
@@ -124,7 +124,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
} | |||
SubAttributeGroupDBUtil.updateMakeTime(subAttributeGroupId, CookTimeUtils.measureCookingTime(processDetails)); | |||
if(GoodsProcessDetailDBUtil.addList(processDetails)){ | |||
NewToastUtil.getInstance().showToast("保存成功"); | |||
NewToastUtil.getInstance().showToast("保存成功","Save Success!"); | |||
RecordManager.getInstance().addLogRecord("角色操作日志","工序保存并返回-成功"); | |||
}else { | |||
NewToastUtil.getInstance().showToastError("保存失败"); | |||
@@ -197,7 +197,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
//移动光标 | |||
setSelectPos(index_up - 1); | |||
} else { | |||
NewToastUtil.getInstance().showToast("已经是最顶部!"); | |||
NewToastUtil.getInstance().showToast("已经是最顶部!","It's already at the top!"); | |||
} | |||
} | |||
@@ -211,7 +211,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
//移动光标 | |||
setSelectPos(index_down + 1); | |||
} else { | |||
NewToastUtil.getInstance().showToast("已经是最底部!"); | |||
NewToastUtil.getInstance().showToast("已经是最底部!","It's already at the top"); | |||
} | |||
} | |||
@@ -270,7 +270,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
//模拟炒制 | |||
viewBinding.btnSimulation.setOnClickListener(view -> { | |||
if(ConfigName.getInstance().isFast2Click()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
Intent intent = new Intent(DiyProcessActivity.this, CookingSimulatedActivity.class); | |||
@@ -309,7 +309,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
*/ | |||
viewBinding.btnCopyProcess.setOnClickListener(view -> { | |||
if(ConfigName.getInstance().isFast2Click()){ | |||
NewToastUtil.getInstance().showToast("请勿快速点击!"); | |||
NewToastUtil.getInstance().showToast("请勿快速点击!","Click too fast!"); | |||
return; | |||
} | |||
if(attributeSelectDialog == null){ | |||
@@ -323,7 +323,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
@Override | |||
public void submit() { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
processDetails.clear(); | |||
@@ -431,7 +431,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
stepAdapter.notifyDataSetChanged(); | |||
viewBinding.recycleStep.smoothScrollToPosition(index_update); | |||
}else { | |||
NewToastUtil.getInstance().showToast("请先选择步骤!"); | |||
NewToastUtil.getInstance().showToast("请先选择步骤!","Please select a step first!"); | |||
} | |||
} | |||
} | |||
@@ -451,7 +451,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
stepAdapter.notifyDataSetChanged(); | |||
viewBinding.recycleStep.smoothScrollToPosition(index_update+1); | |||
}else { | |||
NewToastUtil.getInstance().showToast("请先选择步骤!"); | |||
NewToastUtil.getInstance().showToast("请先选择步骤!","Please select a step first!"); | |||
} | |||
} | |||
} | |||
@@ -474,15 +474,15 @@ public class DiyProcessActivity extends BaseActivity { | |||
break; | |||
} | |||
if (!obj_update.processname.equals(selectname)) { | |||
NewToastUtil.getInstance().showToast("修改失败,选中步骤名称不相同!"); | |||
NewToastUtil.getInstance().showToast("修改失败,选中步骤名称不相同!","Failed to modify, the selected step name is different!"); | |||
return; | |||
} | |||
processDetails.set(index_update, getSelectItemFromValue()); | |||
stepAdapter.notifyDataSetChanged(); | |||
NewToastUtil.getInstance().showToast("修改步骤[" + (index_update + 1) + ":" + obj_update.processname + "]成功!"); | |||
NewToastUtil.getInstance().showToast("修改步骤[" + (index_update + 1) + ":" + obj_update.processname + "]成功!","Revise step [" + (index_update + 1) + ":" + obj_update.processname + "] Success!"); | |||
} | |||
} else { | |||
NewToastUtil.getInstance().showToast("请先选择步骤!"); | |||
NewToastUtil.getInstance().showToast("请先选择步骤!","Please select a step first!"); | |||
} | |||
} | |||
@@ -500,9 +500,9 @@ public class DiyProcessActivity extends BaseActivity { | |||
if (index_delete - 1 >= 0) { | |||
setSelectPos(index_delete - 1); | |||
} | |||
NewToastUtil.getInstance().showToast("删除步骤[" + processDetail.processname + "]成功!"); | |||
NewToastUtil.getInstance().showToast("删除步骤[" + processDetail.processname + "]成功!","Delete step [" + processDetail.processname + "] success!"); | |||
} else { | |||
NewToastUtil.getInstance().showToast("请先选择步骤!"); | |||
NewToastUtil.getInstance().showToast("请先选择步骤!","Please select a step first!"); | |||
} | |||
} | |||
@@ -628,7 +628,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
// viewBinding.topbar.setTitle("编辑工序"); | |||
viewBinding.back.setOnClickListener(v->{ | |||
if(isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
AlertDialogUtils.showCancelAndConfirmDialog(this,R.layout.dialog_with_cancel_confirm, new XComDialog.OnDialogListener(){ | |||
@@ -261,7 +261,7 @@ public class EditClassifyActivity extends BaseActivity { | |||
public void onViewClicked(View view) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
switch (view.getId()){ | |||
@@ -526,7 +526,7 @@ public class EditClassifyActivity extends BaseActivity { | |||
String classifyId = classifyList.get(viewBinding.spinnerClassify.getSelectedItem().toString()); | |||
String goodName = SubAttributeGroupDBUtil.isIncludeByClassify(classifyId,bean.name); | |||
if(!goodName.isEmpty()){ | |||
NewToastUtil.getInstance().showToast("商品["+goodName+"]正在使用["+bean.name+"]属性,请先删除对应商品"); | |||
NewToastUtil.getInstance().showToast("商品["+goodName+"]正在使用["+bean.name+"]属性,请先删除对应商品","Product ["+goodName+"] using ["+bean.name+"] attribute,Please delete the corresponding product first!"); | |||
return; | |||
} | |||
} | |||
@@ -73,7 +73,7 @@ public class EditGoodsActivity extends BaseActivity { | |||
viewBinding.back.setOnClickListener(v->{ | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
finish(); | |||
@@ -104,7 +104,7 @@ public class EditGoodsActivity extends BaseActivity { | |||
private void requestData(){ | |||
if (NetworkUtils.checkNetworkAvailable(context)) { | |||
if(!viewModel.hasData){ | |||
NewToastUtil.getInstance().showToast("正在请求云端数据"); | |||
NewToastUtil.getInstance().showToast("正在请求云端数据","Requesting cloud data!"); | |||
viewModel.fetchCloudData(context); | |||
} | |||
} else { | |||
@@ -120,7 +120,7 @@ public class EditGoodsActivity extends BaseActivity { | |||
@OnClick({R.id.localFoods, R.id.cloudFoods,R.id.search_view}) | |||
public void onViewClicked(View view) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
switch (view.getId()) { | |||
@@ -47,7 +47,7 @@ public abstract class SubOrderAdapter extends BaseAdapter<BPA_SUBORDER_RECORD, S | |||
holder.binding.error.setText(order.subErrorCount+""); | |||
holder.binding.root.setOnClickListener(view -> { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
onItemClick(view,position); | |||
@@ -188,7 +188,7 @@ public class AddGoodsDialog extends DialogFragment { | |||
case 2: | |||
if(classifyList.isEmpty() || classifyPosition < 0 || classifyPosition>=classifyList.size()){ | |||
if(getContext()!=null){ | |||
NewToastUtil.getInstance().showToast("请选择分类"); | |||
NewToastUtil.getInstance().showToast("请选择分类","Please select class"); | |||
} | |||
return; | |||
} | |||
@@ -207,13 +207,13 @@ public class AddGoodsDialog extends DialogFragment { | |||
LogUtils.d(TAG+" name="+name); | |||
if(name.isEmpty()){ | |||
if(getContext()!=null){ | |||
NewToastUtil.getInstance().showToast("名称不能为空"); | |||
NewToastUtil.getInstance().showToast("名称不能为空","The name cannot be empty!"); | |||
} | |||
return; | |||
} | |||
if(GoodsDBUtil.getByName(name)!=null){ | |||
if(getContext()!=null){ | |||
NewToastUtil.getInstance().showToast("已有菜品,请换一个名称"); | |||
NewToastUtil.getInstance().showToast("已有菜品,请换一个名称","There is a name, please change the name"); | |||
} | |||
return; | |||
} | |||
@@ -229,7 +229,7 @@ public class AttributeSelectDialog extends DialogFragment { | |||
}); | |||
}); | |||
}else { | |||
NewToastUtil.getInstance().showToast("该组合没有工序,无法导入"); | |||
NewToastUtil.getInstance().showToast("该组合没有工序,无法导入","This combination has no process and cannot be imported!"); | |||
} | |||
}); | |||
} | |||
@@ -383,7 +383,7 @@ public class EditGoodsDialog extends DialogFragment { | |||
subattributeGroup.name = goods.name; | |||
subattributeGroup.subAttributeIdList = goodId; | |||
SubAttributeGroupDBUtil.add(subattributeGroup); | |||
NewToastUtil.getInstance().showToast("创建配方成功,请编辑工序"); | |||
NewToastUtil.getInstance().showToast("创建配方成功,请编辑工序","Recipe created successfully, please edit process!"); | |||
RecordManager.getInstance().addLogRecord("角色操作日志", subattributeGroup.name+"-创建配方成功"); | |||
} | |||
return; | |||
@@ -4,8 +4,11 @@ import android.app.ProgressDialog; | |||
import android.content.Context; | |||
import android.os.Bundle; | |||
import android.view.WindowManager; | |||
import android.widget.Switch; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.databinding.DialogProgressWaiteBinding; | |||
import com.bonait.bnframework.ui.util.DisplayManager; | |||
@@ -51,7 +54,22 @@ public class WaiteProgressDialog extends ProgressDialog { | |||
this.title = title; | |||
this.message = message; | |||
} | |||
public void setTitleAndMessage(String title,String message,String title_en,String message_en){ | |||
switch (ConfigName.getInstance().app.getString(R.string.language)){ | |||
case "en": | |||
title = title_en; | |||
message = message_en; | |||
break; | |||
case "zh": | |||
break; | |||
} | |||
if(binding!=null){ | |||
binding.title.setText(title); | |||
binding.message.setText(message); | |||
} | |||
this.title = title; | |||
this.message = message; | |||
} | |||
@Override | |||
public void show() { | |||
super.show(); | |||
@@ -125,7 +125,7 @@ public class HomeFoodsFragment extends BaseFragment { | |||
private void requestData(){ | |||
if (NetworkUtils.checkNetworkAvailable(context)) { | |||
if(!viewModel.hasData){ | |||
NewToastUtil.getInstance().showToast("正在请求云端数据"); | |||
NewToastUtil.getInstance().showToast("正在请求云端数据","Requesting cloud data!"); | |||
viewModel.fetchCloudData(context); | |||
} | |||
} else { | |||
@@ -143,7 +143,7 @@ public class HomeFoodsFragment extends BaseFragment { | |||
switch (view.getId()) { | |||
case R.id.localFoods: | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
LogUtils.d("//////1"); | |||
@@ -151,7 +151,7 @@ public class HomeFoodsFragment extends BaseFragment { | |||
break; | |||
case R.id.cloudFoods: | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
LogUtils.d("//////2"); | |||
@@ -110,22 +110,22 @@ public class CloudGoodsFragment extends BaseFragment { | |||
viewBinding.btnSynchronizedData.setVisibility(isEdit?View.VISIBLE:View.GONE); | |||
viewBinding.btnFresh.setOnClickListener(v->{ | |||
if (ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
NewToastUtil.getInstance().showToast("正在请求云端数据"); | |||
NewToastUtil.getInstance().showToast("正在请求云端数据","Requesting cloud data!"); | |||
viewModel.fetchCloudData(getContext()); | |||
}); | |||
viewBinding.btnSynchronizedData.setOnClickListener(v->{ | |||
if (ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
AlertDialogUtils.showTipDialog((AppCompatActivity) getActivity(), "数据同步", "下载云端所有菜品到本地,拥有相同的分类将会被覆盖,请确认?", new AlertDialogUtils.DialogClickListener() { | |||
AlertDialogUtils.showTipDialog((AppCompatActivity) getActivity(), "数据同步", "下载云端所有菜品到本地,拥有相同的分类将会被覆盖,请确认?","Data Synchronize","Download all dishes from the cloud to the local, with the same classification will be covered, please confirm?", new AlertDialogUtils.DialogClickListener() { | |||
@Override | |||
public void onConfirm() { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
RecordManager.getInstance().addLogRecord("角色操作日志", "数据同步"); | |||
@@ -134,7 +134,7 @@ public class CloudGoodsFragment extends BaseFragment { | |||
}else { | |||
progressDialog.dismiss(); | |||
} | |||
progressDialog.setTitleAndMessage("数据同步","正在同步数据,请耐心稍等..."); | |||
progressDialog.setTitleAndMessage("数据同步","正在同步数据,请耐心稍等...","Synchronous data","Synchronizing data,please wait..."); | |||
progressDialog.setCancelable(false); | |||
progressDialog.show(); | |||
viewModel.synchronizedCloudData(); | |||
@@ -156,7 +156,7 @@ public class CloudGoodsFragment extends BaseFragment { | |||
@Override | |||
protected boolean downLoadGoods(View v, int position) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return false; | |||
} | |||
return downLoadCloudGoods(position); | |||
@@ -117,7 +117,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||
viewBinding.addClassify.setVisibility(isEdit?View.VISIBLE:View.GONE); | |||
viewBinding.uploadAll.setOnClickListener(v->{ | |||
if(ConfigName.getInstance().isFast2Click()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
// UpdateAllDataService.startUpLoadAll(getContext()); | |||
@@ -125,18 +125,18 @@ public class LocalGoodsFragment extends BaseFragment { | |||
viewBinding.addClassify.setOnClickListener(view -> { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
jumpClassify(); | |||
}); | |||
viewBinding.deleteAll.setVisibility(isEdit?View.VISIBLE:View.GONE); | |||
viewBinding.deleteAll.setOnClickListener(v->{ | |||
AlertDialogUtils.showTipDialog((AppCompatActivity) getActivity(), "请确认", "确认删除所有商品信息?", new AlertDialogUtils.DialogClickListener() { | |||
AlertDialogUtils.showTipDialog((AppCompatActivity) getActivity(), "请确认", "确认删除所有商品信息?","Confirm","Confirm to delete all product information?", new AlertDialogUtils.DialogClickListener() { | |||
@Override | |||
public void onConfirm() { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
MainInit.clearGoodsInfo(); | |||
@@ -157,7 +157,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||
protected void onItemClick(View v, int position) { | |||
LogUtils.d(" LocalGoodsAdapter onItemClick position="+position); | |||
if(isFast2Click()){ | |||
NewToastUtil.getInstance().showToast("请勿快速点击!"); | |||
NewToastUtil.getInstance().showToast("请勿快速点击!","Click too fast!"); | |||
return; | |||
} | |||
try { | |||
@@ -184,7 +184,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||
@Override | |||
protected void uploadGoods(View v, int position) { | |||
if(ConfigName.getInstance().isFast2Click()){ | |||
NewToastUtil.getInstance().showToast("点击太快了"); | |||
NewToastUtil.getInstance().showToast("点击太快了","Click too fast!"); | |||
return; | |||
} | |||
UpdateDataService.startUpLoad(mData.get(position),getContext()); | |||
@@ -193,7 +193,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||
@Override | |||
protected void deleteGoods(View v, int position) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
AlertDialogUtils.showCancelAndConfirmDialog((AppCompatActivity) getActivity(), R.layout.dialog_delete_classify, (layoutView, xCom) -> { | |||
@@ -215,7 +215,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||
}); | |||
binding.submit.setOnClickListener(view1 -> { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
GoodsProcessDetailDBUtil.deleteByGoodsId(bean.id); | |||
@@ -248,12 +248,12 @@ public class LocalGoodsFragment extends BaseFragment { | |||
BPA_GOODS_CLASSIFY classify = classifyList.get(classifyAdapter.getCurrentPosition()); | |||
List<BPA_ATTRIBUTE> attributes = AttributeDBUtil.getByClassify(classify.id); | |||
if(attributes.isEmpty()){ | |||
NewToastUtil.getInstance().showToast("当前分类没有属性,请先创建分类父属性"); | |||
NewToastUtil.getInstance().showToast("当前分类没有属性,请先创建分类父属性","The current class does not have attributes. Create the parent attributes of the class first"); | |||
return; | |||
}else { | |||
for(BPA_ATTRIBUTE attribute:attributes){ | |||
if(SubAttributeDBUtil.getByParentAttributeId(attribute.id).isEmpty()){ | |||
NewToastUtil.getInstance().showToast("当前分类父属性["+attribute.name+"]没有子属性,无法创建"); | |||
NewToastUtil.getInstance().showToast("当前分类父属性["+attribute.name+"]没有子属性,无法创建","Parent property of the current class ["+attribute.name+"] has no subattribute,Cannot create!"); | |||
return; | |||
} | |||
} | |||
@@ -316,7 +316,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||
*/ | |||
public void addGoodsDialog(){ | |||
if(isFastClick()){ | |||
NewToastUtil.getInstance().showToast("请勿快速点击!"); | |||
NewToastUtil.getInstance().showToast("请勿快速点击!","Click too fast!"); | |||
return; | |||
} | |||
if(!classifyList.isEmpty() && getActivity()!=null){ | |||
@@ -331,7 +331,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||
addGoodsDialog.setArguments(bundle); | |||
addGoodsDialog.show(getActivity().getSupportFragmentManager(), "addGoods"); | |||
}else { | |||
NewToastUtil.getInstance().showToast("当前没有分类,请先添加分类"); | |||
NewToastUtil.getInstance().showToast("当前没有分类,请先添加分类","Currently no class,Please add class first"); | |||
jumpClassify(); | |||
} | |||
} | |||
@@ -62,7 +62,7 @@ public class HomeGoodsViewModel extends ViewModel { | |||
public void fetchCloudData(Context context){ | |||
if (NetworkUtils.checkNetworkAvailable(context)) { | |||
WaitProcessUtil.getInstance().show(context,"下载云端","正在请求云端数据..."); | |||
WaitProcessUtil.getInstance().show(context,"下载云端","正在请求云端数据...","Download cloud","Requesting cloud data..."); | |||
ThreadManager.get().execute(new Thread(()->{ | |||
GetGoodsInfo(); | |||
GetMaterialInfo(); | |||
@@ -159,7 +159,7 @@ public class HomeGoodsViewModel extends ViewModel { | |||
LogUtils.d("UpdateLocalMaterial datas="+datas); | |||
if(!datas.isEmpty()){ | |||
MaterialUtil.addMaterialList(BPA_MATERIAL.class,datas); | |||
NewToastUtil.getInstance().showToast("已同步云端物料信息"); | |||
NewToastUtil.getInstance().showToast("已同步云端物料信息","Material information in the cloud has been synchronized!"); | |||
} | |||
EventBus.getDefault().post(new FreshSystemSeason()); | |||
} | |||
@@ -179,7 +179,7 @@ public class HomeGoodsViewModel extends ViewModel { | |||
if (goodsClassify.id.equals(bean.getGoodsTypeId())) { | |||
List<BPA_ATTRIBUTE> attributes = AttributeDBUtil.getByClassify(goodsClassify.id); | |||
if(attributes.size() != bean.getGoodsAttributeList().size()){ | |||
NewToastUtil.getInstance().showToast("与本地【"+goodsClassify.name+"】分类的父属性数量不匹配,无法下载"); | |||
NewToastUtil.getInstance().showToast("与本地【"+goodsClassify.name+"】分类的父属性数量不匹配,无法下载","Does not match the number of parent attributes of the local class【"+goodsClassify.name+"】,unable to download!"); | |||
return; | |||
} | |||
List<String> attributeName = new ArrayList<>(); | |||
@@ -188,7 +188,7 @@ public class HomeGoodsViewModel extends ViewModel { | |||
} | |||
for(GoodsClassifyBean.GoodsAttributeListBean goodsAttributeListBean: bean.getGoodsAttributeList()){ | |||
if(!attributeName.contains(goodsAttributeListBean.getGoodsAttributeId())){ | |||
NewToastUtil.getInstance().showToast("与本地【"+goodsClassify.name+"】分类的父属性id不匹配,无法下载"); | |||
NewToastUtil.getInstance().showToast("与本地【"+goodsClassify.name+"】分类的父属性id不匹配,无法下载","Does not match the number of parent attributes of the local class id【"+goodsClassify.name+"】,unable to download!"); | |||
return; | |||
} | |||
} | |||
@@ -196,7 +196,7 @@ public class HomeGoodsViewModel extends ViewModel { | |||
} | |||
} | |||
if(GoodsDBUtil.getByNameAndClassifyId(goods.name,goodsClassify.id)!=null){ | |||
NewToastUtil.getInstance().showToast("已有该商品,请先删除再【"+goods.name+"】,再下载"); | |||
NewToastUtil.getInstance().showToast("已有该商品,请先删除再【"+goods.name+"】,再下载","The same product【"+goods.name+"】available,please delete and download!"); | |||
return; | |||
} | |||
//添加商品 | |||
@@ -315,9 +315,9 @@ public class HomeGoodsViewModel extends ViewModel { | |||
LogUtils.d(" synchronizedCloudData3 usetime="+(curTime5-lastTime)); | |||
lastTime = curTime5; | |||
EventBus.getDefault().post(new FreshLocalGoodsEvent()); | |||
NewToastUtil.getInstance().showToast("云端数据同步成功"); | |||
NewToastUtil.getInstance().showToast("云端数据同步成功","The cloud data is synchronized successfully!"); | |||
}catch (Exception e){ | |||
NewToastUtil.getInstance().showToast("云端数据同步失败"); | |||
NewToastUtil.getInstance().showToast("云端数据同步失败","The cloud data is synchronized fails"); | |||
e.printStackTrace(); | |||
} | |||
})); | |||
@@ -86,10 +86,10 @@ public class UpdateDataService { | |||
}finally { | |||
} | |||
}else { | |||
NewToastUtil.getInstance().showToast("商品为空"); | |||
NewToastUtil.getInstance().showToast("商品为空","Goods empty!"); | |||
} | |||
}else { | |||
NewToastUtil.getInstance().showToast("无网络,请先连接网络"); | |||
NewToastUtil.getInstance().showToast("无网络,请先连接网络","No network exists. Please connect to the network first!"); | |||
} | |||
} | |||
@@ -101,7 +101,7 @@ public class UpdateDataService { | |||
try{ | |||
String url = "http://"+path+"/api/ExternalPlatform/Device/GetDeviceTechnology"; | |||
if(context!=null){ | |||
WaitProcessUtil.getInstance().show(context,"匹配工艺模型","正在同步云端工艺模型..."); | |||
WaitProcessUtil.getInstance().show(context,"匹配工艺模型","正在同步云端工艺模型...","Matching process model","Synchronizing cloud process models..."); | |||
} | |||
HashMap<String,String> params = new HashMap<>(); | |||
params.put("autokey",ConfigName.getInstance().DeviceAutoKey); | |||
@@ -213,7 +213,7 @@ public class UpdateDataService { | |||
*/ | |||
private static void upLoadMaterial(String goodsId,Context context,List<MaterialDataInfo> upMaterialBean){ | |||
try{ | |||
WaitProcessUtil.getInstance().show(context,"数据上传","正在物料信息,请耐心稍等..."); | |||
WaitProcessUtil.getInstance().show(context,"数据上传","正在物料信息,请耐心稍等...","Data upload","Material information, please wait..."); | |||
List<BPA_MATERIAL> materials = MaterialUtil.GetMaterialALL(); | |||
if(upMaterialBean==null){ | |||
upMaterialBean = new ArrayList<>(); | |||
@@ -251,7 +251,7 @@ public class UpdateDataService { | |||
WaitProcessUtil.getInstance().dismiss(); | |||
}else{ | |||
RecordManager.getInstance().addLogRecord("数据接收", url+"-上传物料信息成功"); | |||
NewToastUtil.getInstance().showToast("上传物料信息成功"); | |||
NewToastUtil.getInstance().showToast("上传物料信息成功","Material information is uploaded successfully!"); | |||
upLoadClassifyInfo(goodsId,context); | |||
} | |||
} | |||
@@ -279,7 +279,7 @@ public class UpdateDataService { | |||
*/ | |||
private static void upLoadClassifyInfo(String goodsId,Context context){ | |||
try{ | |||
WaitProcessUtil.getInstance().show(context,"数据上传","正在上传分类信息,请耐心稍等..."); | |||
WaitProcessUtil.getInstance().show(context,"数据上传","正在上传分类信息,请耐心稍等...","Data upload","Uploading classified information, please wait..."); | |||
BPA_GOODS goods = GoodsDBUtil.getById(goodsId); | |||
assert goods != null; | |||
BPA_GOODS_CLASSIFY classify = GoodsClassifyDBUtil.getById(goods.classifyId); | |||
@@ -316,11 +316,11 @@ public class UpdateDataService { | |||
} | |||
if(!isSuccess){ | |||
RecordManager.getInstance().addLogRecord("数据接收", url+"-上传分类信息失败-重复数据-"+names); | |||
NewToastUtil.getInstance().showToast("上传分类信息失败,云端有相同数据-"+names); | |||
NewToastUtil.getInstance().showToast("上传分类信息失败,云端有相同数据-"+names,"Failed to upload classification information. The cloud has the same data-"+names); | |||
WaitProcessUtil.getInstance().dismiss(); | |||
}else{ | |||
RecordManager.getInstance().addLogRecord("数据接收", url+"-上传分类信息成功"); | |||
NewToastUtil.getInstance().showToast("上传分类信息成功"); | |||
NewToastUtil.getInstance().showToast("上传分类信息成功","The classification information is uploaded successfully!"); | |||
LogUtils.d("上传分类信息成功"); | |||
List<BPA_ATTRIBUTE> attributes = AttributeDBUtil.getByClassify(classify.id); | |||
if (!attributes.isEmpty()){ | |||
@@ -356,7 +356,7 @@ public class UpdateDataService { | |||
*/ | |||
private static void upLoadAttribute(List<BPA_ATTRIBUTE> attributes,String goodsId,Context context){ | |||
try{ | |||
WaitProcessUtil.getInstance().show(context,"数据上传","正在上传分类属性信息,请耐心稍等..."); | |||
WaitProcessUtil.getInstance().show(context,"数据上传","正在上传分类属性信息,请耐心稍等...","Data Upload","Uploading classified attribute information, please wait..."); | |||
BPA_GOODS goods = GoodsDBUtil.getById(goodsId); | |||
assert goods != null; | |||
BPA_GOODS_CLASSIFY classify = GoodsClassifyDBUtil.getById(goods.classifyId); | |||
@@ -400,7 +400,7 @@ public class UpdateDataService { | |||
} | |||
if(!isSuccess){ | |||
RecordManager.getInstance().addLogRecord("数据接收", url+"-上传分类属性信息失败-重复数据-"+names); | |||
NewToastUtil.getInstance().showToast("上传分类属性信息失败,云端有相同数据-"+names); | |||
NewToastUtil.getInstance().showToast("上传分类属性信息失败,云端有相同数据-"+names,"Description Failed to upload category attribute information. The cloud has the same data-"+names); | |||
WaitProcessUtil.getInstance().dismiss(); | |||
}else{ | |||
RecordManager.getInstance().addLogRecord("数据接收", url+"-上传分类属性信息成功"); | |||
@@ -430,7 +430,7 @@ public class UpdateDataService { | |||
*/ | |||
private static void upLoadGoodsInfo(String goodsId,Context context){ | |||
try{ | |||
WaitProcessUtil.getInstance().show(context,"数据上传","正在上传商品信息,请耐心稍等..."); | |||
WaitProcessUtil.getInstance().show(context,"数据上传","正在上传商品信息,请耐心稍等...","Data Upload","Uploading product information,please wait..."); | |||
BPA_GOODS goods = GoodsDBUtil.getById(goodsId); | |||
assert goods != null; | |||
BPA_GOODS_CLASSIFY classify = GoodsClassifyDBUtil.getById(goods.classifyId); | |||
@@ -463,12 +463,12 @@ public class UpdateDataService { | |||
} | |||
if(!isSuccess){ | |||
RecordManager.getInstance().addLogRecord("数据接收", url+"-上传商品基础信息失败-重复数据-"+names); | |||
NewToastUtil.getInstance().showToast("上传商品基础信息失败,云端有相同数据-"+names); | |||
NewToastUtil.getInstance().showToast("上传商品基础信息失败,云端有相同数据-"+names,"Failed to upload basic product information, the cloud has the same data-"+names); | |||
WaitProcessUtil.getInstance().dismiss(); | |||
}else{ | |||
LogUtils.d("上传商品基础信息成功"); | |||
RecordManager.getInstance().addLogRecord("数据接收", url+"-上传商品基础信息成功"); | |||
NewToastUtil.getInstance().showToast("上传商品基础信息成功"); | |||
NewToastUtil.getInstance().showToast("上传商品基础信息成功","The basic product information is uploaded successfully!"); | |||
upLoadDetailInfo(goodsId,context); | |||
} | |||
} | |||
@@ -495,7 +495,7 @@ public class UpdateDataService { | |||
*/ | |||
private static void upLoadDetailInfo(String goodsId,Context context){ | |||
try{ | |||
WaitProcessUtil.getInstance().show(context,"数据上传","正在上传工艺信息,请耐心稍等..."); | |||
WaitProcessUtil.getInstance().show(context,"数据上传","正在上传工艺信息,请耐心稍等...","Data Upload","Uploading process information, please wait..."); | |||
BPA_GOODS goods = GoodsDBUtil.getById(goodsId); | |||
assert goods != null; | |||
BPA_GOODS_CLASSIFY classify = GoodsClassifyDBUtil.getById(goods.classifyId); | |||
@@ -3,6 +3,8 @@ package com.bonait.bnframework.ui.widget; | |||
import android.content.Context; | |||
import com.bonait.bnframework.MainApplication; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.ui.dialog.WaiteProgressDialog; | |||
/** | |||
@@ -36,6 +38,19 @@ public class WaitProcessUtil { | |||
}); | |||
} | |||
public void show(Context context,String title, String message,String title_en,String message_en){ | |||
MainApplication.handler.post(() -> { | |||
if(progressDialog!=null){ | |||
progressDialog.dismiss(); | |||
} | |||
progressDialog = new WaiteProgressDialog(context); | |||
progressDialog.setTitleAndMessage(title,message,title_en,message_en); | |||
progressDialog.setCancelable(false); | |||
progressDialog.show(); | |||
}); | |||
} | |||
public void dismiss(){ | |||
MainApplication.handler.post(()->{ | |||
if(progressDialog!=null){ | |||
@@ -0,0 +1,15 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |||
<item> | |||
<shape> | |||
<solid android:color="#5D7436"/> | |||
<corners android:topLeftRadius="30dp" android:topRightRadius="30dp"/> | |||
</shape> | |||
</item> | |||
<item android:bottom="5dp"> | |||
<shape> | |||
<solid android:color="@color/white"/> | |||
<corners android:topLeftRadius="30dp" android:topRightRadius="30dp"/> | |||
</shape> | |||
</item> | |||
</layer-list> |
@@ -0,0 +1,15 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |||
<item> | |||
<shape android:shape="rectangle"> | |||
<solid android:color="#5D7436"/> | |||
<corners android:radius="20dp"/> | |||
</shape> | |||
</item> | |||
<item android:left="10dp" android:end="10dp" android:top="10dp" android:bottom="10dp"> | |||
<shape android:shape="rectangle"> | |||
<solid android:color="@color/white"/> | |||
<corners android:radius="20dp"/> | |||
</shape> | |||
</item> | |||
</layer-list> |
@@ -0,0 +1,9 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |||
<item> | |||
<shape android:shape="rectangle"> | |||
<solid android:color="#F37636"/> | |||
<corners android:radius="20dp"/> | |||
</shape> | |||
</item> | |||
</selector> |
@@ -155,7 +155,7 @@ | |||
android:layout_marginTop="10dp" | |||
android:layout_width="match_parent" | |||
android:layout_height="160dp" | |||
android:contentDescription="④(水阀)" | |||
android:contentDescription="@string/text_valve" | |||
android:tag="水"/> | |||
</LinearLayout> | |||
</RelativeLayout> | |||
@@ -41,6 +41,8 @@ | |||
<LinearLayout | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="0.3" | |||
android:gravity="center" | |||
android:orientation="horizontal"> | |||
<TextView | |||
@@ -58,7 +60,7 @@ | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:fontFamily="@font/fz2" | |||
android:text=" 号料仓" | |||
android:text="@string/text_Silo" | |||
android:textColor="@color/topbj1" | |||
android:textSize="25dp" /> | |||
@@ -70,7 +72,7 @@ | |||
android:layout_marginLeft="10dp" | |||
android:fontFamily="@font/fz2" | |||
android:text="复合料" | |||
android:textColor="@color/topbj1" | |||
android:textColor="#F37636" | |||
android:textSize="25dp" /> | |||
<TextView | |||
@@ -80,7 +82,7 @@ | |||
android:layout_marginLeft="10dp" | |||
android:fontFamily="@font/zkgdh" | |||
android:text="50%" | |||
android:textColor="@color/topbj1" | |||
android:textColor="#5D7436" | |||
android:textSize="30dp" | |||
android:textStyle="bold" /> | |||
</LinearLayout> | |||
@@ -88,117 +90,305 @@ | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="10dp" | |||
android:background="@mipmap/rongliangshezhi"> | |||
android:layout_height="0dp" | |||
android:background="@drawable/bg_siloset" | |||
android:layout_weight="4" | |||
android:layout_marginTop="10dp"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="120dp" | |||
android:layout_marginTop="60dp" | |||
android:layout_marginRight="140dp" | |||
android:layout_height="match_parent" | |||
android:orientation="vertical"> | |||
<EditText | |||
android:id="@+id/zongliang" | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="35dp" | |||
android:background="@drawable/input_bj" | |||
android:hint="请输入制作时长" | |||
android:inputType="number" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:text="0" | |||
android:textSize="19dp" /> | |||
<EditText | |||
android:id="@+id/gaojingrongliang" | |||
android:layout_height="wrap_content" | |||
android:layout_marginHorizontal="10dp" | |||
android:layout_marginTop="20dp" | |||
android:background="@drawable/bg_frame_green"> | |||
<TextView | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:fontFamily="@font/fz2" | |||
android:text="@string/text_capacityset" | |||
android:gravity="center|left" | |||
android:layout_marginBottom="5dp" | |||
android:layout_marginLeft="10dp" | |||
android:textSize="20dp" | |||
android:textColor="#5D7436"/> | |||
</RelativeLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="35dp" | |||
android:layout_marginTop="10dp" | |||
android:background="@drawable/input_bj" | |||
android:hint="请输入制作时长" | |||
android:inputType="number" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:text="0" | |||
android:textSize="19dp" /> | |||
android:layout_height="match_parent" | |||
android:layout_marginRight="@dimen/dp_10" | |||
android:orientation="horizontal"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_weight="10" | |||
android:layout_height="match_parent" | |||
android:gravity="center" | |||
android:orientation="vertical"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginRight="20dp" | |||
android:layout_marginLeft="30dp" | |||
android:orientation="horizontal"> | |||
<TextView | |||
android:layout_width="120dp" | |||
android:layout_height="wrap_content" | |||
android:text="@string/text_totalcapacity" | |||
android:maxLines="1" | |||
android:layout_gravity="center" | |||
android:fontFamily="@font/fz2" | |||
android:textSize="15dp" | |||
android:textColor="@color/topbj1"/> | |||
<EditText | |||
android:id="@+id/zongliang" | |||
android:layout_width="match_parent" | |||
android:layout_height="30dp" | |||
android:background="@drawable/input_bj" | |||
android:hint="请输入制作时长" | |||
android:layout_gravity="center" | |||
android:inputType="number" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:text="0" | |||
android:textSize="19dp" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="10dp" | |||
android:layout_marginRight="20dp" | |||
android:layout_marginLeft="30dp" | |||
android:orientation="horizontal"> | |||
<TextView | |||
android:layout_width="120dp" | |||
android:layout_height="wrap_content" | |||
android:text="@string/text_alarmcapacity" | |||
android:maxLines="1" | |||
android:layout_gravity="center" | |||
android:fontFamily="@font/fz2" | |||
android:textSize="15dp" | |||
android:textColor="@color/topbj1"/> | |||
<EditText | |||
android:id="@+id/gaojingrongliang" | |||
android:layout_width="match_parent" | |||
android:layout_height="30dp" | |||
android:background="@drawable/input_bj" | |||
android:hint="请输入制作时长" | |||
android:layout_gravity="center" | |||
android:inputType="number" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:text="0" | |||
android:textSize="19dp" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="wrap_content" | |||
android:layout_weight="1" | |||
android:layout_marginRight="20dp" | |||
android:layout_height="match_parent"> | |||
<Button | |||
android:id="@+id/save_rlsz" | |||
android:text="@string/btn_save" | |||
android:textColor="@color/white" | |||
android:textSize="25dp" | |||
android:textStyle="bold" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentRight="true" | |||
android:layout_gravity="center" | |||
android:background="@drawable/btn_bg_orange" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</LinearLayout> | |||
<RelativeLayout | |||
android:id="@+id/save_rlsz" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentRight="true" | |||
android:layout_marginTop="54dp" | |||
android:layout_marginRight="30dp" | |||
android:background="@mipmap/save22" /> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="10dp" | |||
android:background="@mipmap/tiaoliaobiaoding"> | |||
<ImageView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="130dp" | |||
android:layout_marginTop="15dp" | |||
android:src="@mipmap/pkbdy" /> | |||
<EditText | |||
android:id="@+id/tiaoliaobiaoding" | |||
android:layout_height="0dp" | |||
android:layout_weight="4" | |||
android:layout_marginTop="10dp"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="35dp" | |||
android:layout_marginLeft="120dp" | |||
android:layout_marginTop="80dp" | |||
android:layout_marginRight="140dp" | |||
android:background="@drawable/input_bj" | |||
android:digits="0123456789" | |||
android:hint="请输入制作时长" | |||
android:inputType="text" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:text="0" | |||
android:textSize="19dp" /> | |||
<RelativeLayout | |||
android:id="@+id/save_tlbd" | |||
android:layout_height="match_parent" | |||
android:background="@drawable/bg_siloset" | |||
android:orientation="vertical"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginHorizontal="10dp" | |||
android:layout_marginTop="20dp" | |||
android:orientation="horizontal" | |||
android:background="@drawable/bg_frame_green"> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:fontFamily="@font/fz2" | |||
android:text="@string/text_calibrationspices" | |||
android:gravity="center|left" | |||
android:layout_marginBottom="5dp" | |||
android:layout_marginLeft="10dp" | |||
android:textSize="20dp" | |||
android:textColor="#5D7436"/> | |||
<ImageView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_gravity="center" | |||
android:layout_marginLeft="30dp" | |||
android:src="@mipmap/pkbdy" /> | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentRight="true" | |||
android:layout_marginTop="70dp" | |||
android:layout_marginRight="30dp" | |||
android:background="@mipmap/save11" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginBottom="@dimen/dp_10" | |||
android:orientation="horizontal"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_weight="10" | |||
android:gravity="center" | |||
android:layout_height="match_parent" | |||
android:orientation="vertical"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginRight="20dp" | |||
android:layout_marginLeft="30dp" | |||
android:orientation="horizontal"> | |||
<TextView | |||
android:layout_width="120dp" | |||
android:layout_height="wrap_content" | |||
android:text="@string/text_grammage" | |||
android:maxLines="1" | |||
android:layout_gravity="center" | |||
android:fontFamily="@font/fz2" | |||
android:textSize="15dp" | |||
android:textColor="@color/topbj1"/> | |||
<EditText | |||
android:id="@+id/tiaoliaobiaoding" | |||
android:layout_width="match_parent" | |||
android:layout_height="30dp" | |||
android:background="@drawable/input_bj" | |||
android:digits="0123456789" | |||
android:hint="请输入制作时长" | |||
android:layout_gravity="center" | |||
android:inputType="text" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:text="0" | |||
android:textSize="19dp" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="wrap_content" | |||
android:layout_weight="1" | |||
android:layout_marginRight="30dp" | |||
android:layout_height="match_parent"> | |||
<Button | |||
android:id="@+id/save_tlbd" | |||
android:text="@string/btn_save" | |||
android:textColor="@color/white" | |||
android:textSize="25dp" | |||
android:textStyle="bold" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentRight="true" | |||
android:layout_gravity="center" | |||
android:background="@drawable/btn_bg_orange" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="10dp" | |||
android:background="@mipmap/genghuanwuliao"> | |||
<Spinner | |||
android:id="@+id/editsp_wl" | |||
style="@style/commonSpinnerStyle" | |||
android:layout_height="0dp" | |||
android:layout_weight="4" | |||
android:background="@drawable/bg_siloset" | |||
android:layout_marginTop="10dp"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="35dp" | |||
android:layout_marginLeft="120dp" | |||
android:layout_marginTop="80dp" | |||
android:layout_marginRight="140dp" /> | |||
android:layout_height="match_parent" | |||
android:orientation="vertical"> | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginHorizontal="10dp" | |||
android:layout_marginTop="20dp" | |||
android:background="@drawable/bg_frame_green"> | |||
<TextView | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:fontFamily="@font/fz2" | |||
android:text="@string/text_replacematerial" | |||
android:gravity="center|left" | |||
android:layout_marginBottom="5dp" | |||
android:layout_marginLeft="10dp" | |||
android:textSize="20dp" | |||
android:textColor="#5D7436"/> | |||
<RelativeLayout | |||
android:id="@+id/save_ghtl" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentRight="true" | |||
android:layout_marginTop="70dp" | |||
android:layout_marginRight="30dp" | |||
android:background="@mipmap/save11" /> | |||
</RelativeLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginBottom="@dimen/dp_10" | |||
android:orientation="horizontal"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_weight="10" | |||
android:gravity="center" | |||
android:layout_height="match_parent" | |||
android:orientation="vertical"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginRight="20dp" | |||
android:layout_marginLeft="30dp" | |||
android:orientation="horizontal"> | |||
<TextView | |||
android:layout_width="120dp" | |||
android:layout_height="wrap_content" | |||
android:text="@string/text_selectmaterial" | |||
android:layout_gravity="center" | |||
android:fontFamily="@font/fz2" | |||
android:maxLines="1" | |||
android:textSize="15dp" | |||
android:textColor="@color/topbj1"/> | |||
<Spinner | |||
android:id="@+id/editsp_wl" | |||
style="@style/commonSpinnerStyle" | |||
android:layout_marginLeft="0dp" | |||
android:layout_gravity="center" | |||
android:layout_width="match_parent" | |||
android:layout_height="30dp" | |||
/> | |||
</LinearLayout> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="wrap_content" | |||
android:layout_weight="1" | |||
android:layout_marginRight="30dp" | |||
android:layout_height="match_parent"> | |||
<Button | |||
android:id="@+id/save_ghtl" | |||
android:text="@string/btn_save" | |||
android:textColor="@color/white" | |||
android:textSize="25dp" | |||
android:textStyle="bold" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentRight="true" | |||
android:layout_gravity="center" | |||
android:background="@drawable/btn_bg_orange" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</RelativeLayout> | |||
</LinearLayout> | |||
@@ -212,7 +402,7 @@ | |||
<ImageView | |||
android:id="@+id/click_dcbl" | |||
android:layout_width="wrap_content" | |||
android:layout_height="match_parent" | |||
android:layout_height="wrap_content" | |||
android:src="@mipmap/dcbl" /> | |||
<com.bonait.bnframework.modules.home.fragment.mode.imagebuttom | |||
@@ -222,7 +412,9 @@ | |||
android:layout_alignParentBottom="true" | |||
android:layout_marginLeft="40dp" | |||
app:imagesrc_ks="@mipmap/dcqx_select" | |||
app:imagesrc_tz="@mipmap/dcqx" /> | |||
app:imagesrc_tz="@mipmap/dcqx" | |||
app:imagesrc_ks_en="@mipmap/dcbl" | |||
app:imagesrc_tz_en="@mipmap/cooking" /> | |||
<ImageView | |||
android:id="@+id/click_lcjz" | |||
@@ -167,4 +167,15 @@ | |||
<string name="text_waitstart">Wait starting</string> | |||
<string name="text_expect">Expect to wait</string> | |||
<string name="btn_liquid">Liquid</string> | |||
<string name="text_Silo"> Bit Silo</string> | |||
<string name="text_capacityset">Capacity set</string> | |||
<string name="text_totalcapacity">Total Capacity:</string> | |||
<string name="text_alarmcapacity">Alarm Capacity:</string> | |||
<string name="text_calibrationspices">Calibration Spices</string> | |||
<string name="text_grammage">Grammage:</string> | |||
<string name="text_replacematerial">Replace Material</string> | |||
<string name="text_selectmaterial">Select Material:</string> | |||
<string name="btn_save">Save</string> | |||
<string name="text_valve">④(Valve)</string> | |||
<string name="text_servedish">Serve Dish</string> | |||
</resources> |
@@ -8,6 +8,9 @@ | |||
<attr name="imagesrc_ks" format="reference" /> | |||
<attr name="imagesrc_tz" format="reference" /> | |||
<attr name="imagesrc_qt" format="reference" /> | |||
<attr name="imagesrc_ks_en" format="reference" /> | |||
<attr name="imagesrc_tz_en" format="reference" /> | |||
<attr name="imagesrc_qt_en" format="reference" /> | |||
</declare-styleable> | |||
<declare-styleable name="myMagicProgress"> | |||
@@ -167,4 +167,15 @@ | |||
<string name="text_waitstart">等待开始</string> | |||
<string name="text_expect">预计等待</string> | |||
<string name="btn_liquid">液料</string> | |||
<string name="text_Silo"> 号料仓</string> | |||
<string name="text_capacityset">容量设置</string> | |||
<string name="text_totalcapacity">总容量:</string> | |||
<string name="text_alarmcapacity">告警容量:</string> | |||
<string name="text_calibrationspices">调料标定</string> | |||
<string name="text_grammage">克重:</string> | |||
<string name="text_replacematerial">更换物料</string> | |||
<string name="text_selectmaterial">物料选择:</string> | |||
<string name="btn_save">保存</string> | |||
<string name="text_valve">④(水阀)</string> | |||
<string name="text_servedish">出餐</string> | |||
</resources> |