+ ещё скрытие кнопок
This commit is contained in:
@ -1458,6 +1458,21 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
|||||||
((selectDB)spiHlthProtectiveClothingClean).addField("", "");
|
((selectDB)spiHlthProtectiveClothingClean).addField("", "");
|
||||||
((selectDB)spiHlthProtectiveClothingClean).addField(getString(R.string.Yes), "1");
|
((selectDB)spiHlthProtectiveClothingClean).addField(getString(R.string.Yes), "1");
|
||||||
((selectDB)spiHlthProtectiveClothingClean).addField(getString(R.string.No), "0");
|
((selectDB)spiHlthProtectiveClothingClean).addField(getString(R.string.No), "0");
|
||||||
|
// Чтоб при изменении значения скрывались соответствующие поля
|
||||||
|
((selectDB)spiHlthProtectiveClothingClean).setOnChangeValueListener(new OnClickListener()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void onClick(View v)
|
||||||
|
{
|
||||||
|
LinearLayout llHlthClothingState = findViewById(R.id.llHlthClothingState);
|
||||||
|
if(((selectDB)spiHlthProtectiveClothingClean).getValue() != null && !((selectDB)spiHlthProtectiveClothingClean).getValue().equals("1")) {
|
||||||
|
llHlthClothingState.setVisibility(View.VISIBLE);
|
||||||
|
}else{
|
||||||
|
edtHlthClothingState.setText("");
|
||||||
|
llHlthClothingState.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
//H Замечания относительно типа и состояния средств индивидуальной защиты
|
//H Замечания относительно типа и состояния средств индивидуальной защиты
|
||||||
edtHlthClothingState = (EditText) findViewById(R.id.edtHlthClothingState);
|
edtHlthClothingState = (EditText) findViewById(R.id.edtHlthClothingState);
|
||||||
@ -1566,6 +1581,22 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
|||||||
((selectDB)spiSafObservedPollution).addField("", "");
|
((selectDB)spiSafObservedPollution).addField("", "");
|
||||||
((selectDB)spiSafObservedPollution).addField(getString(R.string.Yes), "1");
|
((selectDB)spiSafObservedPollution).addField(getString(R.string.Yes), "1");
|
||||||
((selectDB)spiSafObservedPollution).addField(getString(R.string.No), "0");
|
((selectDB)spiSafObservedPollution).addField(getString(R.string.No), "0");
|
||||||
|
// Чтоб при изменении значения скрывались соответствующие поля
|
||||||
|
((selectDB)spiSafObservedPollution).setOnChangeValueListener(new OnClickListener()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void onClick(View v)
|
||||||
|
{
|
||||||
|
LinearLayout llSafTypePollution = findViewById(R.id.llSafTypePollution);
|
||||||
|
if(((selectDB)spiSafObservedPollution).getValue() != null && ((selectDB)spiSafObservedPollution).getValue().equals("1")) {
|
||||||
|
llSafTypePollution.setVisibility(View.VISIBLE);
|
||||||
|
}else{
|
||||||
|
edtSafTypePollution.setText("");
|
||||||
|
llSafTypePollution.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
//H Если Да, то где и какой тип загрязнения?
|
//H Если Да, то где и какой тип загрязнения?
|
||||||
edtSafTypePollution = (EditText) findViewById(R.id.edtSafTypePollution);
|
edtSafTypePollution = (EditText) findViewById(R.id.edtSafTypePollution);
|
||||||
guiTableHealth.add(edtSafTypePollution, "safety_type_pollution");
|
guiTableHealth.add(edtSafTypePollution, "safety_type_pollution");
|
||||||
@ -1587,6 +1618,26 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
|||||||
((selectDB)spiSafNonTarget2).addField("", "");
|
((selectDB)spiSafNonTarget2).addField("", "");
|
||||||
((selectDB)spiSafNonTarget2).addField(getString(R.string.Yes), "1");
|
((selectDB)spiSafNonTarget2).addField(getString(R.string.Yes), "1");
|
||||||
((selectDB)spiSafNonTarget2).addField(getString(R.string.No), "0");
|
((selectDB)spiSafNonTarget2).addField(getString(R.string.No), "0");
|
||||||
|
// Чтоб при изменении значения скрывались соответствующие поля
|
||||||
|
((selectDB)spiSafNonTarget2).setOnChangeValueListener(new OnClickListener()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void onClick(View v)
|
||||||
|
{
|
||||||
|
LinearLayout llSafNonTargetEffect2 = findViewById(R.id.llSafNonTargetEffect2);
|
||||||
|
LinearLayout llSafNonTargetEffectPerson = findViewById(R.id.llSafNonTargetEffectPerson);
|
||||||
|
if(((selectDB)spiSafNonTarget2).getValue() != null && ((selectDB)spiSafNonTarget2).getValue().equals("1")) {
|
||||||
|
llSafNonTargetEffect2.setVisibility(View.VISIBLE);
|
||||||
|
llSafNonTargetEffectPerson.setVisibility(View.VISIBLE);
|
||||||
|
}else{
|
||||||
|
edtSafNonTargetEffect2.setText("");
|
||||||
|
edtSafNonTargetEffectPerson.setText("");
|
||||||
|
llSafNonTargetEffect2.setVisibility(View.GONE);
|
||||||
|
llSafNonTargetEffectPerson.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
//H Если Да, то где и какое воздействие?
|
//H Если Да, то где и какое воздействие?
|
||||||
edtSafNonTargetEffect2 = (EditText) findViewById(R.id.edtSafNonTargetEffect2);
|
edtSafNonTargetEffect2 = (EditText) findViewById(R.id.edtSafNonTargetEffect2);
|
||||||
guiTableHealth.add(edtSafNonTargetEffect2, "safety_non_target_effect");
|
guiTableHealth.add(edtSafNonTargetEffect2, "safety_non_target_effect");
|
||||||
@ -2434,6 +2485,37 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
|||||||
//boolean f;
|
//boolean f;
|
||||||
//int c;
|
//int c;
|
||||||
|
|
||||||
|
//H Наблюдалось или сообщалось о случайном загрязнении? (например, разлив инсектицидов, неправильная очистка оборудования и т. д.)
|
||||||
|
LinearLayout llSafTypePollution = findViewById(R.id.llSafTypePollution);
|
||||||
|
if(((selectDB)spiSafObservedPollution).getValue() != null && ((selectDB)spiSafObservedPollution).getValue().equals("1")) {
|
||||||
|
llSafTypePollution.setVisibility(View.VISIBLE);
|
||||||
|
}else{
|
||||||
|
edtSafTypePollution.setText("");
|
||||||
|
llSafTypePollution.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
//H Наблюдалось или сообщалось о воздействии на нецелевые организмы? (например, болезни домашнего скота, смертность рыб, гибель пчел и т.д.)
|
||||||
|
LinearLayout llSafNonTargetEffect2 = findViewById(R.id.llSafNonTargetEffect2);
|
||||||
|
LinearLayout llSafNonTargetEffectPerson = findViewById(R.id.llSafNonTargetEffectPerson);
|
||||||
|
if(((selectDB)spiSafNonTarget2).getValue() != null && ((selectDB)spiSafNonTarget2).getValue().equals("1")) {
|
||||||
|
llSafNonTargetEffect2.setVisibility(View.VISIBLE);
|
||||||
|
llSafNonTargetEffectPerson.setVisibility(View.VISIBLE);
|
||||||
|
}else{
|
||||||
|
edtSafNonTargetEffect2.setText("");
|
||||||
|
edtSafNonTargetEffectPerson.setText("");
|
||||||
|
llSafNonTargetEffect2.setVisibility(View.GONE);
|
||||||
|
llSafNonTargetEffectPerson.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
//H Защитная одежда читая и в хорошем состоянии (теперь в этой анкете)
|
||||||
|
LinearLayout llHlthClothingState = findViewById(R.id.llHlthClothingState);
|
||||||
|
if(((selectDB)spiHlthProtectiveClothingClean).getValue() != null && !((selectDB)spiHlthProtectiveClothingClean).getValue().equals("1")) {
|
||||||
|
llHlthClothingState.setVisibility(View.VISIBLE);
|
||||||
|
}else{
|
||||||
|
edtHlthClothingState.setText("");
|
||||||
|
llHlthClothingState.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
//Проведен ли контроль эффективности (бригада мониторинга)?
|
//Проведен ли контроль эффективности (бригада мониторинга)?
|
||||||
LinearLayout llEffTypeImpact2 = findViewById(R.id.llEffTypeImpact2);
|
LinearLayout llEffTypeImpact2 = findViewById(R.id.llEffTypeImpact2);
|
||||||
LinearLayout llEffMortality2 = findViewById(R.id.llEffMortality2);
|
LinearLayout llEffMortality2 = findViewById(R.id.llEffMortality2);
|
||||||
|
|||||||
@ -2958,6 +2958,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llHlthClothingState"
|
||||||
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"
|
||||||
@ -3287,6 +3288,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llSafTypePollution"
|
||||||
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"
|
||||||
@ -3391,6 +3393,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llSafNonTargetEffect2"
|
||||||
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"
|
||||||
@ -3414,6 +3417,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llSafNonTargetEffectPerson"
|
||||||
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"
|
||||||
|
|||||||
@ -2823,6 +2823,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llHlthClothingState"
|
||||||
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">
|
||||||
@ -2831,11 +2832,6 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/Remarks_with_respect_to_type_and_state_of_protective_clothing"
|
android:text="@string/Remarks_with_respect_to_type_and_state_of_protective_clothing"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
</LinearLayout>
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/edtHlthClothingState"
|
android:id="@+id/edtHlthClothingState"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@ -3175,6 +3171,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llSafTypePollution"
|
||||||
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">
|
||||||
@ -3183,12 +3180,6 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/If_yes_where_and_what_type_of_contamination"
|
android:text="@string/If_yes_where_and_what_type_of_contamination"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/edtSafTypePollution"
|
android:id="@+id/edtSafTypePollution"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -3292,6 +3283,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llSafNonTargetEffect2"
|
||||||
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">
|
||||||
@ -3300,12 +3292,6 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/If_yes_where_and_what_type_of_effect"
|
android:text="@string/If_yes_where_and_what_type_of_effect"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/edtSafNonTargetEffect2"
|
android:id="@+id/edtSafNonTargetEffect2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -3317,46 +3303,49 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llSafNonTargetEffectPerson"
|
||||||
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"
|
||||||
|
android:orientation="vertical"
|
||||||
|
>
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/If_reported_by_another_person_by_whom"
|
android:text="@string/If_reported_by_another_person_by_whom"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/edtSafNonTargetEffectPerson"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:importantForAutofill="no"
|
||||||
|
android:autofillHints=""
|
||||||
|
android:ems="10"
|
||||||
|
android:inputType="text" />
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/btnSafNonTargetEffectPerson"
|
||||||
|
style="@style/Widget.MaterialComponents.Button.Icon"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:insetLeft="0dp"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetRight="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:minWidth="20dp"
|
||||||
|
app:icon="@drawable/ic_information"
|
||||||
|
app:iconGravity="textStart"
|
||||||
|
app:iconPadding="0dp"
|
||||||
|
app:iconSize="20dp"
|
||||||
|
app:cornerRadius="20dp"/>
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/edtSafNonTargetEffectPerson"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:importantForAutofill="no"
|
|
||||||
android:autofillHints=""
|
|
||||||
android:ems="10"
|
|
||||||
android:inputType="text" />
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btnSafNonTargetEffectPerson"
|
|
||||||
style="@style/Widget.MaterialComponents.Button.Icon"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="0"
|
|
||||||
android:insetLeft="0dp"
|
|
||||||
android:insetTop="0dp"
|
|
||||||
android:insetRight="0dp"
|
|
||||||
android:insetBottom="0dp"
|
|
||||||
android:minWidth="20dp"
|
|
||||||
app:icon="@drawable/ic_information"
|
|
||||||
app:iconGravity="textStart"
|
|
||||||
app:iconPadding="0dp"
|
|
||||||
app:iconSize="20dp"
|
|
||||||
app:cornerRadius="20dp"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@ -3041,6 +3041,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llHlthClothingState"
|
||||||
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"
|
||||||
@ -3372,6 +3373,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llSafTypePollution"
|
||||||
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"
|
||||||
@ -3476,6 +3478,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llSafNonTargetEffect2"
|
||||||
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"
|
||||||
@ -3505,6 +3508,7 @@
|
|||||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llSafNonTargetEffectPerson"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:baselineAligned="false"
|
android:baselineAligned="false"
|
||||||
|
|||||||
Reference in New Issue
Block a user