Invert variable check
This commit is contained in:
parent
04d2e4b432
commit
b6d7958389
@ -5,6 +5,8 @@ import android.content.Intent;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
import android.widget.CheckBox;
|
||||||
|
import android.widget.CompoundButton;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
@ -14,6 +16,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
public class ActivityManageTriggerCheckVariable extends Activity
|
public class ActivityManageTriggerCheckVariable extends Activity
|
||||||
{
|
{
|
||||||
EditText etVariableKeyTrigger, etVariableValueTrigger;
|
EditText etVariableKeyTrigger, etVariableValueTrigger;
|
||||||
|
CheckBox chkTriggerVariableDirection;
|
||||||
Button bTriggerVariableSave;
|
Button bTriggerVariableSave;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -25,6 +28,7 @@ public class ActivityManageTriggerCheckVariable extends Activity
|
|||||||
|
|
||||||
etVariableKeyTrigger = (EditText) findViewById(R.id.etVariableKeyTrigger);
|
etVariableKeyTrigger = (EditText) findViewById(R.id.etVariableKeyTrigger);
|
||||||
etVariableValueTrigger = (EditText) findViewById(R.id.etVariableValueTrigger);
|
etVariableValueTrigger = (EditText) findViewById(R.id.etVariableValueTrigger);
|
||||||
|
chkTriggerVariableDirection = (CheckBox)findViewById(R.id.chkTriggerVariableDirection);
|
||||||
bTriggerVariableSave = (Button) findViewById(R.id.bTriggerVariableSave);
|
bTriggerVariableSave = (Button) findViewById(R.id.bTriggerVariableSave);
|
||||||
|
|
||||||
Intent input = getIntent();
|
Intent input = getIntent();
|
||||||
@ -36,6 +40,18 @@ public class ActivityManageTriggerCheckVariable extends Activity
|
|||||||
etVariableValueTrigger.setText(conditions[1]);
|
etVariableValueTrigger.setText(conditions[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chkTriggerVariableDirection.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked)
|
||||||
|
{
|
||||||
|
if(checked)
|
||||||
|
chkTriggerVariableDirection.setText(getResources().getString(R.string.matches));
|
||||||
|
else
|
||||||
|
chkTriggerVariableDirection.setText(getResources().getString(R.string.doesNotMatch));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
bTriggerVariableSave.setOnClickListener(new View.OnClickListener()
|
bTriggerVariableSave.setOnClickListener(new View.OnClickListener()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
@ -62,6 +62,13 @@
|
|||||||
|
|
||||||
</TableLayout>
|
</TableLayout>
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/chkTriggerVariableDirection"
|
||||||
|
android:layout_marginTop="@dimen/default_margin"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:text="@string/matches" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -949,4 +949,6 @@
|
|||||||
<string name="helpTextProfiles">A profile is a collection of settings for ringtones, volumes and other audio related settings that you can have applied from rules or apply it manually.\n\nIt is also possible to query for the last activated profile as a trigger. In the normal case it will only query if the profile was the last activated one (regardless if specific audio settings have been changed in the meantime). But you can also have the individual settings compared.</string>
|
<string name="helpTextProfiles">A profile is a collection of settings for ringtones, volumes and other audio related settings that you can have applied from rules or apply it manually.\n\nIt is also possible to query for the last activated profile as a trigger. In the normal case it will only query if the profile was the last activated one (regardless if specific audio settings have been changed in the meantime). But you can also have the individual settings compared.</string>
|
||||||
<string name="version143StartOtherActivityHint">In version 1.8.2 it was necessary to revise the way actions to start other programs were saved. Compatibility could not be ensured. Please check and edit your start other activity actions to make sure they are still working.</string>
|
<string name="version143StartOtherActivityHint">In version 1.8.2 it was necessary to revise the way actions to start other programs were saved. Compatibility could not be ensured. Please check and edit your start other activity actions to make sure they are still working.</string>
|
||||||
<string name="importChooseFolderNotice">In the following dialog do not try to select specific files, but choose the folder in which the Automation backup files reside. If the choose button is disabled, you have found an Android limitation. In that case try moving the files to a subdirectory first.</string>
|
<string name="importChooseFolderNotice">In the following dialog do not try to select specific files, but choose the folder in which the Automation backup files reside. If the choose button is disabled, you have found an Android limitation. In that case try moving the files to a subdirectory first.</string>
|
||||||
|
<string name="matches">matches</string>
|
||||||
|
<string name="doesNotMatch">does not match</string>
|
||||||
</resources>
|
</resources>
|
Loading…
x
Reference in New Issue
Block a user