Browse Source

修改

桌面小炒机
liup 7 months ago
parent
commit
ca13f1f185
3 changed files with 16 additions and 0 deletions
  1. +3
    -0
      app/src/main/java/com/bonait/bnframework/ui/fragment/HomeDevicesFragment.java
  2. +1
    -0
      app/src/main/java/com/bonait/bnframework/ui/fragment/HomeFoodsFragment.java
  3. +12
    -0
      app/src/main/res/layout/fragment_home_foods.xml

+ 3
- 0
app/src/main/java/com/bonait/bnframework/ui/fragment/HomeDevicesFragment.java View File

@@ -279,6 +279,9 @@ public class HomeDevicesFragment extends BaseFragment {
* @param type 1加热 2液体 3主料 4搅拌
*/
private void showControlDialog(int type){
if(ConfigName.getInstance().isFastClick()){
return;
}
if(ModbusHelper.get().isBtnStop()){
NewToastUtil.getInstance().showToast("设备已急停,请关闭急停按钮再调试!");
return;


+ 1
- 0
app/src/main/java/com/bonait/bnframework/ui/fragment/HomeFoodsFragment.java View File

@@ -100,6 +100,7 @@ public class HomeFoodsFragment extends BaseFragment {
viewBinding.topbar.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.topbj1));
viewBinding.topbar.setTitle("菜谱");
viewBinding.topbar.addRightTextButton("设备状态:"+ (ModbusHelper.get().getConnected() ? "已连接" : "未连接"),R.id.status_image);
viewBinding.back.setVisibility(View.GONE);
handler.sendEmptyMessageDelayed(1,1000L);

}


+ 12
- 0
app/src/main/res/layout/fragment_home_foods.xml View File

@@ -7,6 +7,18 @@
android:id="@+id/topbar"
android:layout_width="match_parent"
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>

<RelativeLayout


Loading…
Cancel
Save