From 49e4c20ab6bf6927682ec540287876d8b1e942ce Mon Sep 17 00:00:00 2001 From: Jens Date: Sat, 14 Jan 2023 22:50:43 +0100 Subject: [PATCH] Allow negative integers as intents --- .../com/jens/automation2/ActivityManageActionSendBroadcast.java | 2 +- .../com/jens/automation2/ActivityManageActionStartActivity.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/jens/automation2/ActivityManageActionSendBroadcast.java b/app/src/main/java/com/jens/automation2/ActivityManageActionSendBroadcast.java index 0db9d599..609a9cc6 100644 --- a/app/src/main/java/com/jens/automation2/ActivityManageActionSendBroadcast.java +++ b/app/src/main/java/com/jens/automation2/ActivityManageActionSendBroadcast.java @@ -225,7 +225,7 @@ public class ActivityManageActionSendBroadcast extends Activity public void onItemSelected(AdapterView arg0, View arg1, int arg2, long arg3) { if(supportedIntentTypes[arg2].equals("int") || supportedIntentTypes[arg2].equals("long") || supportedIntentTypes[arg2].equals("short")) - ActivityManageActionSendBroadcast.this.etParameterValue.setInputType(InputType.TYPE_CLASS_NUMBER); + ActivityManageActionSendBroadcast.this.etParameterValue.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_SIGNED); else if(supportedIntentTypes[arg2].equals("double") || supportedIntentTypes[arg2].equals("float")) ActivityManageActionSendBroadcast.this.etParameterValue.setInputType(InputType.TYPE_NUMBER_FLAG_DECIMAL); else diff --git a/app/src/main/java/com/jens/automation2/ActivityManageActionStartActivity.java b/app/src/main/java/com/jens/automation2/ActivityManageActionStartActivity.java index 625d381e..ddd1f83f 100644 --- a/app/src/main/java/com/jens/automation2/ActivityManageActionStartActivity.java +++ b/app/src/main/java/com/jens/automation2/ActivityManageActionStartActivity.java @@ -268,7 +268,7 @@ public class ActivityManageActionStartActivity extends Activity public void onItemSelected(AdapterView arg0, View arg1, int arg2, long arg3) { if(supportedIntentTypes[arg2].equals("int") || supportedIntentTypes[arg2].equals("long") || supportedIntentTypes[arg2].equals("short")) - ActivityManageActionStartActivity.this.etParameterValue.setInputType(InputType.TYPE_CLASS_NUMBER); + ActivityManageActionStartActivity.this.etParameterValue.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_SIGNED); else if(supportedIntentTypes[arg2].equals("double") || supportedIntentTypes[arg2].equals("float")) ActivityManageActionStartActivity.this.etParameterValue.setInputType(InputType.TYPE_NUMBER_FLAG_DECIMAL); else