From 0a53b46f0143069f4961c311bb974d674f17be18 Mon Sep 17 00:00:00 2001 From: liup <1454939542@qq.com> Date: Thu, 12 Sep 2024 16:30:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bnframework/business/ExecuteTheRecipe.java | 4 ++++ .../com/bonait/bnframework/glide/GlideUtil.java | 7 +++++++ .../ui/activity/DiyProcessActivity.java | 10 ++-------- .../ui/adapter/classify/Spinner36Adapter.java | 2 +- .../bnframework/ui/widget/ProcessValueView.java | 10 ++-------- app/src/main/res/layout/activity_edit_process.xml | 13 +++++++------ app/src/main/res/layout/fragment_local_goods.xml | 14 ++++++-------- .../res/layout/item/layout/item_spinner_text36.xml | 2 +- app/src/main/res/layout/item/layout/item_step.xml | 12 +++++++----- app/src/main/res/values/strings.xml | 2 +- 10 files changed, 38 insertions(+), 38 deletions(-) diff --git a/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java b/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java index 2d01bd16..85b6164a 100644 --- a/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java +++ b/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java @@ -1746,6 +1746,10 @@ public class ExecuteTheRecipe { * @param value */ public static void WritePLC(String name, Object value, IWriteCallBack callback) { + if(ConfigName.isTEST){ + LogUtils.d("WritePLC name="+name+";value="+value); + return; + } try { if (ConfigName.getInstance().PLC_Address.containsKey(name)) { BPA_PLCADDRESS plcaddress = ConfigName.getInstance().PLC_Address.get(name); diff --git a/app/src/main/java/com/bonait/bnframework/glide/GlideUtil.java b/app/src/main/java/com/bonait/bnframework/glide/GlideUtil.java index f7430b5e..cb7664b2 100644 --- a/app/src/main/java/com/bonait/bnframework/glide/GlideUtil.java +++ b/app/src/main/java/com/bonait/bnframework/glide/GlideUtil.java @@ -95,6 +95,13 @@ public class GlideUtil { if (context == null||path==null) { 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); GlideApp.with(context) .load(path) diff --git a/app/src/main/java/com/bonait/bnframework/ui/activity/DiyProcessActivity.java b/app/src/main/java/com/bonait/bnframework/ui/activity/DiyProcessActivity.java index 1ba0e74a..3a2a4678 100644 --- a/app/src/main/java/com/bonait/bnframework/ui/activity/DiyProcessActivity.java +++ b/app/src/main/java/com/bonait/bnframework/ui/activity/DiyProcessActivity.java @@ -371,14 +371,8 @@ public class DiyProcessActivity extends BaseActivity { } i++; } - if(ConfigName.getInstance().isPhoneVersion){ - Spinner36Adapter spinnerAdapter = new Spinner36Adapter(getContext(), new ArrayList<>(processMap.keySet())); - viewBinding.spinnerProcess.setAdapter(spinnerAdapter); - }else { - ArrayAdapter 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() { @Override diff --git a/app/src/main/java/com/bonait/bnframework/ui/adapter/classify/Spinner36Adapter.java b/app/src/main/java/com/bonait/bnframework/ui/adapter/classify/Spinner36Adapter.java index 5a815955..2aa78c0f 100644 --- a/app/src/main/java/com/bonait/bnframework/ui/adapter/classify/Spinner36Adapter.java +++ b/app/src/main/java/com/bonait/bnframework/ui/adapter/classify/Spinner36Adapter.java @@ -57,7 +57,7 @@ public class Spinner36Adapter extends BaseAdapter { LogUtils.d(" Spinner36Adapter // 1 "+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)); // LogUtils.d(" Spinner36Adapter // 2 "+position); // } diff --git a/app/src/main/java/com/bonait/bnframework/ui/widget/ProcessValueView.java b/app/src/main/java/com/bonait/bnframework/ui/widget/ProcessValueView.java index f6c7540e..b7474530 100644 --- a/app/src/main/java/com/bonait/bnframework/ui/widget/ProcessValueView.java +++ b/app/src/main/java/com/bonait/bnframework/ui/widget/ProcessValueView.java @@ -103,14 +103,8 @@ public class ProcessValueView extends RelativeLayout { 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 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() { @Override diff --git a/app/src/main/res/layout/activity_edit_process.xml b/app/src/main/res/layout/activity_edit_process.xml index fbaf2a7c..f5f37f5c 100644 --- a/app/src/main/res/layout/activity_edit_process.xml +++ b/app/src/main/res/layout/activity_edit_process.xml @@ -22,8 +22,8 @@ app:layout_constraintTop_toTopOf="parent" app:layout_constraintLeft_toLeftOf="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" android:textStyle="bold" android:maxLines="2" @@ -33,10 +33,11 @@ + android:layout_marginLeft="@dimen/dp_150"/> diff --git a/app/src/main/res/layout/item/layout/item_step.xml b/app/src/main/res/layout/item/layout/item_step.xml index 70ec7000..1eae667c 100644 --- a/app/src/main/res/layout/item/layout/item_step.xml +++ b/app/src/main/res/layout/item/layout/item_step.xml @@ -1,6 +1,6 @@ diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b848e43d..cdfccd2b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -144,7 +144,7 @@ 请选择每行对应的子属性! 选择分类 选择属性分类: - 添加分类 + +分类 是否删除? 编辑分类 未选择