From 8a67c49668e11002180b26a0effd9083077c153a Mon Sep 17 00:00:00 2001 From: Igor I Date: Wed, 27 Aug 2025 17:16:43 +0500 Subject: [PATCH] + --- .../kz/istt/locust/LocustDelActivity.java | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/kz/istt/locust/LocustDelActivity.java b/app/src/main/java/kz/istt/locust/LocustDelActivity.java index bec040b..5accc28 100644 --- a/app/src/main/java/kz/istt/locust/LocustDelActivity.java +++ b/app/src/main/java/kz/istt/locust/LocustDelActivity.java @@ -1126,9 +1126,31 @@ public class LocustDelActivity extends FragmentActivity implements LocationListe } dboh.close(); + edtBiologicalImpact.addTextChangedListener(new TextWatcher() + { + public void afterTextChanged(Editable s) + { + } + public void beforeTextChanged(CharSequence s, int start, int count, int after) + { + } - + public void onTextChanged(CharSequence s, int start, int before, int count) + { + String str = LocustDelActivity.this.edtBiologicalImpact.getText().toString(); + for (int i = 0; i < glBiologicalImpact.getChildCount(); i++) { + View child = glBiologicalImpact.getChildAt(i); + if (child instanceof CheckBox) { + CheckBox cb = (CheckBox) child; + String val = cb.getTag().toString(); + if(str.contains(val) && !cb.isChecked()) { + cb.setChecked(true); + } + } + } + } + }); edtEffMortality = (EditText) findViewById(R.id.edtEffMortality); // смертность саранчи(%) guiTable.add(edtEffMortality, "efficacy_mortality");