@@ -18,5 +18,115 @@ | |||
"code": 3, | |||
"description": "直流母线欠压", | |||
"name": "电源电压过低低于300V" | |||
}, | |||
{ | |||
"code": 4, | |||
"description": "线盘过热", | |||
"name": "线盘传感器温度高于120℃" | |||
}, | |||
{ | |||
"code": 5, | |||
"description": "保留", | |||
"name": "保留" | |||
}, | |||
{ | |||
"code": 6, | |||
"description": "锅体过热", | |||
"name": "锅体传感器温度高于210℃(油炸炉高于250℃)" | |||
}, | |||
{ | |||
"code": 7, | |||
"description": "保留", | |||
"name": "保留" | |||
}, | |||
{ | |||
"code": 8, | |||
"description": "高频电流互感器故障", | |||
"name": "高频电流互感器断线或者损坏" | |||
}, | |||
{ | |||
"code": 9, | |||
"description": "低频电流互感器故障", | |||
"name": "低频电流互感器断线或者损坏" | |||
}, | |||
{ | |||
"code": 10, | |||
"description": "IGBT过流保护", | |||
"name": "IGBT电流冲击太大" | |||
}, | |||
{ | |||
"code": 11, | |||
"description": "母线电流过流", | |||
"name": "直流母线电流过大" | |||
}, | |||
{ | |||
"code": 12, | |||
"description": "参数读写错误", | |||
"name": "芯片损坏无法读取内部参数" | |||
}, | |||
{ | |||
"code": 13, | |||
"description": "IGBT温度传感器开路", | |||
"name": "散热器温度传感器开路" | |||
}, | |||
{ | |||
"code": 14, | |||
"description": "IGBT温度传感器短路", | |||
"name": "散热器温度传感器短路" | |||
}, | |||
{ | |||
"code": 15, | |||
"description": "线盘温度传感器开路", | |||
"name": "线盘温度传感器开路" | |||
}, | |||
{ | |||
"code": 16, | |||
"description": "线盘温度传感器短路", | |||
"name": "线盘温度传感器短路" | |||
}, | |||
{ | |||
"code": 17, | |||
"description": "保留", | |||
"name": "保留" | |||
}, | |||
{ | |||
"code": 18, | |||
"description": "保留", | |||
"name": "保留" | |||
}, | |||
{ | |||
"code": 19, | |||
"description": "锅体传感器开路", | |||
"name": "锅体温度传感器开路" | |||
}, | |||
{ | |||
"code": 20, | |||
"description": "锅体传感器短路", | |||
"name": "锅体温度传感器短路" | |||
}, | |||
{ | |||
"code": 21, | |||
"description": "保留", | |||
"name": "保留" | |||
}, | |||
{ | |||
"code": 22, | |||
"description": "保留", | |||
"name": "保留" | |||
}, | |||
{ | |||
"code": 23, | |||
"description": "保留", | |||
"name": "保留" | |||
}, | |||
{ | |||
"code": 24, | |||
"description": "负载线盘开路", | |||
"name": "线盘开路报警" | |||
}, | |||
{ | |||
"code": 25, | |||
"description": "磁控开关断线", | |||
"name": "磁控开关断线,损坏" | |||
} | |||
] |
@@ -64,6 +64,15 @@ public class ConfigName { | |||
return false; | |||
} | |||
public boolean isFast2Click(){ | |||
long curTime = System.currentTimeMillis(); | |||
if(curTime - lastTime < 1000){ | |||
return true; | |||
} | |||
lastTime = curTime; | |||
return false; | |||
} | |||
//region 程序进入界面 | |||
public Context dishesCon; | |||
public Context Home; | |||
@@ -139,8 +139,8 @@ public class CookingActivity extends BaseActivity { | |||
NewExecuteTheRecipe.IsForcedEnd = false; | |||
onRecordStart(); | |||
}else { | |||
if (isFastClick()) { | |||
NewToastUtil.getInstance().showToastBottom("点击太快了,请重试"); | |||
if(ConfigName.getInstance().isFast2Click()){ | |||
NewToastUtil.getInstance().showToastBottom("请勿快速点击!"); | |||
return; | |||
} | |||
if(NewExecuteTheRecipe.IsStart){ | |||
@@ -468,7 +468,7 @@ public class CookingActivity extends BaseActivity { | |||
*/ | |||
private void initTopBar() { | |||
viewBinding.topbar.setBackgroundColor(ContextCompat.getColor(this, R.color.topbj1)); | |||
viewBinding.topbar.setTitle(isTest?"模拟烹饪":"菜品烹饪"); | |||
viewBinding.tabTitle.setText(isTest?"模拟烹饪":"菜品烹饪"); | |||
viewBinding.back.setOnClickListener(v->{ | |||
AlertDialogUtils.showTipDialog(this, "温馨提示!", "是否停止制作?", new AlertDialogUtils.DialogClickListener() { | |||
@Override | |||
@@ -244,7 +244,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
public boolean isFastClick(){ | |||
long curTime = System.currentTimeMillis(); | |||
if(curTime - lastTime < 100){ | |||
if(curTime - lastTime < 300){ | |||
return true; | |||
} | |||
lastTime = curTime; | |||
@@ -256,29 +256,17 @@ public class DiyProcessActivity extends BaseActivity { | |||
*/ | |||
private void initBtnListener(){ | |||
viewBinding.btnAdd.setOnClickListener(view -> { | |||
if(isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
addProcess(); | |||
}); | |||
viewBinding.btnUpdate.setOnClickListener(view -> { | |||
if(isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
updateProcess(); | |||
}); | |||
viewBinding.btnDelete.setOnClickListener(view -> { | |||
if(isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
deleteProcess(); | |||
}); | |||
//模拟炒制 | |||
viewBinding.btnSimulation.setOnClickListener(view -> { | |||
if(isFastClick()){ | |||
if(ConfigName.getInstance().isFast2Click()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
@@ -292,7 +280,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
}); | |||
//录制工序 | |||
viewBinding.btnJumpRecordProcess.setOnClickListener(view -> { | |||
if(isFastClick()){ | |||
if(ConfigName.getInstance().isFast2Click()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
@@ -306,10 +294,6 @@ public class DiyProcessActivity extends BaseActivity { | |||
}); | |||
viewBinding.llInsert.setVisibility(View.GONE); | |||
viewBinding.btnInsert.setOnClickListener(view -> { | |||
if(isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
if(viewBinding.llInsert.getVisibility() == View.VISIBLE){ | |||
viewBinding.llInsert.setVisibility(View.GONE); | |||
viewBinding.llInsert.animate() | |||
@@ -325,29 +309,17 @@ public class DiyProcessActivity extends BaseActivity { | |||
} | |||
}); | |||
viewBinding.btnInsertUp.setOnClickListener(view -> { | |||
if(isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
insertUpProcess(); | |||
}); | |||
viewBinding.btnInsertDown.setOnClickListener(view -> { | |||
if(isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
insertDownProcess(); | |||
}); | |||
/** | |||
*导入工序 | |||
*/ | |||
viewBinding.btnCopyProcess.setOnClickListener(view -> { | |||
if(isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
if(ConfigName.getInstance().isFast2Click()){ | |||
NewToastUtil.getInstance().showToast("请勿快速点击!"); | |||
return; | |||
} | |||
if(attributeSelectDialog == null){ | |||
@@ -617,7 +589,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
*/ | |||
private void initTopBar(){ | |||
viewBinding.topbar.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.topbj1)); | |||
viewBinding.topbar.setTitle("编辑工序"); | |||
// viewBinding.topbar.setTitle("编辑工序"); | |||
viewBinding.back.setOnClickListener(v->{ | |||
if(isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
@@ -142,6 +142,10 @@ public class EditClassifyActivity extends BaseActivity { | |||
@Override | |||
public void clickListenerNew(View v, int k, Object data) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("重复点击!"); | |||
return; | |||
} | |||
attributePosition = k; | |||
//选中 | |||
BPA_ATTRIBUTE bean = (BPA_ATTRIBUTE) data; | |||
@@ -158,6 +162,10 @@ public class EditClassifyActivity extends BaseActivity { | |||
subattributeAdapter = new SubattributeAdapter(context, R.layout.item_subattribute, subattributeList, new SubattributeAdapter.MyClickListener() { | |||
@Override | |||
public void clickName(View v,int position,BPA_SUBATTRIBUTE data) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("重复点击!"); | |||
return; | |||
} | |||
//修改子属性 | |||
AlertDialogUtils.showCancelAndConfirmDialog(EditClassifyActivity.this, R.layout.dialog_add_classify, (layoutView, xCom) -> { | |||
DialogAddClassifyBinding binding = DialogAddClassifyBinding.bind(layoutView); | |||
@@ -641,7 +649,7 @@ public class EditClassifyActivity extends BaseActivity { | |||
} | |||
private void initTopBar(){ | |||
viewBinding.topbar.setTitle("编辑分类"); | |||
// viewBinding.topbar.setTitle("编辑分类"); | |||
viewBinding.back.setOnClickListener(v->{ | |||
finishActivity(); | |||
}); | |||
@@ -69,7 +69,7 @@ public class EditGoodsActivity extends BaseActivity { | |||
params.bottomMargin = 0; | |||
viewBinding.frame.setLayoutParams(params); | |||
viewBinding.topbar.setBackgroundColor(ContextCompat.getColor(this, R.color.topbj1)); | |||
viewBinding.topbar.setTitle("菜品管理"); | |||
viewBinding.tabTitle.setText("菜品管理"); | |||
viewBinding.back.setOnClickListener(v->{ | |||
if(ConfigName.getInstance().isFastClick()){ | |||
@@ -141,7 +141,7 @@ public class ErrorInfoActivity extends BaseActivity { | |||
private void initTopBar(){ | |||
viewBinding.topbar.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.topbj1)); | |||
viewBinding.topbar.setTitle("设备异常信息"); | |||
// viewBinding.topbar.setTitle("设备异常信息"); | |||
viewBinding.back.setOnClickListener(v->{ | |||
finish(); | |||
}); | |||
@@ -57,7 +57,7 @@ public class LogRecordActivity extends BaseActivity { | |||
private void initTopBar() { | |||
viewBinding.btnQuery.requestFocus(); | |||
viewBinding.topbar.setTitle("日志记录"); | |||
// viewBinding.topbar.setTitle("日志记录"); | |||
viewBinding.back.setOnClickListener(v->{ | |||
finish(); | |||
}); | |||
@@ -26,6 +26,8 @@ import com.bonait.bnframework.common.base.BaseActivity; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.db.file.DBHelper; | |||
import com.bonait.bnframework.common.db.mode.BPA_LOG_RECORD; | |||
import com.bonait.bnframework.common.db.mode.BPA_ORDER_RECORD; | |||
import com.bonait.bnframework.common.db.mode.BPA_SUBORDER_RECORD; | |||
import com.bonait.bnframework.common.helper.I.MyClickListener; | |||
import com.bonait.bnframework.common.helper.MQTT; | |||
import com.bonait.bnframework.common.message.MessageManager; | |||
@@ -75,6 +77,8 @@ public class MainActivity extends BaseActivity { | |||
if(loginNum>30){ | |||
LogUtils.d(" DeleteCreateTables BPA_LOG_RECORD"); | |||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_LOG_RECORD.class,null); | |||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_ORDER_RECORD.class,null); | |||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_SUBORDER_RECORD.class,null); | |||
PreferenceUtils.setInt("loginNum",0); | |||
}else { | |||
PreferenceUtils.setInt("loginNum",loginNum+1); | |||
@@ -8,6 +8,7 @@ import android.widget.TextView; | |||
import com.bigkoo.pickerview.TimePickerView; | |||
import com.bonait.bnframework.common.base.BaseActivity; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.db.mode.BPA_ORDER_RECORD; | |||
import com.bonait.bnframework.common.db.util.OrderRecordUtil; | |||
import com.bonait.bnframework.common.helper.DateUtils; | |||
@@ -16,6 +17,7 @@ import com.bonait.bnframework.common.utils.ToastUtils; | |||
import com.bonait.bnframework.databinding.ActivityOrderBinding; | |||
import com.bonait.bnframework.ui.adapter.OrderAdapter; | |||
import com.bonait.bnframework.ui.dialog.SubOrderDialog; | |||
import com.bonait.bnframework.ui.widget.NewToastUtil; | |||
import java.text.SimpleDateFormat; | |||
import java.util.ArrayList; | |||
@@ -57,7 +59,7 @@ public class OrderRecordActivity extends BaseActivity { | |||
private void initTopBar() { | |||
viewBinding.button.requestFocus(); | |||
viewBinding.topbar.setTitle("订单统计"); | |||
// viewBinding.topbar.setTitle("订单统计"); | |||
viewBinding.back.setOnClickListener(v->{ | |||
finish(); | |||
}); | |||
@@ -91,6 +93,10 @@ public class OrderRecordActivity extends BaseActivity { | |||
adapter = new OrderAdapter() { | |||
@Override | |||
protected void onItemClick(View v, int position) { | |||
if(ConfigName.getInstance().isFast2Click()){ | |||
NewToastUtil.getInstance().showToast("请勿快速点击!"); | |||
return; | |||
} | |||
if(dialog == null){ | |||
dialog = new SubOrderDialog(); | |||
} | |||
@@ -132,7 +132,7 @@ public class RecProcessActivity extends BaseActivity { | |||
*/ | |||
private void initTopBar() { | |||
viewBinding.topbar.setBackgroundColor(ContextCompat.getColor(this, R.color.topbj1)); | |||
viewBinding.topbar.setTitle("录制工序"); | |||
// viewBinding.topbar.setTitle("录制工序"); | |||
viewBinding.back.setOnClickListener(v->{ | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
@@ -447,8 +447,8 @@ public class RecProcessActivity extends BaseActivity { | |||
* @param type 1加热 2液体 3主料 4搅拌 | |||
*/ | |||
private void showControlDialog(int type){ | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
if(ConfigName.getInstance().isFast2Click()){ | |||
NewToastUtil.getInstance().showToast("请勿快速点击!"); | |||
return; | |||
} | |||
if(ModbusHelper.get().isBtnStop()){ | |||
@@ -182,7 +182,7 @@ public class SetSeasoningActivity extends BaseActivity { | |||
private void initTopBar() { | |||
mTopBar.setTitle("料仓设置"); | |||
// mTopBar.setTitle("料仓设置"); | |||
back.setOnClickListener(v->{ | |||
finish(); | |||
}); | |||
@@ -40,10 +40,6 @@ public abstract class OrderAdapter extends BaseAdapter<BPA_ORDER_RECORD, OrderAd | |||
holder.binding.complete.setText(order.completeCount+""); | |||
holder.binding.error.setText(order.errorCount+""); | |||
holder.binding.root.setOnClickListener(view -> { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
onItemClick(view,position); | |||
}); | |||
} | |||
@@ -68,10 +68,6 @@ public class AttributeAdapter extends ArrayAdapter<BPA_ATTRIBUTE> { | |||
name.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
selectPosition = position; | |||
notifyDataSetChanged(); | |||
if(mListener!=null) mListener.clickListenerNew(view,position,bean); | |||
@@ -10,11 +10,9 @@ import androidx.annotation.NonNull; | |||
import androidx.recyclerview.widget.RecyclerView; | |||
import com.bonait.bnframework.common.base.BaseAdapter; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.db.mode.BPA_GOODS_CLASSIFY; | |||
import com.bonait.bnframework.common.utils.DisplayManager; | |||
import com.bonait.bnframework.databinding.ItemClassifyBinding; | |||
import com.bonait.bnframework.ui.widget.NewToastUtil; | |||
/** | |||
* @author: liup | |||
@@ -49,10 +47,6 @@ public abstract class ClassifyAdapter extends BaseAdapter<BPA_GOODS_CLASSIFY,Cla | |||
holder.binding.name.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
int lastPos = mCurrentPosition; | |||
mCurrentPosition= position; | |||
notifyItemChanged(lastPos); | |||
@@ -10,11 +10,9 @@ import androidx.recyclerview.widget.RecyclerView; | |||
import com.apkfuns.logutils.LogUtils; | |||
import com.bonait.bnframework.common.base.BaseAdapter; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.db.mode.BPA_SUBATTRIBUTE; | |||
import com.bonait.bnframework.common.utils.DisplayManager; | |||
import com.bonait.bnframework.databinding.ItemSelectSubattributeBinding; | |||
import com.bonait.bnframework.ui.widget.NewToastUtil; | |||
/** | |||
* @author: liup | |||
@@ -71,10 +69,6 @@ public class SelectSubAttributeAdapter extends BaseAdapter<BPA_SUBATTRIBUTE,Sele | |||
holder.binding.name.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
int last = mCurrentPosition; | |||
mCurrentPosition = position; | |||
notifyItemChanged(last); | |||
@@ -11,10 +11,8 @@ import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.db.mode.BPA_SUBATTRIBUTE; | |||
import com.bonait.bnframework.common.utils.DisplayManager; | |||
import com.bonait.bnframework.ui.widget.NewToastUtil; | |||
import java.util.List; | |||
@@ -51,20 +49,12 @@ public class SubattributeAdapter extends ArrayAdapter<BPA_SUBATTRIBUTE> { | |||
name.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
if(mListener!=null) mListener.clickName(view,position,bean); | |||
} | |||
}); | |||
delete.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
if(mListener!=null) mListener.clickDelete(view,position,bean); | |||
} | |||
}); | |||
@@ -66,10 +66,6 @@ public abstract class CloudGoodsAdapter extends BaseAdapter<BPA_GOODS,CloudGoods | |||
holder.binding.downLoad.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
if(downLoadGoods(view,position)){ | |||
ToastUtils.info("下载成功"); | |||
holder.binding.downLoad.setVisibility(View.GONE); | |||
@@ -81,10 +77,6 @@ public abstract class CloudGoodsAdapter extends BaseAdapter<BPA_GOODS,CloudGoods | |||
holder.binding.image.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
if (GoodsDBUtil.getByName(goods.name)==null) { | |||
ToastUtils.warning("请先下载该商品!"); | |||
} else { | |||
@@ -10,13 +10,11 @@ import androidx.recyclerview.widget.RecyclerView; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.base.BaseAdapter; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.db.mode.BPA_GOODS; | |||
import com.bonait.bnframework.common.glide.GlideUtil; | |||
import com.bonait.bnframework.common.image.MyBitmapUtils; | |||
import com.bonait.bnframework.common.utils.DisplayManager; | |||
import com.bonait.bnframework.databinding.ItemLocalGoodsBinding; | |||
import com.bonait.bnframework.ui.widget.NewToastUtil; | |||
/** | |||
* @author: liup | |||
@@ -55,10 +53,6 @@ public abstract class LocalGoodsAdapter extends BaseAdapter<BPA_GOODS,LocalGoods | |||
holder.binding.add.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
addGoods(); | |||
} | |||
}); | |||
@@ -79,10 +73,6 @@ public abstract class LocalGoodsAdapter extends BaseAdapter<BPA_GOODS,LocalGoods | |||
holder.binding.upload.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
// ConfigData.getInstance().UploadGoods(holder.itemView.getContext(), goods.id); | |||
uploadGoods(view,position); | |||
} | |||
@@ -92,10 +82,6 @@ public abstract class LocalGoodsAdapter extends BaseAdapter<BPA_GOODS,LocalGoods | |||
holder.binding.delete.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
deleteGoods(view,position); | |||
} | |||
}); | |||
@@ -104,10 +90,6 @@ public abstract class LocalGoodsAdapter extends BaseAdapter<BPA_GOODS,LocalGoods | |||
holder.binding.image.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
onItemClick(view,position); | |||
} | |||
}); | |||
@@ -87,13 +87,13 @@ public class AddGoodsDialog extends DialogFragment { | |||
if(getDialog()!=null){ | |||
Window window = getDialog().getWindow(); | |||
assert window != null; | |||
fullScreen(window); | |||
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); | |||
WindowManager.LayoutParams params = window.getAttributes(); | |||
params.gravity = Gravity.CENTER; | |||
params.width = ViewGroup.LayoutParams.MATCH_PARENT; | |||
params.height = ViewGroup.LayoutParams.MATCH_PARENT; | |||
window.setAttributes(params); | |||
fullScreen(window); | |||
} | |||
AdbCommandUtil.hideStatusBar(true); | |||
updateClassifyData(classifyPosition); | |||
@@ -107,13 +107,13 @@ public class AttributeSelectDialog extends DialogFragment { | |||
if (getDialog() != null) { | |||
Window window = getDialog().getWindow(); | |||
assert window != null; | |||
fullScreen(window); | |||
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); | |||
WindowManager.LayoutParams params = window.getAttributes(); | |||
params.gravity = Gravity.CENTER; | |||
params.width = ViewGroup.LayoutParams.MATCH_PARENT; | |||
params.height = ViewGroup.LayoutParams.MATCH_PARENT; | |||
window.setAttributes(params); | |||
fullScreen(window); | |||
} | |||
AdbCommandUtil.hideStatusBar(true); | |||
updateAttributeData(); | |||
@@ -136,7 +136,26 @@ public class AttributeSelectDialog extends DialogFragment { | |||
public void updateAttributeData(){ | |||
LogUtils.d(TAG+" updateAttributeData"); | |||
selectAttributeListAdapter = new SelectAttributeListAdapter(getContext(), R.layout.item_select_attribute_list,attributeList); | |||
selectAttributeListAdapter.setListener(new SelectAttributeListAdapter.CallBackListener() { | |||
@Override | |||
public void onClick() { | |||
String hasId = hasGroup(); | |||
if(hasId.isEmpty()){ | |||
viewBinding.tvExist.setText("不存在分组"); | |||
viewBinding.btnSubmit.setBackgroundResource(R.drawable.bg_round25_gray_btn); | |||
}else { | |||
if(groupId.equals(hasId)){ | |||
viewBinding.tvExist.setText("正在编辑分组无法导入"); | |||
viewBinding.btnSubmit.setBackgroundResource(R.drawable.bg_round25_gray_btn); | |||
}else { | |||
viewBinding.tvExist.setText("存在分组"); | |||
viewBinding.btnSubmit.setBackgroundResource(R.drawable.bg_round25_yellow_btn); | |||
} | |||
} | |||
} | |||
}); | |||
viewBinding.listAttribute.setAdapter(selectAttributeListAdapter); | |||
} | |||
public void setListener(DialogCallBack listener){ | |||
@@ -202,11 +221,11 @@ public class AttributeSelectDialog extends DialogFragment { | |||
* 判断是否存在该组合 | |||
*/ | |||
private String hasGroup(){ | |||
String groupId = ""; | |||
String id = ""; | |||
String idList = selectAttributeListAdapter.getSubAttributeIdList(); | |||
for(BPA_GOODS_SUBATTRIBUTE_GROUP bean : SubAttributeGroupDBUtil.getByGoodsId(goods.id)){ | |||
if(bean.subAttributeIdList.equals(idList)){ | |||
groupId = bean.id; | |||
id = bean.id; | |||
break; | |||
}else if(bean.subAttributeIdList.contains(",")&&idList.contains(",")){ | |||
String[] res = bean.subAttributeIdList.split(","); | |||
@@ -220,17 +239,17 @@ public class AttributeSelectDialog extends DialogFragment { | |||
} | |||
} | |||
if (xx) { | |||
groupId = bean.id; | |||
id = bean.id; | |||
break; | |||
} | |||
} | |||
} | |||
} | |||
LogUtils.d(TAG+"hasGroup groupId="+groupId); | |||
if(groupId.isEmpty()){ | |||
LogUtils.d(TAG+"hasGroup id="+id); | |||
if(id.isEmpty()){ | |||
return ""; | |||
} | |||
return groupId; | |||
return id; | |||
} | |||
public interface DialogCallBack{ | |||
@@ -103,6 +103,7 @@ public class DeviceControlDialog extends DialogFragment { | |||
if (getDialog() != null) { | |||
Window window = getDialog().getWindow(); | |||
assert window != null; | |||
fullScreen(window); | |||
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); | |||
WindowManager.LayoutParams params = window.getAttributes(); | |||
params.gravity = Gravity.TOP; | |||
@@ -110,7 +111,6 @@ public class DeviceControlDialog extends DialogFragment { | |||
params.height = ViewGroup.LayoutParams.MATCH_PARENT; | |||
window.setAttributes(params); | |||
window.setDimAmount(0.5f); | |||
fullScreen(window); | |||
} | |||
AdbCommandUtil.hideStatusBar(true); | |||
initView(); | |||
@@ -111,13 +111,13 @@ public class EditGoodsDialog extends DialogFragment { | |||
if(getDialog()!=null){ | |||
Window window = getDialog().getWindow(); | |||
assert window != null; | |||
fullScreen(window); | |||
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); | |||
WindowManager.LayoutParams params = window.getAttributes(); | |||
params.gravity = Gravity.CENTER; | |||
params.width = ViewGroup.LayoutParams.MATCH_PARENT; | |||
params.height = ViewGroup.LayoutParams.MATCH_PARENT; | |||
window.setAttributes(params); | |||
fullScreen(window); | |||
} | |||
if(getArguments()!=null){ | |||
goodId = getArguments().getString("goodId"); | |||
@@ -91,13 +91,13 @@ public class SubOrderDialog extends DialogFragment { | |||
if (getDialog() != null) { | |||
Window window = getDialog().getWindow(); | |||
assert window != null; | |||
fullScreen(window); | |||
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); | |||
WindowManager.LayoutParams params = window.getAttributes(); | |||
params.gravity = Gravity.CENTER; | |||
params.width = ViewGroup.LayoutParams.WRAP_CONTENT; | |||
params.height = ViewGroup.LayoutParams.WRAP_CONTENT; | |||
window.setAttributes(params); | |||
fullScreen(window); | |||
} | |||
AdbCommandUtil.hideStatusBar(true); | |||
initView(); | |||
@@ -318,8 +318,8 @@ public class HomeDevicesFragment extends BaseFragment { | |||
NewToastUtil.getInstance().showToast("当前用户权限无法操作"); | |||
return; | |||
} | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快"); | |||
if(ConfigName.getInstance().isFast2Click()){ | |||
NewToastUtil.getInstance().showToast("请勿快速点击!"); | |||
return; | |||
} | |||
if(ModbusHelper.get().isBtnStop()){ | |||
@@ -95,7 +95,7 @@ public class HomeFoodsFragment extends BaseFragment { | |||
*/ | |||
private void initTopBar() { | |||
viewBinding.topbar.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.topbj1)); | |||
viewBinding.topbar.setTitle("菜谱"); | |||
// viewBinding.topbar.setTitle("菜谱"); | |||
viewBinding.back.setVisibility(View.GONE); | |||
handler.sendEmptyMessageDelayed(1,1000L); | |||
@@ -154,6 +154,10 @@ public class CloudGoodsFragment extends BaseFragment { | |||
@Override | |||
protected boolean downLoadGoods(View v, int position) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return false; | |||
} | |||
return downLoadCloudGoods(position); | |||
} | |||
}; | |||
@@ -143,18 +143,29 @@ public class LocalGoodsFragment extends BaseFragment { | |||
@Override | |||
protected void onItemClick(View v, int position) { | |||
if(!ConfigName.getInstance().user.name.equals("一般用户")){ | |||
if(editGoodsDialog == null){ | |||
editGoodsDialog= new EditGoodsDialog(); | |||
} | |||
Bundle bundle = new Bundle(); | |||
bundle.putString("goodId",mData.get(position).id); | |||
bundle.putBoolean("isEdit",isEdit); | |||
editGoodsDialog.setArguments(bundle); | |||
if(getActivity()!=null){ | |||
editGoodsDialog.show(getActivity().getSupportFragmentManager(),"editGoods"); | |||
LogUtils.d(" LocalGoodsAdapter onItemClick position="+position); | |||
if(isFast2Click()){ | |||
NewToastUtil.getInstance().showToast("请勿快速点击!"); | |||
return; | |||
} | |||
try { | |||
if(!ConfigName.getInstance().user.name.equals("一般用户")){ | |||
if(editGoodsDialog == null){ | |||
editGoodsDialog = new EditGoodsDialog(); | |||
}else { | |||
editGoodsDialog.dismiss(); | |||
} | |||
Bundle bundle = new Bundle(); | |||
bundle.putString("goodId",mData.get(position).id); | |||
bundle.putBoolean("isEdit",isEdit); | |||
editGoodsDialog.setArguments(bundle); | |||
if(getActivity()!=null){ | |||
editGoodsDialog.show(getActivity().getSupportFragmentManager(),"editGoods"); | |||
} | |||
RecordManager.getInstance().addLogRecord("角色操作日志","点击["+mData.get(position).name+"]菜品"); | |||
} | |||
RecordManager.getInstance().addLogRecord("角色操作日志","点击["+mData.get(position).name+"]菜品"); | |||
}catch (Exception e){ | |||
e.printStackTrace(); | |||
} | |||
} | |||
@@ -164,6 +175,10 @@ public class LocalGoodsFragment extends BaseFragment { | |||
@Override | |||
protected void deleteGoods(View v, int position) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
return; | |||
} | |||
AlertDialogUtils.showCancelAndConfirmDialog((AppCompatActivity) getActivity(), R.layout.dialog_delete_classify, (layoutView, xCom) -> { | |||
BPA_GOODS bean = mData.get(position); | |||
DialogDeleteClassifyBinding binding = DialogDeleteClassifyBinding.bind(layoutView); | |||
@@ -222,14 +237,44 @@ public class LocalGoodsFragment extends BaseFragment { | |||
viewBinding.recyclerClassify.setAdapter(classifyAdapter); | |||
} | |||
/** | |||
* 判断重复点击 | |||
*/ | |||
private long lastTime; | |||
private long lastTime2; | |||
public boolean isFastClick(){ | |||
long curTime = System.currentTimeMillis(); | |||
if(curTime - lastTime < 1000){ | |||
return true; | |||
} | |||
lastTime = curTime; | |||
return false; | |||
} | |||
public boolean isFast2Click(){ | |||
long curTime = System.currentTimeMillis(); | |||
if(curTime - lastTime2 < 1000){ | |||
return true; | |||
} | |||
lastTime2 = curTime; | |||
return false; | |||
} | |||
/** | |||
* 添加菜品弹窗 | |||
*/ | |||
public void addGoodsDialog(){ | |||
if(isFastClick()){ | |||
NewToastUtil.getInstance().showToast("请勿快速点击!"); | |||
return; | |||
} | |||
if(!classifyList.isEmpty() && getActivity()!=null){ | |||
LogUtils.d(" addGoodsDialog addGoodsDialog="+addGoodsDialog); | |||
if(addGoodsDialog == null){ | |||
addGoodsDialog = new AddGoodsDialog(); | |||
}else { | |||
addGoodsDialog.dismiss(); | |||
} | |||
Bundle bundle = new Bundle(); | |||
bundle.putInt("classifyPosition",classifyAdapter.getCurrentPosition()); | |||
@@ -11,7 +11,7 @@ | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:background="@color/qmui_config_color_white"> | |||
<RelativeLayout | |||
android:layout_marginLeft="10dp" | |||
@@ -13,7 +13,7 @@ | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:orientation="vertical" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:background="@color/qmui_config_color_white"> | |||
<RelativeLayout | |||
@@ -108,7 +108,7 @@ | |||
<com.qmuiteam.qmui.widget.QMUITopBarLayout | |||
android:id="@+id/topbar" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" > | |||
android:layout_height="@dimen/home_tab_height" > | |||
<TextView | |||
android:id="@+id/back" | |||
android:layout_width="wrap_content" | |||
@@ -122,5 +122,15 @@ | |||
android:text=" 返 回" | |||
android:paddingRight="@dimen/dp_50" | |||
/> | |||
<TextView | |||
android:id="@+id/tab_title" | |||
android:layout_width="wrap_content" | |||
android:layout_height="match_parent" | |||
android:text="烹饪" | |||
android:textColor="@color/white" | |||
android:textSize="36sp" | |||
android:layout_gravity="center" | |||
android:gravity="center" | |||
/> | |||
</com.qmuiteam.qmui.widget.QMUITopBarLayout> | |||
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout> |
@@ -12,7 +12,7 @@ | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:background="@color/qmui_config_color_white"> | |||
<!-- 其他 --> | |||
@@ -12,7 +12,7 @@ | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:background="@color/qmui_config_color_white"> | |||
<!-- 其他 --> | |||
@@ -12,7 +12,7 @@ | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:background="@color/qmui_config_color_white"> | |||
<!-- 其他 --> | |||
@@ -8,7 +8,7 @@ | |||
<ScrollView | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:background="@color/activity_background"> | |||
<RelativeLayout | |||
android:layout_width="wrap_content" | |||
@@ -12,7 +12,7 @@ | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:background="@color/activity_background" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
@@ -11,7 +11,7 @@ | |||
<com.qmuiteam.qmui.widget.QMUITopBarLayout | |||
android:id="@+id/topbar" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content"> | |||
android:layout_height="@dimen/home_tab_height"> | |||
<TextView | |||
android:id="@+id/back" | |||
@@ -38,7 +38,7 @@ | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:orientation="vertical" | |||
android:layout_height="match_parent"> | |||
@@ -11,7 +11,7 @@ | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:background="@color/qmui_config_color_white"> | |||
<!-- 温度 --> | |||
@@ -13,7 +13,7 @@ | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:background="@color/qmui_config_color_white"> | |||
<ScrollView | |||
android:layout_width="match_parent" | |||
@@ -13,7 +13,7 @@ | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:background="@color/activity_background"> | |||
<ScrollView | |||
android:layout_width="match_parent" | |||
@@ -12,7 +12,7 @@ | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:background="@color/qmui_config_color_white"> | |||
<ScrollView | |||
android:layout_width="match_parent" | |||
@@ -14,7 +14,7 @@ | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:background="@color/qmui_config_color_white"> | |||
<ScrollView | |||
@@ -10,7 +10,7 @@ | |||
<androidx.constraintlayout.widget.ConstraintLayout | |||
android:id="@+id/content" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent"> | |||
@@ -246,7 +246,7 @@ | |||
<com.qmuiteam.qmui.widget.QMUITopBarLayout | |||
android:id="@+id/topbar" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" > | |||
android:layout_height="@dimen/home_tab_height" > | |||
<TextView | |||
android:id="@+id/back" | |||
android:layout_width="wrap_content" | |||
@@ -260,5 +260,14 @@ | |||
android:paddingLeft="@dimen/dp_5" | |||
android:drawablePadding="@dimen/dp_5" | |||
/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="match_parent" | |||
android:text="编辑分类" | |||
android:textColor="@color/white" | |||
android:textSize="36sp" | |||
android:layout_gravity="center" | |||
android:gravity="center" | |||
/> | |||
</com.qmuiteam.qmui.widget.QMUITopBarLayout> | |||
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout> |
@@ -10,7 +10,7 @@ | |||
<androidx.constraintlayout.widget.ConstraintLayout | |||
android:id="@+id/content" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent"> | |||
@@ -258,7 +258,7 @@ | |||
<com.qmuiteam.qmui.widget.QMUITopBarLayout | |||
android:id="@+id/topbar" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" > | |||
android:layout_height="@dimen/home_tab_height" > | |||
<TextView | |||
android:id="@+id/back" | |||
@@ -272,5 +272,14 @@ | |||
android:text=" 保存并返回" | |||
android:textColor="@color/white" | |||
android:textSize="@dimen/sp_32" /> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="match_parent" | |||
android:text="编辑工序" | |||
android:textColor="@color/white" | |||
android:textSize="36sp" | |||
android:layout_gravity="center" | |||
android:gravity="center" | |||
/> | |||
</com.qmuiteam.qmui.widget.QMUITopBarLayout> | |||
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout> |
@@ -12,7 +12,7 @@ | |||
<com.qmuiteam.qmui.widget.QMUITopBarLayout | |||
android:id="@+id/topbar" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" > | |||
android:layout_height="@dimen/home_tab_height" > | |||
<TextView | |||
android:id="@+id/back" | |||
android:layout_width="wrap_content" | |||
@@ -26,10 +26,19 @@ | |||
android:paddingLeft="@dimen/dp_5" | |||
android:drawablePadding="@dimen/dp_5" | |||
/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="match_parent" | |||
android:text="设备异常信息" | |||
android:textColor="@color/white" | |||
android:textSize="36sp" | |||
android:layout_gravity="center" | |||
android:gravity="center" | |||
/> | |||
</com.qmuiteam.qmui.widget.QMUITopBarLayout> | |||
<ScrollView | |||
android:layout_width="match_parent" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:layout_height="match_parent"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
@@ -10,7 +10,7 @@ | |||
app:qmui_skin_background="?attr/app_skin_common_background"> | |||
<LinearLayout | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:orientation="vertical"> | |||
@@ -12,7 +12,7 @@ | |||
<ScrollView | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:background="@color/activity_background"> | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
@@ -13,7 +13,7 @@ | |||
<RelativeLayout | |||
android:id="@+id/tabs" | |||
android:layout_marginTop="54dp" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
> | |||
@@ -32,7 +32,11 @@ | |||
android:textColor="@color/black" | |||
android:textSize="@dimen/sp_26" | |||
android:text="时间范围:" | |||
/> | |||
android:focusableInTouchMode="true" | |||
android:focusable="true" | |||
> | |||
<requestFocus/> | |||
</TextView> | |||
<TextView | |||
android:id="@+id/starttime" | |||
android:layout_width="@dimen/dp_200" | |||
@@ -195,7 +199,7 @@ | |||
<com.qmuiteam.qmui.widget.QMUITopBarLayout | |||
android:id="@+id/topbar" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" > | |||
android:layout_height="@dimen/home_tab_height" > | |||
<TextView | |||
android:id="@+id/back" | |||
android:layout_width="wrap_content" | |||
@@ -209,5 +213,14 @@ | |||
android:paddingLeft="@dimen/dp_5" | |||
android:drawablePadding="@dimen/dp_5" | |||
/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="match_parent" | |||
android:text="日志记录" | |||
android:textColor="@color/white" | |||
android:textSize="36sp" | |||
android:layout_gravity="center" | |||
android:gravity="center" | |||
/> | |||
</com.qmuiteam.qmui.widget.QMUITopBarLayout> | |||
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout> |
@@ -13,7 +13,7 @@ | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:background="@color/qmui_config_color_white" | |||
android:layout_marginTop="?attr/qmui_topbar_height"> | |||
android:layout_marginTop="@dimen/home_tab_height"> | |||
<RelativeLayout style="@style/button_wrapper_style"> | |||
@@ -12,7 +12,7 @@ | |||
<com.qmuiteam.qmui.widget.QMUITopBarLayout | |||
android:id="@+id/topbar" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content"> | |||
android:layout_height="@dimen/home_tab_height"> | |||
<TextView | |||
android:id="@+id/back" | |||
@@ -26,11 +26,21 @@ | |||
android:text=" 返 回" | |||
android:textColor="@color/white" | |||
android:textSize="@dimen/sp_32" /> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="match_parent" | |||
android:text="订单统计" | |||
android:textColor="@color/white" | |||
android:textSize="36sp" | |||
android:layout_gravity="center" | |||
android:gravity="center" | |||
/> | |||
</com.qmuiteam.qmui.widget.QMUITopBarLayout> | |||
<RelativeLayout | |||
android:id="@+id/tabs" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
> | |||
@@ -111,7 +121,11 @@ | |||
android:textSize="@dimen/sp_20" | |||
android:layout_marginTop="@dimen/dp_10" | |||
android:textColor="@color/red_primary" | |||
/> | |||
android:focusableInTouchMode="true" | |||
android:focusable="true" | |||
> | |||
<requestFocus/> | |||
</TextView> | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
@@ -10,7 +10,7 @@ | |||
<com.qmuiteam.qmui.widget.QMUITopBarLayout | |||
android:id="@+id/topbar" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" > | |||
android:layout_height="@dimen/home_tab_height" > | |||
<TextView | |||
android:id="@+id/back" | |||
android:layout_width="wrap_content" | |||
@@ -24,11 +24,20 @@ | |||
android:paddingLeft="@dimen/dp_5" | |||
android:drawablePadding="@dimen/dp_5" | |||
/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="match_parent" | |||
android:text="录制工序" | |||
android:textColor="@color/white" | |||
android:textSize="36sp" | |||
android:layout_gravity="center" | |||
android:gravity="center" | |||
/> | |||
</com.qmuiteam.qmui.widget.QMUITopBarLayout> | |||
<FrameLayout | |||
android:layout_width="match_parent" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:layout_height="match_parent"> | |||
<include | |||
@@ -19,7 +19,7 @@ | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:orientation="vertical" | |||
android:layout_height="match_parent"> | |||
<LinearLayout | |||
@@ -74,7 +74,7 @@ | |||
<RelativeLayout | |||
android:id="@+id/quanxian" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:layout_gravity="top" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
@@ -128,7 +128,7 @@ | |||
<com.qmuiteam.qmui.widget.QMUITopBarLayout | |||
android:id="@+id/topbar" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" > | |||
android:layout_height="@dimen/home_tab_height" > | |||
<TextView | |||
android:id="@+id/back" | |||
android:layout_width="wrap_content" | |||
@@ -142,5 +142,15 @@ | |||
android:paddingLeft="@dimen/dp_5" | |||
android:drawablePadding="@dimen/dp_5" | |||
/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="match_parent" | |||
android:text="料仓设置" | |||
android:textColor="@color/white" | |||
android:textSize="36sp" | |||
android:layout_gravity="center" | |||
android:gravity="center" | |||
/> | |||
</com.qmuiteam.qmui.widget.QMUITopBarLayout> | |||
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout> |
@@ -10,7 +10,7 @@ | |||
app:layout_constraintTop_toTopOf="parent" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" > | |||
android:layout_height="@dimen/home_tab_height" > | |||
<TextView | |||
android:id="@+id/back" | |||
android:layout_width="wrap_content" | |||
@@ -24,6 +24,15 @@ | |||
android:paddingLeft="@dimen/dp_5" | |||
android:drawablePadding="@dimen/dp_5" | |||
/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="match_parent" | |||
android:text="系统设置" | |||
android:textColor="@color/white" | |||
android:textSize="36sp" | |||
android:layout_gravity="center" | |||
android:gravity="center" | |||
/> | |||
</com.qmuiteam.qmui.widget.QMUITopBarLayout> | |||
<com.google.android.material.bottomnavigation.BottomNavigationView | |||
@@ -7,7 +7,7 @@ | |||
<ScrollView | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:background="@color/qmui_config_color_white" | |||
android:fitsSystemWindows="true"> | |||
@@ -11,7 +11,7 @@ | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:background="@color/qmui_config_color_white"> | |||
<LinearLayout | |||
@@ -69,6 +69,22 @@ | |||
android:text="取消" | |||
/> | |||
<TextView | |||
android:id="@+id/tv_exist" | |||
android:layout_width="wrap_content" | |||
android:layout_height="@dimen/dp_80" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintRight_toRightOf="parent" | |||
app:layout_constraintBottom_toBottomOf="parent" | |||
android:layout_marginLeft="@dimen/dp_20" | |||
android:layout_marginTop="@dimen/dp_30" | |||
android:layout_marginBottom="@dimen/dp_20" | |||
tools:text="存在" | |||
android:gravity="center" | |||
android:textColor="@color/app_color_blue" | |||
android:textSize="32sp" | |||
/> | |||
<ImageView | |||
android:id="@+id/btn_close" | |||
@@ -33,7 +33,7 @@ | |||
<!--子属性选择--> | |||
<include | |||
android:id="@+id/layout_attribute" | |||
android:layout_width="@dimen/dp_660" | |||
android:layout_width="@dimen/dp_740" | |||
android:layout_height="wrap_content" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintRight_toRightOf="parent" | |||
@@ -10,7 +10,7 @@ | |||
<ScrollView | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:background="@color/activity_background"> | |||
<RelativeLayout | |||
@@ -25,7 +25,7 @@ | |||
app:qmui_expandedTitleGravity="center_horizontal|bottom" | |||
app:qmui_expandedTitleMarginBottom="20dp" | |||
app:qmui_statusBarScrim="?attr/qmui_config_color_blue" | |||
android:minHeight="?attr/qmui_topbar_height"> | |||
android:minHeight="@dimen/home_tab_height"> | |||
<ImageView | |||
android:layout_width="match_parent" | |||
@@ -40,7 +40,7 @@ | |||
<com.qmuiteam.qmui.widget.QMUITopBar | |||
android:id="@+id/topbar" | |||
android:layout_width="match_parent" | |||
android:layout_height="?attr/qmui_topbar_height" | |||
android:layout_height="@dimen/home_tab_height" | |||
app:qmui_layout_collapseMode="pin" | |||
android:background="@color/qmui_config_color_transparent" | |||
app:qmui_bottomDividerHeight="0px"/> | |||
@@ -197,7 +197,7 @@ | |||
<!-- <ScrollView--> | |||
<!-- android:layout_width="match_parent"--> | |||
<!-- android:layout_height="match_parent"--> | |||
<!-- android:layout_marginTop="?attr/qmui_topbar_height"--> | |||
<!-- android:layout_marginTop="@dimen/home_tab_height"--> | |||
<!-- android:background="@color/qmui_config_color_white"--> | |||
<!-- android:fitsSystemWindows="true">--> | |||
@@ -8,7 +8,7 @@ | |||
<ScrollView | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:background="@color/qmui_config_color_white" | |||
android:fitsSystemWindows="true"> | |||
@@ -6,7 +6,8 @@ | |||
<com.qmuiteam.qmui.widget.QMUITopBarLayout | |||
android:id="@+id/topbar" | |||
android:layout_width="match_parent" | |||
android:layout_height="?attr/qmui_topbar_height" > | |||
style="@style/QDTopBar" | |||
android:layout_height="@dimen/home_tab_height" > | |||
<TextView | |||
android:id="@+id/back" | |||
android:layout_width="wrap_content" | |||
@@ -20,6 +21,18 @@ | |||
android:paddingLeft="@dimen/dp_5" | |||
android:drawablePadding="@dimen/dp_5" | |||
/> | |||
<TextView | |||
android:id="@+id/tab_title" | |||
android:layout_width="wrap_content" | |||
android:layout_height="match_parent" | |||
tools:text="菜谱" | |||
android:textColor="@color/white" | |||
android:textSize="36sp" | |||
android:layout_gravity="center" | |||
android:gravity="center" | |||
/> | |||
<TextView | |||
android:id="@+id/tv_connect" | |||
android:layout_width="wrap_content" | |||
@@ -35,7 +48,7 @@ | |||
<RelativeLayout | |||
android:id="@+id/content" | |||
android:layout_width="match_parent" | |||
android:layout_marginTop="?attr/qmui_topbar_height" | |||
android:layout_marginTop="@dimen/home_tab_height" | |||
android:layout_height="match_parent"> | |||
<LinearLayout | |||
android:id="@+id/tab" | |||
@@ -8,7 +8,7 @@ | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginTop="?attr/qmui_topbar_height"> | |||
android:layout_marginTop="@dimen/home_tab_height"> | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
@@ -12,8 +12,8 @@ | |||
<ImageView | |||
android:id="@+id/toast_icon" | |||
android:layout_width="@dimen/dp_50" | |||
android:layout_height="@dimen/dp_50" | |||
android:layout_width="@dimen/dp_60" | |||
android:layout_height="@dimen/dp_60" | |||
android:src="@mipmap/boluo" | |||
/> | |||
@@ -21,7 +21,7 @@ | |||
android:id="@+id/toast_text" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:textSize="@dimen/sp_26" | |||
android:textSize="@dimen/sp_32" | |||
android:textColor="@color/white" | |||
android:layout_toRightOf="@id/toast_icon" | |||
android:paddingLeft="@dimen/dp_15" | |||
@@ -1,7 +1,7 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<resources> | |||
<dimen name="home_tab_height">56dp</dimen> | |||
<dimen name="home_tab_height">80dp</dimen> | |||
<dimen name="common_content_spacing">@dimen/qmui_content_spacing_horizontal</dimen> | |||
<dimen name="text_size_normal">32sp</dimen> | |||
<!-- ListView --> | |||
@@ -35,8 +35,8 @@ task clean(type: Delete) { | |||
ext { // 统一版本入口 | |||
//App版本号 | |||
versionCode = 209 | |||
versionName = "2.0.9" | |||
versionCode = 210 | |||
versionName = "2.1.0" | |||
// 支持Android版本 | |||
buildToolsVersion = "33.0.0" | |||