@@ -1746,6 +1746,10 @@ public class ExecuteTheRecipe { | |||||
* @param value | * @param value | ||||
*/ | */ | ||||
public static void WritePLC(String name, Object value, IWriteCallBack callback) { | public static void WritePLC(String name, Object value, IWriteCallBack callback) { | ||||
if(ConfigName.isTEST){ | |||||
LogUtils.d("WritePLC name="+name+";value="+value); | |||||
return; | |||||
} | |||||
try { | try { | ||||
if (ConfigName.getInstance().PLC_Address.containsKey(name)) { | if (ConfigName.getInstance().PLC_Address.containsKey(name)) { | ||||
BPA_PLCADDRESS plcaddress = ConfigName.getInstance().PLC_Address.get(name); | BPA_PLCADDRESS plcaddress = ConfigName.getInstance().PLC_Address.get(name); | ||||
@@ -95,6 +95,13 @@ public class GlideUtil { | |||||
if (context == null||path==null) { | if (context == null||path==null) { | ||||
return; | return; | ||||
} | } | ||||
if((!path.contains("png")&&!path.contains("jpg")&&!path.contains("jpeg"))){ | |||||
imageView.setImageResource(R.mipmap.loading123); | |||||
return; | |||||
} | |||||
if(!path.contains("http")){ | |||||
path = ConfigName.getFileRoot(MainApplication.getContext())+ConfigName.dataPath+"/WebImage/"+path; | |||||
} | |||||
setType(imageView); | setType(imageView); | ||||
GlideApp.with(context) | GlideApp.with(context) | ||||
.load(path) | .load(path) | ||||
@@ -371,14 +371,8 @@ public class DiyProcessActivity extends BaseActivity { | |||||
} | } | ||||
i++; | i++; | ||||
} | } | ||||
if(ConfigName.getInstance().isPhoneVersion){ | |||||
Spinner36Adapter spinnerAdapter = new Spinner36Adapter(getContext(), new ArrayList<>(processMap.keySet())); | |||||
viewBinding.spinnerProcess.setAdapter(spinnerAdapter); | |||||
}else { | |||||
ArrayAdapter<String> adapter_kk = new ArrayAdapter<>(getContext(), R.layout.spinner_text_item32, new ArrayList<>(processMap.keySet())); | |||||
adapter_kk.setDropDownViewResource(R.layout.spinner_dropdown_item32); | |||||
viewBinding.spinnerProcess.setAdapter(adapter_kk); | |||||
} | |||||
Spinner36Adapter spinnerAdapter = new Spinner36Adapter(getContext(), new ArrayList<>(processMap.keySet())); | |||||
viewBinding.spinnerProcess.setAdapter(spinnerAdapter); | |||||
viewBinding.spinnerProcess.setOnTouchListener(new View.OnTouchListener() { | viewBinding.spinnerProcess.setOnTouchListener(new View.OnTouchListener() { | ||||
@Override | @Override | ||||
@@ -57,7 +57,7 @@ public class Spinner36Adapter extends BaseAdapter { | |||||
LogUtils.d(" Spinner36Adapter // 1 "+position); | LogUtils.d(" Spinner36Adapter // 1 "+position); | ||||
} | } | ||||
textView.setText(getItem(position)); | textView.setText(getItem(position)); | ||||
// if(textView.getTextSize()>38* ConfigName.getInstance().scale||textView.getTextSize()<34*ConfigName.getInstance().scale){ | |||||
// if(textView.getTextSize()>34* ConfigName.getInstance().scale||textView.getTextSize()<30*ConfigName.getInstance().scale){ | |||||
// DisplayManager.scaleViewGroup(convertView.findViewById(R.id.root)); | // DisplayManager.scaleViewGroup(convertView.findViewById(R.id.root)); | ||||
// LogUtils.d(" Spinner36Adapter // 2 "+position); | // LogUtils.d(" Spinner36Adapter // 2 "+position); | ||||
// } | // } | ||||
@@ -103,14 +103,8 @@ public class ProcessValueView extends RelativeLayout { | |||||
editsp_map.put(model.data,1); | editsp_map.put(model.data,1); | ||||
} | } | ||||
if(ConfigName.getInstance().isPhoneVersion){ | |||||
Spinner36Adapter spinnerAdapter = new Spinner36Adapter(getContext(), new ArrayList<>(editsp_map.keySet())); | |||||
viewBinding.spinner.setAdapter(spinnerAdapter); | |||||
}else { | |||||
ArrayAdapter<String> adapter2 = new ArrayAdapter<>(getContext(), R.layout.spinner_text_item32, new ArrayList<>(editsp_map.keySet())); | |||||
adapter2.setDropDownViewResource(R.layout.spinner_dropdown_item32); | |||||
viewBinding.spinner.setAdapter(adapter2); | |||||
} | |||||
Spinner36Adapter spinnerAdapter = new Spinner36Adapter(getContext(), new ArrayList<>(editsp_map.keySet())); | |||||
viewBinding.spinner.setAdapter(spinnerAdapter); | |||||
viewBinding.spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { | viewBinding.spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { | ||||
@Override | @Override | ||||
@@ -22,8 +22,8 @@ | |||||
app:layout_constraintTop_toTopOf="parent" | app:layout_constraintTop_toTopOf="parent" | ||||
app:layout_constraintLeft_toLeftOf="parent" | app:layout_constraintLeft_toLeftOf="parent" | ||||
app:layout_constraintRight_toRightOf="parent" | app:layout_constraintRight_toRightOf="parent" | ||||
android:paddingLeft="@dimen/dp_160" | |||||
android:paddingRight="@dimen/dp_160" | |||||
android:paddingLeft="@dimen/dp_165" | |||||
android:paddingRight="@dimen/dp_165" | |||||
style="@style/TextView_normal_size" | style="@style/TextView_normal_size" | ||||
android:textStyle="bold" | android:textStyle="bold" | ||||
android:maxLines="2" | android:maxLines="2" | ||||
@@ -33,10 +33,11 @@ | |||||
<TextView | <TextView | ||||
android:id="@+id/btn_copy_process" | android:id="@+id/btn_copy_process" | ||||
android:layout_width="@dimen/dp_150" | |||||
android:layout_width="@dimen/dp_160" | |||||
style="@style/TextView_btn_normal" | style="@style/TextView_btn_normal" | ||||
android:textSize="28sp" | |||||
android:text="@string/btn_tolead" | android:text="@string/btn_tolead" | ||||
android:paddingLeft="@dimen/dp_10" | |||||
android:paddingLeft="@dimen/dp_8" | |||||
app:layout_constraintTop_toTopOf="parent" | app:layout_constraintTop_toTopOf="parent" | ||||
app:layout_constraintBottom_toTopOf="@id/line1" | app:layout_constraintBottom_toTopOf="@id/line1" | ||||
app:layout_constraintRight_toRightOf="parent" | app:layout_constraintRight_toRightOf="parent" | ||||
@@ -93,9 +94,9 @@ | |||||
<androidx.recyclerview.widget.RecyclerView | <androidx.recyclerview.widget.RecyclerView | ||||
android:id="@+id/recycle_step" | android:id="@+id/recycle_step" | ||||
android:layout_width="@dimen/dp_310" | |||||
android:layout_width="@dimen/dp_320" | |||||
android:layout_height="0dp" | android:layout_height="0dp" | ||||
android:layout_marginLeft="@dimen/dp_10" | |||||
android:layout_marginLeft="@dimen/dp_5" | |||||
android:layout_marginTop="@dimen/dp_10" | android:layout_marginTop="@dimen/dp_10" | ||||
android:layout_marginBottom="@dimen/dp_110" | android:layout_marginBottom="@dimen/dp_110" | ||||
android:orientation="vertical" | android:orientation="vertical" | ||||
@@ -10,25 +10,23 @@ | |||||
android:layout_height="match_parent"> | android:layout_height="match_parent"> | ||||
<TextView | <TextView | ||||
android:id="@+id/add_classify" | android:id="@+id/add_classify" | ||||
android:layout_width="@dimen/dp_140" | |||||
android:layout_width="@dimen/dp_150" | |||||
android:visibility="gone" | android:visibility="gone" | ||||
tools:visibility="visible" | tools:visibility="visible" | ||||
android:layout_below="@+id/line2" | android:layout_below="@+id/line2" | ||||
android:layout_height="@dimen/dp_90" | android:layout_height="@dimen/dp_90" | ||||
android:maxLines="1" | |||||
android:paddingTop="@dimen/dp_25" | |||||
android:paddingBottom="@dimen/dp_25" | |||||
android:layout_marginBottom="2dp" | android:layout_marginBottom="2dp" | ||||
android:ellipsize="middle" | |||||
android:ellipsize="end" | |||||
android:textSize="28sp" | android:textSize="28sp" | ||||
android:text="@string/btn_addclass" | android:text="@string/btn_addclass" | ||||
tools:text="+分类" | |||||
android:textColor="#823E17" | android:textColor="#823E17" | ||||
android:gravity="center" | android:gravity="center" | ||||
android:background="#EFE9D2"/> | android:background="#EFE9D2"/> | ||||
<androidx.recyclerview.widget.RecyclerView | <androidx.recyclerview.widget.RecyclerView | ||||
android:id="@+id/recycler_classify" | android:id="@+id/recycler_classify" | ||||
android:layout_width="@dimen/dp_140" | |||||
android:layout_width="@dimen/dp_150" | |||||
android:layout_below="@+id/add_classify" | android:layout_below="@+id/add_classify" | ||||
android:orientation="vertical" | android:orientation="vertical" | ||||
android:layout_marginBottom="@dimen/dp_95" | android:layout_marginBottom="@dimen/dp_95" | ||||
@@ -123,7 +121,7 @@ | |||||
android:layout_width="@dimen/dp_1" | android:layout_width="@dimen/dp_1" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:background="@color/color3" | android:background="@color/color3" | ||||
android:layout_marginLeft="@dimen/dp_140"/> | |||||
android:layout_marginLeft="@dimen/dp_150"/> | |||||
<TextView | <TextView | ||||
android:id="@+id/line2" | android:id="@+id/line2" | ||||
@@ -132,7 +130,7 @@ | |||||
android:background="@color/color3"/> | android:background="@color/color3"/> | ||||
<androidx.recyclerview.widget.RecyclerView | <androidx.recyclerview.widget.RecyclerView | ||||
android:layout_marginLeft="@dimen/dp_21" | |||||
android:layout_marginLeft="@dimen/dp_10" | |||||
android:layout_marginTop="83dp" | android:layout_marginTop="83dp" | ||||
android:id="@+id/recycler_goods" | android:id="@+id/recycler_goods" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
@@ -14,7 +14,7 @@ | |||||
android:textAlignment="inherit" | android:textAlignment="inherit" | ||||
android:gravity="center_vertical" | android:gravity="center_vertical" | ||||
tools:text="请选择" | tools:text="请选择" | ||||
android:textSize="@dimen/sp_36" | |||||
android:textSize="@dimen/sp_32" | |||||
android:textColor="@color/black"> | android:textColor="@color/black"> | ||||
</CheckedTextView> | </CheckedTextView> | ||||
</LinearLayout> | </LinearLayout> | ||||
@@ -1,6 +1,6 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||||
android:layout_width="@dimen/dp_310" | |||||
android:layout_width="@dimen/dp_320" | |||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
xmlns:app="http://schemas.android.com/apk/res-auto" | xmlns:app="http://schemas.android.com/apk/res-auto" | ||||
xmlns:tools="http://schemas.android.com/tools" | xmlns:tools="http://schemas.android.com/tools" | ||||
@@ -14,30 +14,32 @@ | |||||
android:layout_height="@dimen/dp_70"> | android:layout_height="@dimen/dp_70"> | ||||
<TextView | <TextView | ||||
android:id="@+id/name" | android:id="@+id/name" | ||||
android:layout_width="@dimen/dp_160" | |||||
android:layout_width="@dimen/dp_190" | |||||
android:layout_height="@dimen/dp_70" | android:layout_height="@dimen/dp_70" | ||||
app:layout_constraintLeft_toLeftOf="parent" | app:layout_constraintLeft_toLeftOf="parent" | ||||
app:layout_constraintTop_toTopOf="parent" | app:layout_constraintTop_toTopOf="parent" | ||||
android:textColor="@drawable/selector_select_step_text_color" | android:textColor="@drawable/selector_select_step_text_color" | ||||
android:background="@drawable/selector_select_step_text_bg" | android:background="@drawable/selector_select_step_text_bg" | ||||
tools:text="1.双向搅拌" | tools:text="1.双向搅拌" | ||||
android:textSize="@dimen/sp_32" | |||||
android:textSize="@dimen/sp_30" | |||||
android:gravity="center_vertical" | android:gravity="center_vertical" | ||||
android:duplicateParentState="true" | android:duplicateParentState="true" | ||||
tools:background="@color/textbg_green" | tools:background="@color/textbg_green" | ||||
/> | /> | ||||
<ImageView | <ImageView | ||||
android:id="@+id/remove_up" | android:id="@+id/remove_up" | ||||
android:layout_width="@dimen/dp_70" | |||||
android:layout_width="@dimen/dp_60" | |||||
android:layout_height="@dimen/dp_70" | android:layout_height="@dimen/dp_70" | ||||
android:src="@mipmap/ll5" | android:src="@mipmap/ll5" | ||||
android:scaleType="fitXY" | |||||
android:layout_marginLeft="@dimen/dp_5" | android:layout_marginLeft="@dimen/dp_5" | ||||
/> | /> | ||||
<ImageView | <ImageView | ||||
android:id="@+id/remove_down" | android:id="@+id/remove_down" | ||||
android:layout_width="@dimen/dp_70" | |||||
android:layout_width="@dimen/dp_60" | |||||
android:layout_height="@dimen/dp_70" | android:layout_height="@dimen/dp_70" | ||||
android:src="@mipmap/ll6" | android:src="@mipmap/ll6" | ||||
android:scaleType="fitXY" | |||||
android:layout_marginLeft="@dimen/dp_5" | android:layout_marginLeft="@dimen/dp_5" | ||||
/> | /> | ||||
</LinearLayout> | </LinearLayout> | ||||
@@ -144,7 +144,7 @@ | |||||
<string name="info_selectprocess">请选择每行对应的子属性!</string> | <string name="info_selectprocess">请选择每行对应的子属性!</string> | ||||
<string name="btn_selectclass">选择分类</string> | <string name="btn_selectclass">选择分类</string> | ||||
<string name="btn_selectclass_1">选择属性分类:</string> | <string name="btn_selectclass_1">选择属性分类:</string> | ||||
<string name="btn_addclass">添加分类</string> | |||||
<string name="btn_addclass">+分类</string> | |||||
<string name="text_deleteinfo">是否删除?</string> | <string name="text_deleteinfo">是否删除?</string> | ||||
<string name="top_editclass">编辑分类</string> | <string name="top_editclass">编辑分类</string> | ||||
<string name="text_noselect">未选择</string> | <string name="text_noselect">未选择</string> | ||||