Explorar el Código

测试

tags/old_version_1
fyf hace 1 año
padre
commit
fa953fe0d0
Se han modificado 19 ficheros con 823 adiciones y 130 borrados
  1. +2
    -1
      app/build.gradle
  2. +9
    -16
      app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java
  3. +173
    -16
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java
  4. +110
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/imagebutton_control.java
  5. +492
    -97
      app/src/main/res/layout/fragment_home1.xml
  6. +32
    -0
      app/src/main/res/layout/item/layout/item_imagebutton.xml
  7. BIN
     
  8. BIN
     
  9. BIN
     
  10. BIN
     
  11. BIN
     
  12. BIN
     
  13. BIN
     
  14. BIN
     
  15. BIN
     
  16. BIN
     
  17. BIN
     
  18. BIN
     
  19. +5
    -0
      app/src/main/res/values/attrs.xml

+ 2
- 1
app/build.gradle Ver fichero

@@ -133,5 +133,6 @@ dependencies {

implementation 'com.yanzhenjie:permission:2.0.0-rc12'


//滑动快
// implementation 'io.github.litao0621:nifty-slider:1.0.2'
}

+ 9
- 16
app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java Ver fichero

@@ -467,13 +467,12 @@ public class ExecuteTheRecipe {
public static void Write_PLC_Clean(MyStatus data) {
try {
if (data == MyStatus.Start) {
ToastUtils.info("点击启动搅拌清洗按钮");

} else if (data == MyStatus.Paused) {
ToastUtils.info("点击暂停清洗按钮");
ToastUtils.info("炒锅开始清洗!");
WritePLC("炒锅清洗", true,null);

} else if (data == MyStatus.Stop) {
ToastUtils.info("点击停止清洗按钮");
ToastUtils.info("炒锅停止清洗!");
WritePLC("炒锅清洗", false,null);
}
} catch (Exception ex) {
ToastUtils.error("异常信息:" + ex.getMessage());
@@ -481,21 +480,15 @@ public class ExecuteTheRecipe {
}

/**
* 点击清洗按钮
* 点击移动位置按钮
*
* @param data
*/
public static void Write_PLC_Location(LocationStatus data) {
public static void Write_PLC_Location(String data) {
try {
if (data == LocationStatus.InLocation) {
ToastUtils.info("点击炒菜位按钮");

} else if (data == LocationStatus.OutLocation) {
ToastUtils.info("点击出菜位按钮");

} else if (data == LocationStatus.PourWaterLocation) {
ToastUtils.info("点击倒水位按钮");
}
ToastUtils.info("点击按钮:"+data);
//原点位,等待机器移动倒响应位置
WritePLC(data, true,null);
} catch (Exception ex) {
ToastUtils.error("异常信息:" + ex.getMessage());
}


+ 173
- 16
app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java Ver fichero

@@ -16,6 +16,7 @@ import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.SeekBar;

import com.bonait.bnframework.R;
import com.bonait.bnframework.business.ExecuteTheRecipe;
@@ -26,6 +27,7 @@ import com.bonait.bnframework.common.db.mode.BPA_GOODS;
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE;
import com.bonait.bnframework.common.helper.ByteHelper;
import com.bonait.bnframework.common.helper.I.IThread;
import com.bonait.bnframework.common.helper.I.IWriteCallBack;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.helper.MessageLog;
import com.bonait.bnframework.common.helper.ThreadManager;
@@ -38,6 +40,7 @@ import com.bonait.bnframework.modules.home.fragment.from.CpxzActivity;
import com.bonait.bnframework.modules.home.fragment.mode.LocationStatus;
import com.bonait.bnframework.modules.home.fragment.mode.MyStatus;
import com.bonait.bnframework.modules.home.fragment.mode.huoli_control;
import com.bonait.bnframework.modules.home.fragment.mode.imagebutton_control;
import com.capton.colorfulprogressbar.ColorfulProgressbar;
import com.orhanobut.logger.Logger;
import com.qmuiteam.qmui.widget.QMUITopBar;
@@ -73,6 +76,21 @@ public class Home1Fragment extends BaseFragment {
huoli_control huoli;//火力控件
@BindView(R.id.startbutton)
ImageView startbutton;//启动安
@BindView(R.id.choushui_control)
imagebutton_control choushui_control;//抽水
@BindView(R.id.fangshui_control)
imagebutton_control fangshui_control;//防水
@BindView(R.id.jiaoban_control)
imagebutton_control jiaoban_control;//搅拌
@BindView(R.id.zhuandong_control_left)
imagebutton_control zhuandong_control_left;//左转
@BindView(R.id.zhuandong_control_Rift)
imagebutton_control zhuandong_control_Rift;//右转

@BindView(R.id.jb_dw)
SeekBar jb_dw;//
@BindView(R.id.zd_dw)
SeekBar zd_dw;//
public boolean Status = false;
/**
* 当前制作商品信息
@@ -99,6 +117,7 @@ public class Home1Fragment extends BaseFragment {
initData();
HuoLiClicked();
MakeThread();
ControlClicked();
}

/**
@@ -168,6 +187,124 @@ public class Home1Fragment extends BaseFragment {
};
}

public void ControlClicked()
{
// @BindView(R.id.choushui_control)
// imagebutton_control choushui_control;//抽水
// @BindView(R.id.fangshui_control)
// imagebutton_control fangshui_control;//防水
jiaoban_control.mListener=new MyClickListener() {
@Override
public void clickListener(View v, Object data) {
boolean status=(boolean) data;
int jd= jb_dw.getProgress();
ToastUtils.info("点击按钮:搅拌"+status+".搅拌频率:"+jd);
ExecuteTheRecipe.WritePLC("搅拌速度", jd, new IWriteCallBack() {
@Override
public void onSuccess() {
if(jd==0)
{
ExecuteTheRecipe.WritePLC("搅拌", false,null);
}else
{
ExecuteTheRecipe.WritePLC("搅拌", status,null);
}
}
@Override
public void onFailure(String ErrorMsg) {
}
});

}
@Override
public void clickListenerNew(View v, int k, Object data) {

}
};
zhuandong_control_left.mListener=new MyClickListener() {
@Override
public void clickListener(View v, Object data) {
boolean status=(boolean) data;
ToastUtils.info("点击按钮:炒锅正转"+status);
int jd= zd_dw.getProgress();
ToastUtils.info("点击按钮:搅拌"+status+".转动频率:"+jd);
ExecuteTheRecipe.WritePLC("转动速度", jd, new IWriteCallBack() {
@Override
public void onSuccess() {
if(jd==0)
{
ExecuteTheRecipe.WritePLC("翻转正转", false,null);
}else
{
ExecuteTheRecipe.WritePLC("翻转正转", status,null);
}
}
@Override
public void onFailure(String ErrorMsg) {
}
});
}
@Override
public void clickListenerNew(View v, int k, Object data) {

}
};
zhuandong_control_Rift.mListener=new MyClickListener() {
@Override
public void clickListener(View v, Object data) {
boolean status=(boolean) data;
ToastUtils.info("点击按钮:炒锅反转"+status);
int jd= zd_dw.getProgress();
ToastUtils.info("点击按钮:搅拌"+status+".转动频率:"+jd);
ExecuteTheRecipe.WritePLC("转动速度", jd, new IWriteCallBack() {
@Override
public void onSuccess() {
if(jd==0)
{
ExecuteTheRecipe.WritePLC("翻转反转", false,null);
}else
{
ExecuteTheRecipe.WritePLC("翻转反转", status,null);
}
}
@Override
public void onFailure(String ErrorMsg) {
}
});
}
@Override
public void clickListenerNew(View v, int k, Object data) {

}
};

choushui_control.mListener=new MyClickListener() {
@Override
public void clickListener(View v, Object data) {
boolean status=(boolean) data;
ToastUtils.info("点击按钮:炒锅抽水"+status);
ExecuteTheRecipe.WritePLC("炒锅抽水", status,null);
}
@Override
public void clickListenerNew(View v, int k, Object data) {

}
};

fangshui_control.mListener=new MyClickListener() {
@Override
public void clickListener(View v, Object data) {
boolean status=(boolean) data;
ToastUtils.info("点击按钮:炒锅放水"+status);
ExecuteTheRecipe.WritePLC("炒锅放水", status,null);
}
@Override
public void clickListenerNew(View v, int k, Object data) {

}
};
}

/**
* 商品制作线程
*/
@@ -287,8 +424,10 @@ public class Home1Fragment extends BaseFragment {
*
* @param view
*/
@OnClick({R.id.xzcp, R.id.startbutton, R.id.qdjb, R.id.ztjb, R.id.tzjb
, R.id.ccw, R.id.chucw, R.id.dsw, R.id.yaoqian, R.id.tingyao})
@OnClick({R.id.xzcp, R.id.startbutton, R.id.qdjb, R.id.tzjb
, R.id.yaoqian, R.id.tingyao
, R.id.ydw, R.id.dcw, R.id.clw,R.id.qxw,R.id.ccw1,R.id.ccw2,R.id.ccw3
, R.id.chushihua,R.id.jiting})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.xzcp://选择菜谱按钮点击
@@ -327,30 +466,48 @@ public class Home1Fragment extends BaseFragment {
});
}
break;
case R.id.qdjb:
case R.id.qdjb://开始搅拌
ExecuteTheRecipe.Write_PLC_Clean(MyStatus.Start);
break;
case R.id.ztjb:
ExecuteTheRecipe.Write_PLC_Clean(MyStatus.Paused);
break;
case R.id.tzjb:
case R.id.tzjb://停止搅拌
ExecuteTheRecipe.Write_PLC_Clean(MyStatus.Stop);
break;
case R.id.ccw:
ExecuteTheRecipe.Write_PLC_Location(LocationStatus.InLocation);
break;
case R.id.chucw:
ExecuteTheRecipe.Write_PLC_Location(LocationStatus.OutLocation);
break;
case R.id.dsw:
ExecuteTheRecipe.Write_PLC_Location(LocationStatus.PourWaterLocation);
break;
case R.id.yaoqian:
ExecuteTheRecipe.Write_PLC_YaoQian(MyStatus.Start);
break;
case R.id.tingyao:
ExecuteTheRecipe.Write_PLC_YaoQian(MyStatus.Stop);
break;
case R.id.ydw://R.id.ydw, R.id.dcw, R.id.clw,R.id.qxw,R.id.ccw1,R.id.ccw2,R.id.ccw3
ExecuteTheRecipe.Write_PLC_Location("原点位");
break;
case R.id.dcw:
ExecuteTheRecipe.Write_PLC_Location("倒菜位");
break;
case R.id.clw:
ExecuteTheRecipe.Write_PLC_Location("抽料位");
break;
case R.id.qxw:
ExecuteTheRecipe.Write_PLC_Location("清洗位");
break;
case R.id.ccw1:
ExecuteTheRecipe.Write_PLC_Location("炒菜位1");
break;
case R.id.ccw2:
ExecuteTheRecipe.Write_PLC_Location("炒菜位2");
break;
case R.id.ccw3:
ExecuteTheRecipe.Write_PLC_Location("炒菜位3");
break;

case R.id.chushihua:
ToastUtils.info("点击按钮:初始化");
ExecuteTheRecipe.WritePLC("初始化", true,null);
break;
case R.id.jiting:
ToastUtils.info("点击按钮:急停");
ExecuteTheRecipe.WritePLC("停止", true,null);
break;
}
}



+ 110
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/imagebutton_control.java Ver fichero

@@ -0,0 +1,110 @@
package com.bonait.bnframework.modules.home.fragment.mode;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.helper.I.MyClickListener;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class imagebutton_control extends LinearLayout {

@BindView(R.id.image_u)
ImageView image_u;

@BindView(R.id.text_u)
TextView text_u;
private int ks_ys = R.mipmap.start;
private int tz_ys = R.mipmap.stop;

/**
* 当前状态
*/
public boolean Status=false;
/**
* 点击事件
*/
public MyClickListener mListener=null;

private View root;

public imagebutton_control(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
root= LayoutInflater.from(context).inflate(R.layout.item_imagebutton, this);
ButterKnife.bind(this, root);
initParams(root.getContext(), attrs);
Init();
}

private void initParams(Context context, AttributeSet attrs) {
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.imagebutton_control);
if (typedArray != null) {
try {
ks_ys = typedArray.getResourceId(R.styleable.imagebutton_control_imagesrc_ks, R.mipmap.start);
tz_ys = typedArray.getResourceId(R.styleable.imagebutton_control_imagesrc_tz,R.mipmap.stop);
typedArray.recycle();
}catch (Exception exception)
{
Log.i("错误", exception.getMessage());
}

}
}

public void Init()
{
String str= this.getTag().toString();
if(!str.isEmpty())
{
text_u.setText(str);
}else
{
text_u.setText("");
}

SetStatus();
}

@OnClick({R.id.startjb})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.startjb:
Status=!Status;
SetStatus();
break;
}

if(mListener!=null)
{
mListener.clickListener(root,Status);
}
}

/**
* 设置级别
* @param
*/
public void SetStatus()
{
if(Status)
{
image_u.setImageResource(tz_ys);
}else
{
image_u.setImageResource(ks_ys);
}
}
}

+ 492
- 97
app/src/main/res/layout/fragment_home1.xml Ver fichero

@@ -172,7 +172,6 @@ android:orientation="vertical">
<RelativeLayout
android:layout_marginTop="5dp"
android:layout_marginLeft="2dp"
android:layout_marginBottom="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
@@ -197,43 +196,113 @@ android:orientation="vertical">
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:textSize="16dp"
android:text="搅拌选择"/>
android:text="搅拌挡位"/>
</RelativeLayout>

<RelativeLayout
android:layout_width="wrap_content"
<LinearLayout
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
<RelativeLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent">
<SeekBar android:id="@+id/jb_dw"
android:layout_width="match_parent"
android:layout_marginRight="@dimen/dp_10"
android:layout_height="wrap_content"
android:maxHeight="30.0dip"
android:max="10"
android:minHeight="30.0dip"
android:thumbOffset="5.0dip"
android:layout_centerVertical="true"
style="@android:attr/progressBarStyleHorizontal" />

</RelativeLayout>

<RelativeLayout
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_width="120dp"
android:layout_height="match_parent"
android:layout_marginRight="@dimen/dp_10">
<LinearLayout
android:id="@+id/startjb"
<com.bonait.bnframework.modules.home.fragment.mode.imagebutton_control
android:id="@+id/jiaoban_control"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<RelativeLayout
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="wrap_content"
android:layout_height="match_parent">
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:tag=""
app:imagesrc_ks="@mipmap/ks_jb"
app:imagesrc_tz="@mipmap/tz_jb"
/>
<ImageView
android:layout_width="wrap_content"
android:src="@color/color1"
android:layout_height="wrap_content">
</ImageView>
</RelativeLayout>
</LinearLayout>
</LinearLayout>

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@mipmap/start" />
</RelativeLayout>
<RelativeLayout
<!-- 转动 -->
<LinearLayout
android:layout_marginTop="2dp"
android:padding="5dp"
android:background="@color/qmui_config_color_white"
android:layout_width="match_parent"
android:layout_height="60dp">

<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:textSize="16dp"
android:text="转动挡位"/>
</RelativeLayout>

<LinearLayout
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_weight="1"
android:layout_height="match_parent">
<SeekBar android:id="@+id/zd_dw"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/dp_10"
android:maxHeight="30.0dip"
android:max="60"
android:minHeight="30.0dip"
android:thumbOffset="5.0dip"
android:layout_centerVertical="true"
style="@android:attr/progressBarStyleHorizontal" />

</RelativeLayout>

<LinearLayout
android:layout_width="120dp"
android:layout_marginRight="@dimen/dp_10"
android:layout_height="match_parent">
<RelativeLayout
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginRight="@dimen/dp_10">
<com.bonait.bnframework.modules.home.fragment.mode.imagebutton_control
android:id="@+id/zhuandong_control_left"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="搅拌"
android:textSize="19dp"/>
</RelativeLayout>
</LinearLayout>
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:tag=""
app:imagesrc_ks="@mipmap/ks_zz"
app:imagesrc_tz="@mipmap/tz_zz"
>
</com.bonait.bnframework.modules.home.fragment.mode.imagebutton_control>
</RelativeLayout>

<!--边框分割细线-->
<RelativeLayout
@@ -241,6 +310,7 @@ android:orientation="vertical">
android:layout_marginRight="5dp"
android:layout_width="wrap_content"
android:layout_height="match_parent">

<LinearLayout
android:layout_width="1dp"
android:layout_height="50dp"
@@ -248,41 +318,184 @@ android:orientation="vertical">
android:background="@color/activity_background" />
</RelativeLayout>

<LinearLayout
android:id="@+id/stopjb"
<RelativeLayout
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginRight="@dimen/dp_10">
<com.bonait.bnframework.modules.home.fragment.mode.imagebutton_control
android:id="@+id/zhuandong_control_Rift"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:tag=""
app:imagesrc_ks="@mipmap/ks_fz"
app:imagesrc_tz="@mipmap/tz_fz">
</com.bonait.bnframework.modules.home.fragment.mode.imagebutton_control>
</RelativeLayout>
</LinearLayout>


</LinearLayout>
</LinearLayout>

<!-- 常规控制 -->
<LinearLayout
android:layout_marginTop="2dp"
android:padding="5dp"
android:background="@color/qmui_config_color_white"
android:layout_width="match_parent"
android:layout_height="60dp">

<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:textSize="16dp"
android:text="常规控制"/>
</RelativeLayout>

<LinearLayout
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/chushihua"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<RelativeLayout
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="30dp"
android:layout_height="match_parent">

<ImageView
android:layout_width="30dp"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@mipmap/chushihua" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<RelativeLayout
<TextView
android:layout_marginLeft="@dimen/dp_4"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<ImageView
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/stop"/>
</RelativeLayout>
<RelativeLayout
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="初始化"/>
</RelativeLayout>
</LinearLayout>

<!--边框分割细线-->
<RelativeLayout
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_width="wrap_content"
android:layout_height="match_parent">

<LinearLayout
android:layout_width="1dp"
android:layout_height="50dp"
android:layout_centerInParent="true"
android:background="@color/activity_background" />
</RelativeLayout>

<LinearLayout
android:id="@+id/jiting"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<RelativeLayout
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="wrap_content"
android:layout_height="match_parent">

<ImageView
android:layout_width="30dp"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@mipmap/jiting" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<TextView
android:layout_marginLeft="@dimen/dp_4"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="停止"
android:textSize="19dp"/>
</RelativeLayout>
</LinearLayout>
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="急停"/>
</RelativeLayout>
</LinearLayout>
</RelativeLayout>

<!--边框分割细线-->
<RelativeLayout
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_width="wrap_content"
android:layout_height="match_parent">

<LinearLayout
android:layout_width="1dp"
android:layout_height="50dp"
android:layout_centerInParent="true"
android:background="@color/activity_background" />
</RelativeLayout>

<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<com.bonait.bnframework.modules.home.fragment.mode.imagebutton_control
android:id="@+id/choushui_control"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:tag="炒锅抽水"
app:imagesrc_ks="@mipmap/ks_cs"
app:imagesrc_tz="@mipmap/tz_cs">
</com.bonait.bnframework.modules.home.fragment.mode.imagebutton_control>
</RelativeLayout>

<!--边框分割细线-->
<RelativeLayout
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_width="wrap_content"
android:layout_height="match_parent">

<LinearLayout
android:layout_width="1dp"
android:layout_height="50dp"
android:layout_centerInParent="true"
android:background="@color/activity_background" />
</RelativeLayout>

<RelativeLayout
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<com.bonait.bnframework.modules.home.fragment.mode.imagebutton_control
android:id="@+id/fangshui_control"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:tag="抽洗锅水"
app:imagesrc_ks="@mipmap/ks_cs"
app:imagesrc_tz="@mipmap/tz_cs">
</com.bonait.bnframework.modules.home.fragment.mode.imagebutton_control>
</RelativeLayout>
</LinearLayout>
</LinearLayout>

<!-- 清洗 -->
<LinearLayout
android:layout_marginTop="10dp"
android:layout_marginTop="2dp"
android:padding="5dp"
android:background="@color/qmui_config_color_white"
android:layout_width="match_parent"
android:layout_height="100dp">
android:layout_height="70dp">

<RelativeLayout
android:layout_width="140dp"
@@ -347,7 +560,7 @@ android:orientation="vertical">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="搅拌"
android:text="开始"
android:textSize="19dp"/>
</RelativeLayout>
</LinearLayout>
@@ -358,16 +571,15 @@ android:orientation="vertical">
android:layout_marginRight="5dp"
android:layout_width="wrap_content"
android:layout_height="match_parent">

<LinearLayout
android:layout_centerInParent="true"
android:layout_width="1dp"
android:layout_height="50dp"
android:layout_centerInParent="true"
android:background="@color/activity_background" />
</RelativeLayout>

<LinearLayout
android:id="@+id/ztjb"
android:id="@+id/tzjb"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<RelativeLayout
@@ -378,7 +590,7 @@ android:orientation="vertical">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@mipmap/zhanting" />
android:src="@mipmap/stop" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
@@ -387,36 +599,117 @@ android:orientation="vertical">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="停"
android:text="停"
android:textSize="19dp"/>
</RelativeLayout>
</LinearLayout>

</LinearLayout>
</RelativeLayout>

</LinearLayout>

<!-- 控制 -->
<LinearLayout
android:layout_marginTop="2dp"
android:padding="5dp"
android:background="@color/qmui_config_color_white"
android:layout_width="match_parent"
android:layout_height="60dp">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<LinearLayout
android:layout_alignParentLeft="true"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginRight="@dimen/dp_10">
<LinearLayout
android:id="@+id/ydw"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="26dp"
android:layout_height="match_parent">
<ImageView
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/dw1"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="原点"/>
</RelativeLayout>
</LinearLayout>

<!--边框分割细线-->
<RelativeLayout
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<LinearLayout
android:layout_centerInParent="true"
android:layout_width="1dp"
android:layout_height="50dp"
android:layout_height="30dp"
android:background="@color/activity_background" />
</RelativeLayout>

<LinearLayout
android:id="@+id/tzjb"
android:id="@+id/dcw"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="26dp"
android:layout_height="match_parent">
<ImageView
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/dw2"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="倒菜"/>
</RelativeLayout>
</LinearLayout>

<!--边框分割细线-->
<RelativeLayout
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<LinearLayout
android:layout_centerInParent="true"
android:layout_width="1dp"
android:layout_height="30dp"
android:background="@color/activity_background" />
</RelativeLayout>

<LinearLayout
android:id="@+id/clw"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="26dp"
android:layout_height="match_parent">
<ImageView
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/stop"/>
android:src="@mipmap/dw2"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
@@ -425,33 +718,62 @@ android:orientation="vertical">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="停止"
android:textSize="19dp"/>
android:text="抽料"/>
</RelativeLayout>
</LinearLayout>

</LinearLayout>
</RelativeLayout>
<!--边框分割细线-->
<RelativeLayout
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<LinearLayout
android:layout_centerInParent="true"
android:layout_width="1dp"
android:layout_height="30dp"
android:background="@color/activity_background" />
</RelativeLayout>

</LinearLayout>
<LinearLayout
android:id="@+id/qxw"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="26dp"
android:layout_height="match_parent">
<ImageView
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/dw2"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="清洗"/>
</RelativeLayout>
</LinearLayout>

<!--边框分割细线-->
<RelativeLayout
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<LinearLayout
android:layout_centerInParent="true"
android:layout_width="1dp"
android:layout_height="30dp"
android:background="@color/activity_background" />
</RelativeLayout>

<!-- 控制 -->
<LinearLayout
android:layout_marginTop="10dp"
android:padding="5dp"
android:background="@color/qmui_config_color_white"
android:layout_width="match_parent"
android:layout_height="60dp">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<LinearLayout
android:layout_alignParentLeft="true"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginRight="@dimen/dp_10">
<LinearLayout
android:id="@+id/ccw"
android:id="@+id/ccw1"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<RelativeLayout
@@ -461,7 +783,7 @@ android:orientation="vertical">
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/dw1"/>
android:src="@mipmap/dw3"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
@@ -470,14 +792,14 @@ android:orientation="vertical">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="炒菜"/>
android:text="炒菜1"/>
</RelativeLayout>
</LinearLayout>

<!--边框分割细线-->
<RelativeLayout
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<LinearLayout
@@ -488,7 +810,7 @@ android:orientation="vertical">
</RelativeLayout>

<LinearLayout
android:id="@+id/chucw"
android:id="@+id/ccw2"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<RelativeLayout
@@ -498,7 +820,7 @@ android:orientation="vertical">
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/dw2"/>
android:src="@mipmap/dw3"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
@@ -507,14 +829,14 @@ android:orientation="vertical">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="出菜位"/>
android:text="炒菜2"/>
</RelativeLayout>
</LinearLayout>

<!--边框分割细线-->
<RelativeLayout
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<LinearLayout
@@ -525,7 +847,7 @@ android:orientation="vertical">
</RelativeLayout>

<LinearLayout
android:id="@+id/dsw"
android:id="@+id/ccw3"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<RelativeLayout
@@ -544,13 +866,15 @@ android:orientation="vertical">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="倒水位"/>
android:text="炒菜3"/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>

<!-- 临时屏蔽要钱 -->
<RelativeLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
@@ -565,11 +889,12 @@ android:orientation="vertical">
<RelativeLayout
android:layout_width="26dp"
android:layout_height="match_parent">

<ImageView
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/start"/>
android:layout_centerInParent="true"
android:src="@mipmap/start" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
@@ -622,6 +947,76 @@ android:orientation="vertical">
</LinearLayout>
</RelativeLayout>
</LinearLayout>

<!-- 监控 -->
<LinearLayout
android:layout_marginTop="2dp"
android:padding="5dp"
android:background="@color/qmui_config_color_white"
android:layout_width="match_parent"
android:layout_height="60dp">

<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:textSize="16dp"
android:text="锅底温度"/>
</RelativeLayout>
<RelativeLayout
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:textSize="24dp"
android:textColor="@color/red_primary"
android:text="39°C"/>
</RelativeLayout>

<!--边框分割细线-->
<RelativeLayout
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_width="wrap_content"
android:layout_height="match_parent">

<LinearLayout
android:layout_width="1dp"
android:layout_height="50dp"
android:layout_centerInParent="true"
android:background="@color/activity_background" />
</RelativeLayout>

<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:textSize="16dp"
android:text="炒锅当前位置"/>
</RelativeLayout>
<RelativeLayout
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:textSize="24dp"
android:textColor="@color/deep_purple_primary"
android:text="10168"/>
</RelativeLayout>

</LinearLayout>
</LinearLayout>
</RelativeLayout>
</ScrollView>


+ 32
- 0
app/src/main/res/layout/item/layout/item_imagebutton.xml Ver fichero

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/startjb"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<RelativeLayout
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<ImageView
android:id="@+id/image_u"
android:layout_width="30dp"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@mipmap/start" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<TextView
android:id="@+id/text_u"
android:layout_marginLeft="@dimen/dp_4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="开始"/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>













+ 5
- 0
app/src/main/res/values/attrs.xml Ver fichero

@@ -3,4 +3,9 @@
<attr name="fullscreenBackgroundColor" format="color" />
<attr name="fullscreenTextColor" format="color" />
</declare-styleable>

<declare-styleable name="imagebutton_control">
<attr name="imagesrc_ks" format="reference" />
<attr name="imagesrc_tz" format="reference" />
</declare-styleable>
</resources>

Cargando…
Cancelar
Guardar