diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2023-10-22 15:09:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-22 15:09:07 +0200 |
commit | 69be89881a7ceb7938209a532859050ff96bb257 (patch) | |
tree | 0e5101b4ead1dd252ea50668dee74ba686c23722 /app/src/main/java/de/danoeh/antennapod/dialog | |
parent | 0b7403e1ddd9d1ef2910d4ffabfb377fe3b11b3c (diff) | |
download | AntennaPod-69be89881a7ceb7938209a532859050ff96bb257.zip |
Make 'change times' button a settings icon (#6721)
Users didn't scroll down to find the button. Now it is next to the checkbox,
so it is harder to overlook.
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/dialog')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/dialog/SleepTimerDialog.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/SleepTimerDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/SleepTimerDialog.java index 8314382cb..67eb74fbc 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/SleepTimerDialog.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/SleepTimerDialog.java @@ -10,6 +10,7 @@ import android.view.inputmethod.InputMethodManager; import android.widget.Button; import android.widget.CheckBox; import android.widget.EditText; +import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; @@ -110,12 +111,13 @@ public class SleepTimerDialog extends DialogFragment { final CheckBox cbShakeToReset = content.findViewById(R.id.cbShakeToReset); final CheckBox cbVibrate = content.findViewById(R.id.cbVibrate); chAutoEnable = content.findViewById(R.id.chAutoEnable); - final TextView changeTimesButton = content.findViewById(R.id.changeTimes); + final ImageView changeTimesButton = content.findViewById(R.id.changeTimesButton); cbShakeToReset.setChecked(SleepTimerPreferences.shakeToReset()); cbVibrate.setChecked(SleepTimerPreferences.vibrate()); chAutoEnable.setChecked(SleepTimerPreferences.autoEnable()); changeTimesButton.setEnabled(chAutoEnable.isChecked()); + changeTimesButton.setAlpha(chAutoEnable.isChecked() ? 1.0f : 0.5f); cbShakeToReset.setOnCheckedChangeListener((buttonView, isChecked) -> SleepTimerPreferences.setShakeToReset(isChecked)); @@ -125,6 +127,7 @@ public class SleepTimerDialog extends DialogFragment { -> { SleepTimerPreferences.setAutoEnable(isChecked); changeTimesButton.setEnabled(isChecked); + changeTimesButton.setAlpha(isChecked ? 1.0f : 0.5f); }); updateAutoEnableText(); |