@@ -169,7 +169,7 @@ public class ExecuteTheRecipe { | |||
if (!text.isEmpty()) { | |||
//仓号 值 | |||
HashMap<Integer, Integer> formulation = new HashMap<>(); | |||
HashMap<BPA_SILOS, Integer> formulation = new HashMap<>(); | |||
//region 获取仓号和值 | |||
List<String> data = new ArrayList<>(); | |||
if (text.contains("|")) { | |||
@@ -190,26 +190,26 @@ public class ExecuteTheRecipe { | |||
List<BPA_SILOS> bpa_silos = QueryDB.GetSolisByMaterialName(name); | |||
if (bpa_silos.size() > 0 && val > 0) { | |||
BPA_SILOS silos = bpa_silos.get(0); | |||
formulation.put(silos.num, val); | |||
formulation.put(silos, val); | |||
} | |||
} | |||
} | |||
} | |||
//endregion | |||
//写入PLC,直接出料,不用等待 | |||
for (Map.Entry<Integer, Integer> entry : formulation.entrySet()) { | |||
Integer key = entry.getKey(); | |||
for (Map.Entry<BPA_SILOS, Integer> entry : formulation.entrySet()) { | |||
BPA_SILOS silos = entry.getKey(); | |||
Integer value = entry.getValue(); | |||
Write_PLC_Material(key, value); | |||
Write_PLC_Material(silos, value); | |||
} | |||
Thread.sleep(200);//等待写入完成 | |||
//一直等待下料完成 否则就一直等待 40s超时 | |||
for (Map.Entry<Integer, Integer> entry : formulation.entrySet()) { | |||
Integer num = entry.getKey(); | |||
for (Map.Entry<BPA_SILOS, Integer> entry : formulation.entrySet()) { | |||
BPA_SILOS silos = entry.getKey(); | |||
Integer val = entry.getValue(); | |||
String name = "料仓" + num + "下料完成"; | |||
String name = "料仓" + silos.num + "下料完成"; | |||
final boolean[] IsComplete = {false}; | |||
long a = System.currentTimeMillis(); | |||
while (!IsComplete[0]) { | |||
@@ -302,26 +302,26 @@ public class ExecuteTheRecipe { | |||
/** | |||
* 写入仓号需求值 | |||
* | |||
* @param num | |||
* @param silos | |||
* @param val | |||
*/ | |||
private static void Write_PLC_Material(int num, int val) { | |||
private static void Write_PLC_Material(BPA_SILOS silos, int val) { | |||
try { | |||
if(ExecuteCurrentOperation!=null) | |||
{ | |||
ExecuteCurrentOperation.Run("液体料|"+num); | |||
ExecuteCurrentOperation.Run("液体料|"+silos.num); | |||
} | |||
ToastUtils.info("准备写入PLC仓号需求:" + num + "," + val/10.0); | |||
ToastUtils.info("准备写入PLC仓号需求:" + silos.num + "," + val/10.0); | |||
String name = "料仓" + num + "下料完成"; | |||
String name = "料仓" + silos.num + "下料完成"; | |||
ExecuteTheRecipe.WritePLC(name, false, null); | |||
final boolean[] IsComplete = {false}; | |||
WritePLC("料仓" + num + "需求值", val, new IWriteCallBack() { | |||
WritePLC("料仓" + silos.num + "需求值", val, new IWriteCallBack() { | |||
@Override | |||
public void onSuccess() { | |||
BottomClick("料仓" + num + "下料"); | |||
BottomClick("料仓" + silos.num + "下料"); | |||
IsComplete[0] = true; | |||
} | |||
@@ -336,7 +336,11 @@ public class ExecuteTheRecipe { | |||
} | |||
Thread.sleep(100);//10 *6 | |||
} | |||
ToastUtils.info("写入PLC仓号需求:" + num + "," + val/10.0); | |||
//減去料仓数量 | |||
int otherG=silos.silosmargin-(val/10); | |||
QueryDB.UpdateYL(silos.id,otherG>=0?otherG:0); | |||
//ToastUtils.info("写入PLC仓号需求:" + num + "," + val/10.0); | |||
} catch (Exception ex) { | |||
ToastUtils.error("异常信息:" + ex.getMessage()); | |||
} | |||
@@ -774,6 +778,17 @@ public class ExecuteTheRecipe { | |||
try { | |||
ToastUtils.info("准备出菜!"); | |||
//先延迟 | |||
for (HashMap.Entry<String, String> entry : data.entrySet()) { | |||
String key = entry.getKey(); | |||
String value = entry.getValue(); | |||
ToastUtils.info("工序:" + key + "," + value); | |||
if (key.contains("(秒)")) { | |||
int val = Integer.parseInt(value); | |||
Thread.sleep(val * 1000); | |||
} | |||
} | |||
BottomClick("出菜"); | |||
//一直等待机器移动到该位置,否则就一直等待 6s超时 | |||
@@ -792,16 +807,6 @@ public class ExecuteTheRecipe { | |||
Thread.sleep(100);//10 *6 | |||
} | |||
for (HashMap.Entry<String, String> entry : data.entrySet()) { | |||
String key = entry.getKey(); | |||
String value = entry.getValue(); | |||
ToastUtils.info("工序:" + key + "," + value); | |||
if (key.contains("(秒)")) { | |||
int val = Integer.parseInt(value); | |||
Thread.sleep(val * 1000); | |||
} | |||
} | |||
ToastUtils.info("出菜完成,结束制作!"); | |||
} catch (Exception ex) { | |||
ToastUtils.error("异常信息:" + ex.getMessage()); | |||
@@ -375,7 +375,7 @@ public class ConfigName { | |||
add(new ProcessT("液体料", new ArrayList<>())); | |||
add(new ProcessT("加水", Arrays.asList("时长(秒)"))); | |||
add(new ProcessT("延迟", Arrays.asList("延迟(秒)"))); | |||
add(new ProcessT("出菜", Arrays.asList("延迟(秒)"))); | |||
add(new ProcessT("出菜", Arrays.asList("等待(秒)"))); | |||
}}; | |||
/** | |||
@@ -587,7 +587,7 @@ public class ConfigName { | |||
add(new ProcessT("液体料", new ArrayList<>())); | |||
add(new ProcessT("加水", Arrays.asList("时长(秒)"))); | |||
add(new ProcessT("延迟", Arrays.asList("延迟(秒)"))); | |||
add(new ProcessT("出菜", Arrays.asList("延迟(秒)"))); | |||
add(new ProcessT("出菜", Arrays.asList("等待(秒)"))); | |||
}}; | |||
/** | |||
* 小炒基础PLC模型 | |||
@@ -798,7 +798,7 @@ public class ConfigName { | |||
add(new ProcessT("液体料", new ArrayList<>())); | |||
add(new ProcessT("加水", Arrays.asList("时长(秒)"))); | |||
add(new ProcessT("延迟", Arrays.asList("延迟(秒)"))); | |||
add(new ProcessT("出菜", Arrays.asList("延迟(秒)"))); | |||
add(new ProcessT("出菜", Arrays.asList("等待(秒)"))); | |||
}}; | |||
/** | |||
@@ -703,6 +703,20 @@ public class QueryDB { | |||
Update(BPA_GOODS.class, goods); | |||
} | |||
} | |||
/** | |||
* 修改烹饪时长 | |||
* | |||
* @param id | |||
* @param | |||
*/ | |||
public static void UpdateGoodsMakeTime(String id, int time) { | |||
BPA_GOODS goods = GetGoodsId(id); | |||
if (goods != null) { | |||
goods.maketime = time; | |||
Update(BPA_GOODS.class, goods); | |||
} | |||
} | |||
/** | |||
* 获取所有商品 | |||
* | |||
@@ -27,7 +27,7 @@ public class MyBitmapUtils { | |||
} | |||
public void disPlay(ImageView ivPic, String url) { | |||
ivPic.setImageResource(R.mipmap.loading2); | |||
ivPic.setImageResource(R.mipmap.loading123); | |||
Bitmap bitmap; | |||
//内存缓存 | |||
String name=""; | |||
@@ -303,6 +303,7 @@ public class BottomNavigationNewActivity extends BaseActivity { | |||
while (true) { | |||
try { | |||
if (ExecuteTheRecipe.IsStart && goods != null) { | |||
long startTime= System.currentTimeMillis(); //起始时间 | |||
try { | |||
//获取工艺 | |||
ArrayList<BPA_GOODSRECIPE> goodsrecipes = QueryDB.GetGoodsSrecipeID(goods.id); | |||
@@ -329,7 +330,6 @@ public class BottomNavigationNewActivity extends BaseActivity { | |||
} catch (Exception ex) { | |||
ToastUtils.error("异常信息:" + ex.getMessage()); | |||
} finally { | |||
ExecuteTheRecipe.WritePLC("搅拌", false, null); | |||
ExecuteTheRecipe.WritePLC("加热", false, null); | |||
ConfigName.getInstance().IsOpenHuoLi = false; | |||
@@ -338,6 +338,11 @@ public class BottomNavigationNewActivity extends BaseActivity { | |||
MakeCipe = null; | |||
goodsrecipesL = null; | |||
ExecuteTheRecipe.IsStart = false; | |||
long endTime = System.currentTimeMillis(); //结束时间 | |||
int time=(int) ((endTime-startTime)/1000); | |||
Log.e("运行时长",String.format("方法使用时间 %d s",time)); | |||
if (!ExecuteTheRecipe.IsForcedEnd){QueryDB.UpdateGoodsMakeTime(goods.id,time);} | |||
runOnUiThread(new Runnable() { | |||
@Override | |||
public void run() { | |||
@@ -0,0 +1,56 @@ | |||
package com.bonait.bnframework.modules.home.adapter; | |||
import android.content.Context; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
import android.view.ViewGroup; | |||
import android.widget.ArrayAdapter; | |||
import android.widget.TextView; | |||
import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE; | |||
import java.util.ArrayList; | |||
public class gongxubuzhou_adapter2 extends ArrayAdapter<BPA_GOODSRECIPE> { | |||
/** | |||
* 内部点击事件 | |||
*/ | |||
private ArrayList<BPA_GOODSRECIPE> datas= new ArrayList<>(); | |||
private int selectedPosition = -1;// 选中的位置 | |||
int resource1; | |||
public gongxubuzhou_adapter2(@NonNull Context context, int resource, @NonNull ArrayList<BPA_GOODSRECIPE> objects) { | |||
super(context, resource, objects); | |||
datas=objects; | |||
this.resource1=resource; | |||
} | |||
public int getSelectedPosition() | |||
{ | |||
return selectedPosition; | |||
} | |||
public void setSelectedPosition(int position) { | |||
selectedPosition = position; | |||
} | |||
//每个子项被滚动到屏幕内的时候会被调用 | |||
@NonNull | |||
@Override | |||
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) { | |||
BPA_GOODSRECIPE lc = (BPA_GOODSRECIPE) getItem(position);//得到当前项选中item实例 | |||
//为每一个子项加载设定的布局 | |||
View view = LayoutInflater.from(getContext()).inflate(resource1, parent, false); | |||
//分别获取 image view 和 textview 的实例 | |||
TextView num = view.findViewById(R.id.num); | |||
TextView name = view.findViewById(R.id.name); | |||
TextView text = view.findViewById(R.id.text); | |||
num.setText((position+1)+""); | |||
name.setText(lc.processname+""); | |||
text.setText(lc.processvalue+""); | |||
return view; | |||
} | |||
} |
@@ -506,6 +506,7 @@ public class Home1Fragment extends BaseFragment { | |||
try { | |||
if (Status && good != null) { | |||
long startTime= System.currentTimeMillis(); //起始时间 | |||
try { | |||
//获取工艺 | |||
ArrayList<BPA_GOODSRECIPE> goodsrecipes = QueryDB.GetGoodsSrecipeID(good.id); | |||
@@ -531,6 +532,13 @@ public class Home1Fragment extends BaseFragment { | |||
gongxuIndex = 10000; | |||
MakeCipe = null; | |||
goodsrecipesL = null; | |||
long endTime = System.currentTimeMillis(); //结束时间 | |||
int time=(int) ((endTime-startTime)/1000); | |||
Log.e("运行时长",String.format("方法使用时间 %d s",time)); | |||
if (!ExecuteTheRecipe.IsForcedEnd){QueryDB.UpdateGoodsMakeTime(good.id,time);} | |||
Activity activity = getActivity(); | |||
if (activity != null) { | |||
activity.runOnUiThread(new Runnable() { | |||
@@ -31,15 +31,19 @@ import com.bonait.bnframework.common.base.BaseActivity; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.constant.DataBus; | |||
import com.bonait.bnframework.common.constant.MessageName; | |||
import com.bonait.bnframework.common.db.QueryDB; | |||
import com.bonait.bnframework.common.db.mode.BPA_GOODS; | |||
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE; | |||
import com.bonait.bnframework.common.helper.I.IWriteCallBack; | |||
import com.bonait.bnframework.common.helper.I.MyClickListener; | |||
import com.bonait.bnframework.common.message.MessageManager; | |||
import com.bonait.bnframework.common.model.mode.MouthFacingEnum; | |||
import com.bonait.bnframework.common.model.mode.SpeedEnum; | |||
import com.bonait.bnframework.common.utils.AlertDialogUtils; | |||
import com.bonait.bnframework.common.utils.ToastUtils; | |||
import com.bonait.bnframework.modules.home.adapter.gongxubuzhou_adapter; | |||
import com.bonait.bnframework.modules.home.adapter.gongxubuzhou_adapter1; | |||
import com.bonait.bnframework.modules.home.adapter.gongxubuzhou_adapter2; | |||
import com.bonait.bnframework.modules.home.fragment.mode.fragment_gx; | |||
import com.bonait.bnframework.modules.home.fragment.mode.imagebuttom; | |||
import com.bonait.bnframework.modules.home.fragment.mode.imagebuttom3; | |||
@@ -135,6 +139,9 @@ public class DishTestActivity extends BaseActivity { | |||
@BindView(R.id.datatab_gxbz) | |||
ListView datatab_gxbz; | |||
@BindView(R.id.datatab_gxbz1) | |||
ListView datatab_gxbz1; | |||
public int ShowIndex=0; | |||
@BindView(R.id.goodname) | |||
@@ -172,7 +179,8 @@ public class DishTestActivity extends BaseActivity { | |||
public String liaohetext4=""; | |||
@BindView(R.id.gongyibuzhoujilu) | |||
RelativeLayout gongyibuzhoujilu;//记录 | |||
//endregion | |||
//region 界面实例 | |||
@@ -254,8 +262,10 @@ public class DishTestActivity extends BaseActivity { | |||
ShowIndex=0; | |||
SetShowNameData(ShowIndex); | |||
gongyibuzhoujilu.setVisibility(View.GONE); | |||
} | |||
public gongxubuzhou_adapter1 gxbz_adapter=null; | |||
public gongxubuzhou_adapter2 gxbz_adapter2=null; | |||
/** | |||
* 刷新工序 | |||
@@ -267,6 +277,9 @@ public class DishTestActivity extends BaseActivity { | |||
public void run() { | |||
gxbz_adapter = new gongxubuzhou_adapter1(getContext(), R.layout.newgx_item, DataBus.getInstance().bpa_goodsrecipes); | |||
datatab_gxbz.setAdapter(gxbz_adapter); | |||
gxbz_adapter2=new gongxubuzhou_adapter2(getContext(), R.layout.newgx_item1, DataBus.getInstance().bpa_goodsrecipes); | |||
datatab_gxbz1.setAdapter(gxbz_adapter2); | |||
} | |||
}); | |||
} | |||
@@ -383,8 +396,8 @@ public class DishTestActivity extends BaseActivity { | |||
* | |||
* @param view | |||
*/ | |||
@OnClick({R.id.tingzhijiashui,R.id.click_cpmc,R.id.click_lhdata | |||
,R.id.click_lhdata_fh,R.id.goodname}) | |||
@OnClick({R.id.tingzhijiashui,R.id.click_cpmc,R.id.click_lhdata,R.id.click_savemncz | |||
,R.id.click_lhdata_fh,R.id.goodname,R.id.close_from}) | |||
public void onViewClicked(View view) { | |||
switch (view.getId()) { | |||
case R.id.tingzhijiashui://停止加水 | |||
@@ -430,6 +443,53 @@ public class DishTestActivity extends BaseActivity { | |||
ShowIndex=0; | |||
SetShowNameData(ShowIndex); | |||
break; | |||
case R.id.click_savemncz://保存菜谱并模拟炒制 | |||
//按钮点击 | |||
String title = "生成菜谱操作提示!"; | |||
String message = "请问客官确定要生成["+DataBus.getInstance().ShowGoodName+"]菜谱吗?"; | |||
AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
boolean isSucess= QueryDB.GetGoodsIs(DataBus.getInstance().ShowGoodName); | |||
if(isSucess) | |||
{ | |||
DataBus.getInstance().ShowGoodName=DataBus.getInstance().ShowGoodName+"_副本"; | |||
} | |||
int sc=DataBus.getInstance().TimeOut<=0?180:DataBus.getInstance().TimeOut; | |||
ArrayList<BPA_GOODS> goods= QueryDB.GetGoodsALL(); | |||
BPA_GOODS good1=new BPA_GOODS(); | |||
good1.name=DataBus.getInstance().ShowGoodName; | |||
good1.status=1; | |||
good1.sort=goods.size()+1; | |||
good1.maketime=sc; | |||
good1.issc=0; | |||
good1.url=""; | |||
QueryDB.AddGoods(good1); | |||
for (int k=0;k<DataBus.getInstance().bpa_goodsrecipes.size();k++) | |||
{ | |||
BPA_GOODSRECIPE item=DataBus.getInstance().bpa_goodsrecipes.get(k); | |||
item.id=java.util.UUID.randomUUID().toString(); | |||
item.goodsID=good1.id; | |||
item.sort=k+1; | |||
QueryDB.AddGoodsSrecipe(item); | |||
} | |||
ToastUtils.info("菜谱保存成功!"); | |||
dialog.dismiss(); | |||
MessageManager.getInstance().sendMessage(MessageName.ScGood,"Good"); | |||
Intent intent = new Intent(getContext(), CookingSimulatedActivity.class); | |||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); | |||
intent.putExtra("id", good1.id); | |||
startActivity(intent); | |||
finish(); | |||
} | |||
}); | |||
break; | |||
case R.id.close_from: | |||
gongyibuzhoujilu.setVisibility(View.GONE); | |||
break; | |||
} | |||
} | |||
@@ -594,7 +654,7 @@ public class DishTestActivity extends BaseActivity { | |||
recordingTime = 0; | |||
long elapsedMillis = SystemClock.elapsedRealtime() - runtime.getBase(); | |||
int time = (int) (elapsedMillis / 1000); | |||
TimeOut = (int) (elapsedMillis / 1000); | |||
DataBus.getInstance().TimeOut=TimeOut; | |||
//重置暂停开关 | |||
@@ -603,25 +663,15 @@ public class DishTestActivity extends BaseActivity { | |||
zanting_goodmake.setVisibility(View.GONE); | |||
ExecuteTheRecipe.WritePLC("暂停开关", false, null); | |||
ExecuteTheRecipe.WritePLC("搅拌", false, null); | |||
ExecuteTheRecipe.WritePLC("加热", false, null); | |||
ConfigName.getInstance().IsOpenHuoLi= false; | |||
ExecuteTheRecipe.BottomClick("平移-去1号位"); | |||
} | |||
}); | |||
Intent intent = new Intent(getContext(), DiynewActivity.class); | |||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); | |||
startActivity(intent); | |||
//自动出餐 | |||
AutomaticServing(); | |||
finish(); | |||
gongyibuzhoujilu.setVisibility(View.VISIBLE); | |||
} | |||
/** | |||
@@ -833,7 +883,7 @@ public class DishTestActivity extends BaseActivity { | |||
BPA_GOODSRECIPE cipe=GetSelectItemFromValue(name,yl); | |||
ExecuteTheRecipe.ExecuteOperationSteps(cipe.processname, cipe.processvalue); | |||
ExecuteTheRecipe.ExecuteMaterialIssuance(cipe.processvalue); | |||
runOnUiThread(new Runnable() { | |||
@Override | |||
@@ -933,12 +983,7 @@ public class DishTestActivity extends BaseActivity { | |||
{ | |||
int time = (int) ((SystemClock.elapsedRealtime() - runtime.getBase()) / 1000);//当前点击多少秒 | |||
int time_c=time-ClikTime; | |||
BPA_GOODSRECIPE data=Get出菜(); | |||
if(time_c>0)//如果大于0,那么加一个延迟 | |||
{ | |||
DataBus.getInstance().bpa_goodsrecipes.add(Get延迟(time_c)); | |||
} | |||
BPA_GOODSRECIPE data=Get出菜(time_c); | |||
DataBus.getInstance().bpa_goodsrecipes.add(data); | |||
new Thread(new Runnable() { | |||
@Override | |||
@@ -1057,13 +1102,13 @@ public class DishTestActivity extends BaseActivity { | |||
* 获取出菜 | |||
* @return | |||
*/ | |||
public BPA_GOODSRECIPE Get出菜() | |||
public BPA_GOODSRECIPE Get出菜(int k) | |||
{ | |||
BPA_GOODSRECIPE pf = new BPA_GOODSRECIPE(); | |||
pf.materialType=1; | |||
pf.processname="出菜"; | |||
pf.processms="出菜(0)"; | |||
pf.processvalue="延迟(秒),0"; | |||
pf.processms="出菜("+k+")"; | |||
pf.processvalue="等待(秒),"+k; | |||
return pf; | |||
} | |||
@@ -298,12 +298,7 @@ public class DiyMemoryActivity extends BaseActivity { | |||
case R.id.zidongchucan://自动出餐 | |||
if(isRunClick()) | |||
{ | |||
if(time_c>0)//如果大于0,那么加一个延迟 | |||
{ | |||
DataBus.getInstance().bpa_goodsrecipes.add(Get延迟(time_c)); | |||
} | |||
BPA_GOODSRECIPE data1=Get出菜(); | |||
BPA_GOODSRECIPE data1=Get出菜(time_c); | |||
DataBus.getInstance().bpa_goodsrecipes.add(data1); | |||
MakeRecipe(data1); | |||
ClikTime=time; | |||
@@ -529,13 +524,13 @@ public class DiyMemoryActivity extends BaseActivity { | |||
* 获取出菜 | |||
* @return | |||
*/ | |||
public BPA_GOODSRECIPE Get出菜() | |||
public BPA_GOODSRECIPE Get出菜(int k) | |||
{ | |||
BPA_GOODSRECIPE pf = new BPA_GOODSRECIPE(); | |||
pf.materialType=1; | |||
pf.processname="出菜"; | |||
pf.processms="出菜(0)"; | |||
pf.processvalue="延迟(秒),0"; | |||
pf.processms="出菜("+k+")"; | |||
pf.processvalue="等待(秒),"+k; | |||
return pf; | |||
} | |||
@@ -96,6 +96,7 @@ public class jingdutiao1 extends LinearLayout { | |||
int bfb=0; | |||
int yl=data.silosmargin; | |||
int zl=data.siloszl; | |||
int gj=data.warningValue; | |||
if(zl==0) | |||
{ | |||
bfb=0; | |||
@@ -105,6 +106,13 @@ public class jingdutiao1 extends LinearLayout { | |||
} | |||
value=bfb; | |||
t_progressBar.setProgress(bfb); | |||
if(yl<=gj) | |||
{ | |||
t_progressBar.setProgressDrawable(getResources().getDrawable(R.drawable.progress_gj)); | |||
}else | |||
{ | |||
t_progressBar.setProgressDrawable(getResources().getDrawable(R.drawable.progress_zc)); | |||
} | |||
t_text.setText(bfb+"%"); | |||
} | |||
@@ -0,0 +1,27 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<ripple xmlns:android="http://schemas.android.com/apk/res/android" | |||
android:color="#7FEF5362" | |||
android:radius="-1dp"> | |||
<item android:state_pressed="true"> | |||
<shape> | |||
<solid android:color="#567722" /> | |||
<corners android:radius="10dp" /> | |||
</shape> | |||
</item> | |||
<item android:state_enabled="false"> | |||
<shape> | |||
<solid android:color="#cccccc" /> | |||
<corners android:radius="10dp" /> | |||
</shape> | |||
</item> | |||
<item> | |||
<shape> | |||
<solid android:color="#567722" /> | |||
<corners android:radius="10dp" /> | |||
</shape> | |||
</item> | |||
</ripple> |
@@ -9,15 +9,16 @@ | |||
<!-- </shape>--> | |||
<!-- </item>--> | |||
<item android:id="@android:id/progress">//进度条 | |||
<item android:id="@android:id/progress"> | |||
<clip android:gravity="bottom" | |||
android:clipOrientation="vertical">//此属性限定为竖向 | |||
android:clipOrientation="vertical"> | |||
<shape android:shape="rectangle"> | |||
<gradient android:type="linear" android:angle="90" android:centerY="0.75" android:startColor="#567722" android:centerColor="#567722" android:endColor="#567722"/> | |||
<gradient android:type="linear" android:angle="90" android:centerY="0.2" | |||
android:startColor="#567722" android:centerColor="#567722" android:endColor="#567722"/> | |||
<corners android:radius="10dp"/> | |||
</shape> | |||
</clip> | |||
//第二进度条,可选性添加 | |||
<!-- //第二进度条,可选性添加--> | |||
<!-- <scale android:scaleHeight="100%"--> | |||
<!-- android:scaleGravity="bottom">--> | |||
<!-- <shape android:shape="rectangle">--> | |||
@@ -0,0 +1,30 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |||
<!-- <item android:id="@android:id/background">//id对应控件属性,不可删除和修改,此属性对应背景颜色--> | |||
<!-- <shape android:shape="rectangle">--> | |||
<!-- //渐变设置--> | |||
<!-- <gradient android:type="linear" android:angle="270" android:centerY="0.75" android:startColor="@color/progress_background" android:endColor="@color/progress_background"/>--> | |||
<!-- //还可以设置角度--> | |||
<!-- <corners android:radius="20dp"/>--> | |||
<!-- </shape>--> | |||
<!-- </item>--> | |||
<item android:id="@android:id/progress"> | |||
<clip android:gravity="bottom" | |||
android:clipOrientation="vertical"> | |||
<shape android:shape="rectangle"> | |||
<gradient android:type="linear" android:angle="90" android:centerY="0.2" | |||
android:startColor="#d81e06" android:centerColor="#d81e06" android:endColor="#d81e06"/> | |||
<corners android:radius="10dp"/> | |||
</shape> | |||
</clip> | |||
<!-- //第二进度条,可选性添加--> | |||
<!-- <scale android:scaleHeight="100%"--> | |||
<!-- android:scaleGravity="bottom">--> | |||
<!-- <shape android:shape="rectangle">--> | |||
<!-- <gradient android:type="linear" android:angle="136" android:centerY="0.75" android:startColor="#05F3CE" android:centerColor="#03DC9E" android:endColor="#04CBB7"/>--> | |||
<!-- <corners android:radius="20dp"/>--> | |||
<!-- </shape>--> | |||
<!-- </scale>--> | |||
</item> | |||
</layer-list> |
@@ -0,0 +1,30 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |||
<!-- <item android:id="@android:id/background">//id对应控件属性,不可删除和修改,此属性对应背景颜色--> | |||
<!-- <shape android:shape="rectangle">--> | |||
<!-- //渐变设置--> | |||
<!-- <gradient android:type="linear" android:angle="270" android:centerY="0.75" android:startColor="@color/progress_background" android:endColor="@color/progress_background"/>--> | |||
<!-- //还可以设置角度--> | |||
<!-- <corners android:radius="20dp"/>--> | |||
<!-- </shape>--> | |||
<!-- </item>--> | |||
<item android:id="@android:id/progress"> | |||
<clip android:gravity="bottom" | |||
android:clipOrientation="vertical"> | |||
<shape android:shape="rectangle"> | |||
<gradient android:type="linear" android:angle="90" android:centerY="0.2" | |||
android:startColor="#567722" android:centerColor="#567722" android:endColor="#567722"/> | |||
<corners android:radius="10dp"/> | |||
</shape> | |||
</clip> | |||
<!-- //第二进度条,可选性添加--> | |||
<!-- <scale android:scaleHeight="100%"--> | |||
<!-- android:scaleGravity="bottom">--> | |||
<!-- <shape android:shape="rectangle">--> | |||
<!-- <gradient android:type="linear" android:angle="136" android:centerY="0.75" android:startColor="#05F3CE" android:centerColor="#03DC9E" android:endColor="#04CBB7"/>--> | |||
<!-- <corners android:radius="20dp"/>--> | |||
<!-- </shape>--> | |||
<!-- </scale>--> | |||
</item> | |||
</layer-list> |
@@ -720,6 +720,90 @@ | |||
</RelativeLayout> | |||
</RelativeLayout> | |||
<!-- 不透明蒙版 执行中--> | |||
<RelativeLayout | |||
android:id="@+id/gongyibuzhoujilu" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:background="@color/dialogbj" | |||
android:clickable="true" | |||
android:focusable="true"> | |||
<RelativeLayout | |||
android:layout_width="500dp" | |||
android:layout_height="650dp" | |||
android:layout_centerInParent="true" | |||
android:layout_margin="50dp" | |||
android:background="@drawable/silosbj"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_margin="20dp" | |||
android:orientation="vertical"> | |||
<RelativeLayout | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content"> | |||
<ImageView | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:src="@mipmap/jl1"/> | |||
<Button | |||
android:visibility="gone" | |||
android:id="@+id/close_from" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentTop="true" | |||
android:layout_alignParentRight="true" | |||
android:background="@mipmap/fanhui1" | |||
android:textColor="@color/white" | |||
android:textSize="14dp" /> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_marginTop="10dp" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:background="@drawable/gongyi_bj"> | |||
<TextView | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_centerInParent="true" | |||
android:layout_marginTop="10dp" | |||
android:layout_marginBottom="10dp" | |||
android:text="工艺步骤记录" | |||
android:textAlignment="center" | |||
android:textColor="@color/white" | |||
android:textSize="25dp" /> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_marginTop="10dp" | |||
android:layout_width="match_parent" | |||
android:layout_height="0dp" | |||
android:layout_weight="1"> | |||
<ListView | |||
android:id="@+id/datatab_gxbz1" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:divider="#00000000" | |||
android:dividerHeight="3dp" /> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="10dp"> | |||
<ImageView | |||
android:id="@+id/click_savemncz" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_centerInParent="true" | |||
android:scaleType="fitCenter" | |||
android:src="@mipmap/queding2" /> | |||
</RelativeLayout> | |||
</LinearLayout> | |||
</RelativeLayout> | |||
</RelativeLayout> | |||
</RelativeLayout> | |||
<com.qmuiteam.qmui.widget.QMUITopBarLayout | |||
@@ -30,8 +30,8 @@ | |||
android:layout_alignParentLeft="true"/> | |||
<TextView | |||
android:id="@+id/z_wz" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginTop="30dp" | |||
android:layout_centerHorizontal="true" | |||
android:text="菜谱" | |||
@@ -60,8 +60,8 @@ | |||
<TextView | |||
android:id="@+id/y_wz" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginTop="30dp" | |||
android:layout_centerHorizontal="true" | |||
android:text="设备" | |||
@@ -17,24 +17,24 @@ | |||
android:id="@+id/ImageUrl" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:src="@mipmap/image2" | |||
android:src="@mipmap/image5" | |||
android:adjustViewBounds="true" | |||
android:scaleType="centerCrop"/> | |||
<RelativeLayout | |||
android:layout_alignParentBottom="true" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:background="#AEFFFFFF"> | |||
android:background="#CCFFFFFF"> | |||
<TextView | |||
android:id="@+id/Tag_text" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="5dp" | |||
android:text="清炒三月瓜" | |||
android:text="三月瓜" | |||
android:textAlignment="center" | |||
android:textColor="@color/black" | |||
android:textSize="25dp" | |||
android:textStyle="bold" | |||
android:maxLines="1" | |||
tools:ignore="MissingConstraints" /> | |||
</RelativeLayout> | |||
</RelativeLayout> | |||
@@ -22,7 +22,7 @@ | |||
android:layout_marginBottom="10dp" | |||
android:max="100" | |||
android:min="0" | |||
android:progress="10" | |||
android:progress="100" | |||
android:progressDrawable="@drawable/layer_list_progress_vertical_high" /> | |||
@@ -0,0 +1,48 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:orientation="horizontal" | |||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||
xsi:schemaLocation="http://schemas.android.com/apk/res/android "> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content"> | |||
<TextView | |||
android:id="@+id/num" | |||
android:layout_width="30dp" | |||
android:layout_height="wrap_content" | |||
android:layout_centerVertical="true" | |||
android:layout_alignParentLeft="true" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:text="12" | |||
android:textSize="19dp" | |||
android:focusable="false" | |||
android:textColor="@color/black"/> | |||
<TextView | |||
android:id="@+id/name" | |||
android:layout_width="60dp" | |||
android:layout_height="wrap_content" | |||
android:layout_centerVertical="true" | |||
android:layout_alignParentLeft="true" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:minWidth="60dp" | |||
android:text="液体料" | |||
android:textSize="19dp" | |||
android:focusable="false" | |||
android:textColor="@color/black"/> | |||
<TextView | |||
android:id="@+id/text" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_centerVertical="true" | |||
android:layout_marginRight="@dimen/dp_10" | |||
android:focusable="false" | |||
android:text="主料名称,炸好熟五花肉片|主料位置,1号位|主料重量,200|投料动作,直接投出|烹饪(秒),12" | |||
android:textAlignment="textEnd" | |||
android:textColor="@color/black" | |||
android:textSize="19dp" /> | |||
</LinearLayout> | |||
</RelativeLayout> |