Compare commits
2 Commits
19fd2d098b
...
937c6ffe1d
Author | SHA1 | Date | |
---|---|---|---|
937c6ffe1d | |||
1ecc61452f |
@ -16,7 +16,9 @@ import android.view.View;
|
|||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
import android.widget.CompoundButton;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
|
import android.widget.RadioButton;
|
||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
@ -39,10 +41,11 @@ public class ActivityManageActionCloseNotification extends Activity
|
|||||||
boolean edit = false;
|
boolean edit = false;
|
||||||
ProgressDialog progressDialog = null;
|
ProgressDialog progressDialog = null;
|
||||||
|
|
||||||
EditText etNotificationTitle, etNotificationText;
|
EditText etNotificationTitle, etNotificationText, etNotificationDismissalButtonText;
|
||||||
Button bSelectApp, bSaveActionCloseNotification;
|
Button bSelectApp, bSaveActionCloseNotification;
|
||||||
Spinner spinnerTitleDirection, spinnerTextDirection;
|
Spinner spinnerTitleDirection, spinnerTextDirection;
|
||||||
TextView tvSelectedApplication;
|
TextView tvSelectedApplication;
|
||||||
|
RadioButton rbNotificationDismissSimple, rbNotificationDismissButton;
|
||||||
|
|
||||||
private static List<PackageInfo> pInfos = null;
|
private static List<PackageInfo> pInfos = null;
|
||||||
|
|
||||||
@ -262,6 +265,10 @@ public class ActivityManageActionCloseNotification extends Activity
|
|||||||
spinnerTitleDirection = (Spinner)findViewById(R.id.spinnerTitleDirection);
|
spinnerTitleDirection = (Spinner)findViewById(R.id.spinnerTitleDirection);
|
||||||
spinnerTextDirection = (Spinner)findViewById(R.id.spinnerTextDirection);
|
spinnerTextDirection = (Spinner)findViewById(R.id.spinnerTextDirection);
|
||||||
tvSelectedApplication = (TextView)findViewById(R.id.etActivityOrActionPath);
|
tvSelectedApplication = (TextView)findViewById(R.id.etActivityOrActionPath);
|
||||||
|
etNotificationDismissalButtonText = (EditText)findViewById(R.id.etNotificationDismissalButtonText);
|
||||||
|
rbNotificationDismissSimple = (RadioButton)findViewById(R.id.rbNotificationDismissSimple);
|
||||||
|
rbNotificationDismissButton = (RadioButton)findViewById(R.id.rbNotificationDismissButton);
|
||||||
|
|
||||||
|
|
||||||
directions = new String[] {
|
directions = new String[] {
|
||||||
getResources().getString(R.string.directionStringEquals),
|
getResources().getString(R.string.directionStringEquals),
|
||||||
@ -333,6 +340,15 @@ public class ActivityManageActionCloseNotification extends Activity
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
rbNotificationDismissSimple.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void onCheckedChanged(CompoundButton compoundButton, boolean b)
|
||||||
|
{
|
||||||
|
etNotificationDismissalButtonText.setEnabled(!b);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Intent i = getIntent();
|
Intent i = getIntent();
|
||||||
if(!StringUtils.isBlank(i.getStringExtra(ActivityManageRule.intentNameActionParameter2)))
|
if(!StringUtils.isBlank(i.getStringExtra(ActivityManageRule.intentNameActionParameter2)))
|
||||||
{
|
{
|
||||||
|
@ -149,6 +149,41 @@
|
|||||||
|
|
||||||
</TableRow>>
|
</TableRow>>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:layout_marginVertical="@dimen/default_margin"
|
||||||
|
android:background="#aa000000" />
|
||||||
|
|
||||||
|
<TableRow>
|
||||||
|
|
||||||
|
<RadioGroup>
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/rbNotificationDismissSimple"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/simplyDismissNotification" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/rbNotificationDismissButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/clickNotificationButton" />
|
||||||
|
|
||||||
|
</RadioGroup>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:id="@+id/etNotificationDismissalButtonText"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:enabled="false"
|
||||||
|
android:inputType="text" />
|
||||||
|
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
</TableLayout>
|
</TableLayout>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
@ -842,4 +842,6 @@
|
|||||||
<string name="wakeLockExplanation">Activate will keep the screen on while deactivate will let it turn off. For keeping it on you can either enter a duration after which it may turn off again or you can keep it on indefinitely. In the latter case you would need to create another keep-awake action (in this or another rule) in which you select deactivate.</string>
|
<string name="wakeLockExplanation">Activate will keep the screen on while deactivate will let it turn off. For keeping it on you can either enter a duration after which it may turn off again or you can keep it on indefinitely. In the latter case you would need to create another keep-awake action (in this or another rule) in which you select deactivate.</string>
|
||||||
<string name="mayUseRegularExpressions">You may also enter a regular expression here.</string>
|
<string name="mayUseRegularExpressions">You may also enter a regular expression here.</string>
|
||||||
<string name="locationRequiredToDetermineWifiName">To get the wifi SSID, the app requires location permissions. Because the Google version cannot get that, you can only use this trigger if you do not specify an SSID. So it can only be used to detect if wifi is connected or not.</string>
|
<string name="locationRequiredToDetermineWifiName">To get the wifi SSID, the app requires location permissions. Because the Google version cannot get that, you can only use this trigger if you do not specify an SSID. So it can only be used to detect if wifi is connected or not.</string>
|
||||||
|
<string name="simplyDismissNotification">Simply dismiss</string>
|
||||||
|
<string name="clickNotificationButton">Click a button</string>
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in New Issue
Block a user