Added remark to snooze dialog

This commit is contained in:
M66B
2025-06-16 07:51:39 +02:00
parent 3b016829a5
commit 40f2ca166a
3 changed files with 26 additions and 0 deletions

View File

@@ -79,6 +79,7 @@ public class FragmentDialogDuration extends FragmentDialogBase {
final TextView tvDuration = dview.findViewById(R.id.tvDuration);
final TimePicker timePicker = dview.findViewById(R.id.timePicker);
final DatePicker datePicker = dview.findViewById(R.id.datePicker);
final TextView tvSnoozeDoze = dview.findViewById(R.id.tvSnoozeDoze);
final int colorWarning = Helper.resolveColor(context, R.attr.colorWarning);
final int textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
@@ -109,6 +110,16 @@ public class FragmentDialogDuration extends FragmentDialogBase {
timePicker.setMinute(cal.get(Calendar.MINUTE));
}
boolean isIgnoring = !Boolean.FALSE.equals(Helper.isIgnoringOptimizations(context));
tvSnoozeDoze.setVisibility(isIgnoring ? View.GONE : View.VISIBLE);
tvSnoozeDoze.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
v.getContext().startActivity(new Intent(v.getContext(), ActivitySetup.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK));
}
});
Dialog dialog = new AlertDialog.Builder(context)
.setIcon(R.drawable.twotone_timelapse_24)
.setTitle(title)