From badf35b3c1b972ee301b453c3e395913fe3bddfa Mon Sep 17 00:00:00 2001 From: NXX <447201003@qq> Date: Mon, 24 Apr 2023 14:14:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=99=E4=BB=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/example/bpa/db/QueryDB.java | 4 +- .../example/bpa/view/from/lcsz_activity.java | 4 +- app/src/main/res/drawable/settingbutton.xml | 55 +++++++++++++++++++ .../from/layout/fragment_system_set.xml | 39 +++++++------ 4 files changed, 82 insertions(+), 20 deletions(-) create mode 100644 app/src/main/res/drawable/settingbutton.xml diff --git a/app/src/main/java/com/example/bpa/db/QueryDB.java b/app/src/main/java/com/example/bpa/db/QueryDB.java index a0f60d9..2460b17 100644 --- a/app/src/main/java/com/example/bpa/db/QueryDB.java +++ b/app/src/main/java/com/example/bpa/db/QueryDB.java @@ -325,8 +325,8 @@ public class QueryDB { * * @param data */ - public static void UpdateSilosAndMaterial(BPA_SILOSANDMATERIAL data) { - Update(BPA_SILOSANDMATERIAL.class, data); + public static boolean UpdateSilosAndMaterial(BPA_SILOSANDMATERIAL data) { + return Update(BPA_SILOSANDMATERIAL.class, data); } /** diff --git a/app/src/main/java/com/example/bpa/view/from/lcsz_activity.java b/app/src/main/java/com/example/bpa/view/from/lcsz_activity.java index 8bd720e..f663207 100644 --- a/app/src/main/java/com/example/bpa/view/from/lcsz_activity.java +++ b/app/src/main/java/com/example/bpa/view/from/lcsz_activity.java @@ -160,8 +160,8 @@ public class lcsz_activity extends AppCompatActivity implements View.OnClickList BPA_SILOSANDMATERIAL item = new BPA_SILOSANDMATERIAL(); item.silosID = currentSilo.id; item.materialID = ((selectitem_adapter)viewHolder).getItem(position).id;; - - if(QueryDB.UpdateSilosAndMaterial(item)){ //更新 + //更新 + if(QueryDB.UpdateSilosAndMaterial(item)){ currentSilo.materialName.setText(((selectitem_adapter)viewHolder).getItem(position).name); } } diff --git a/app/src/main/res/drawable/settingbutton.xml b/app/src/main/res/drawable/settingbutton.xml new file mode 100644 index 0000000..fbcc362 --- /dev/null +++ b/app/src/main/res/drawable/settingbutton.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/from/layout/fragment_system_set.xml b/app/src/main/res/layout/from/layout/fragment_system_set.xml index 35b0458..b9c6284 100644 --- a/app/src/main/res/layout/from/layout/fragment_system_set.xml +++ b/app/src/main/res/layout/from/layout/fragment_system_set.xml @@ -9,24 +9,31 @@ - +