+скрывание полей
This commit is contained in:
@ -1325,6 +1325,33 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// Чтоб при изменении значения скрывались соответствующие поля
|
||||||
|
((selectDB)spiEffControl2).setOnChangeValueListener(new OnClickListener()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void onClick(View v)
|
||||||
|
{
|
||||||
|
LinearLayout llEffTypeImpact2 = findViewById(R.id.llEffTypeImpact2);
|
||||||
|
LinearLayout llEffMortality2 = findViewById(R.id.llEffMortality2);
|
||||||
|
LinearLayout llEffPassedTime2 = findViewById(R.id.llEffPassedTime2);
|
||||||
|
LinearLayout llEffMethod2 = findViewById(R.id.llEffMethod2);
|
||||||
|
if(((selectDB)spiEffControl2).getValue() != null && ((selectDB)spiEffControl2).getValue().equals("1")) {
|
||||||
|
llEffTypeImpact2.setVisibility(View.VISIBLE);
|
||||||
|
llEffMortality2.setVisibility(View.VISIBLE);
|
||||||
|
llEffPassedTime2.setVisibility(View.VISIBLE);
|
||||||
|
llEffMethod2.setVisibility(View.VISIBLE);
|
||||||
|
}else{
|
||||||
|
((selectDB)spiEffTypeImpact2).setValue(null);
|
||||||
|
edtEffMortality2.setText("");
|
||||||
|
edtEffPassedTime2.setText("");
|
||||||
|
((selectDB)spiEffMethod2).setValue(null);
|
||||||
|
llEffTypeImpact2.setVisibility(View.GONE);
|
||||||
|
llEffMortality2.setVisibility(View.GONE);
|
||||||
|
llEffPassedTime2.setVisibility(View.GONE);
|
||||||
|
llEffMethod2.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
//H Тип оцениваемого биологического воздействия
|
//H Тип оцениваемого биологического воздействия
|
||||||
spiEffTypeImpact2 = findViewById(R.id.spiEffTypeImpact2);
|
spiEffTypeImpact2 = findViewById(R.id.spiEffTypeImpact2);
|
||||||
guiTableHealth.add(spiEffTypeImpact2, "efficacy_impact_type_id");
|
guiTableHealth.add(spiEffTypeImpact2, "efficacy_impact_type_id");
|
||||||
@ -2407,6 +2434,27 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
|||||||
//boolean f;
|
//boolean f;
|
||||||
//int c;
|
//int c;
|
||||||
|
|
||||||
|
//Проведен ли контроль эффективности (бригада мониторинга)?
|
||||||
|
LinearLayout llEffTypeImpact2 = findViewById(R.id.llEffTypeImpact2);
|
||||||
|
LinearLayout llEffMortality2 = findViewById(R.id.llEffMortality2);
|
||||||
|
LinearLayout llEffPassedTime2 = findViewById(R.id.llEffPassedTime2);
|
||||||
|
LinearLayout llEffMethod2 = findViewById(R.id.llEffMethod2);
|
||||||
|
if(((selectDB)spiEffControl2).getValue() != null && ((selectDB)spiEffControl2).getValue().equals("1")) {
|
||||||
|
llEffTypeImpact2.setVisibility(View.VISIBLE);
|
||||||
|
llEffMortality2.setVisibility(View.VISIBLE);
|
||||||
|
llEffPassedTime2.setVisibility(View.VISIBLE);
|
||||||
|
llEffMethod2.setVisibility(View.VISIBLE);
|
||||||
|
}else{
|
||||||
|
((selectDB)spiEffTypeImpact2).setValue(null);
|
||||||
|
edtEffMortality2.setText("");
|
||||||
|
edtEffPassedTime2.setText("");
|
||||||
|
((selectDB)spiEffMethod2).setValue(null);
|
||||||
|
llEffTypeImpact2.setVisibility(View.GONE);
|
||||||
|
llEffMortality2.setVisibility(View.GONE);
|
||||||
|
llEffPassedTime2.setVisibility(View.GONE);
|
||||||
|
llEffMethod2.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
//Если проводилось наблюдение за опрыскиванием: соблюдалась ли надлежащая практика применения инсектицидов?
|
//Если проводилось наблюдение за опрыскиванием: соблюдалась ли надлежащая практика применения инсектицидов?
|
||||||
LinearLayout llSprDescription = findViewById(R.id.llSprDescription);
|
LinearLayout llSprDescription = findViewById(R.id.llSprDescription);
|
||||||
if(((selectDB)spiSprObservation).getValue() != null && ((selectDB)spiSprObservation).getValue().equals("1")) {
|
if(((selectDB)spiSprObservation).getValue() != null && ((selectDB)spiSprObservation).getValue().equals("1")) {
|
||||||
|
|||||||
@ -2692,6 +2692,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llEffTypeImpact2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
@ -2713,6 +2714,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llEffMortality2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center">
|
android:gravity="center">
|
||||||
@ -2729,6 +2731,7 @@
|
|||||||
app:boxBackgroundColor="@color/transparent">
|
app:boxBackgroundColor="@color/transparent">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/edtEffMortality2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@ -2741,6 +2744,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llEffTime2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center">
|
android:gravity="center">
|
||||||
@ -2769,6 +2773,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llEffMethod2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
@ -2802,7 +2807,6 @@
|
|||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
@ -2578,6 +2578,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llEffTypeImpact2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||||
@ -2596,6 +2597,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llEffMortality2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||||
@ -2605,6 +2607,7 @@
|
|||||||
android:text="@string/Biological_efficiency_of_treatment"
|
android:text="@string/Biological_efficiency_of_treatment"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"/>
|
android:textAppearance="?android:attr/textAppearanceSmall"/>
|
||||||
<EditText
|
<EditText
|
||||||
|
android:id="@+id/edtEffMortality2"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@ -2615,6 +2618,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llEffTime2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||||
@ -2635,6 +2639,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llEffMethod2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||||
|
|||||||
@ -2778,6 +2778,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llEffTypeImpact2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
@ -2800,6 +2801,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llEffMortality2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center">
|
android:gravity="center">
|
||||||
@ -2829,6 +2831,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llEffPassedTime2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center">
|
android:gravity="center">
|
||||||
@ -2857,6 +2860,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llEffMethod2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
@ -2875,8 +2879,6 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
Reference in New Issue
Block a user