@@ -279,6 +279,9 @@ public class HomeDevicesFragment extends BaseFragment { | |||||
* @param type 1加热 2液体 3主料 4搅拌 | * @param type 1加热 2液体 3主料 4搅拌 | ||||
*/ | */ | ||||
private void showControlDialog(int type){ | private void showControlDialog(int type){ | ||||
if(ConfigName.getInstance().isFastClick()){ | |||||
return; | |||||
} | |||||
if(ModbusHelper.get().isBtnStop()){ | if(ModbusHelper.get().isBtnStop()){ | ||||
NewToastUtil.getInstance().showToast("设备已急停,请关闭急停按钮再调试!"); | NewToastUtil.getInstance().showToast("设备已急停,请关闭急停按钮再调试!"); | ||||
return; | return; | ||||
@@ -100,6 +100,7 @@ public class HomeFoodsFragment extends BaseFragment { | |||||
viewBinding.topbar.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.topbj1)); | viewBinding.topbar.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.topbj1)); | ||||
viewBinding.topbar.setTitle("菜谱"); | viewBinding.topbar.setTitle("菜谱"); | ||||
viewBinding.topbar.addRightTextButton("设备状态:"+ (ModbusHelper.get().getConnected() ? "已连接" : "未连接"),R.id.status_image); | viewBinding.topbar.addRightTextButton("设备状态:"+ (ModbusHelper.get().getConnected() ? "已连接" : "未连接"),R.id.status_image); | ||||
viewBinding.back.setVisibility(View.GONE); | |||||
handler.sendEmptyMessageDelayed(1,1000L); | handler.sendEmptyMessageDelayed(1,1000L); | ||||
} | } | ||||
@@ -7,6 +7,18 @@ | |||||
android:id="@+id/topbar" | android:id="@+id/topbar" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="?attr/qmui_topbar_height" > | android:layout_height="?attr/qmui_topbar_height" > | ||||
<TextView | |||||
android:id="@+id/back" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="match_parent" | |||||
android:textColor="@color/white" | |||||
android:textSize="@dimen/sp_32" | |||||
android:text="返回" | |||||
android:drawableLeft="@mipmap/fanhui" | |||||
android:gravity="center" | |||||
android:paddingLeft="@dimen/dp_5" | |||||
android:drawablePadding="@dimen/dp_5" | |||||
/> | |||||
</com.qmuiteam.qmui.widget.QMUITopBarLayout> | </com.qmuiteam.qmui.widget.QMUITopBarLayout> | ||||
<RelativeLayout | <RelativeLayout | ||||