summaryrefslogtreecommitdiff
path: root/src/com/android/deskclock/timer/TimerFragment.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/deskclock/timer/TimerFragment.java')
-rw-r--r--src/com/android/deskclock/timer/TimerFragment.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/com/android/deskclock/timer/TimerFragment.java b/src/com/android/deskclock/timer/TimerFragment.java
index 7779be656..0b2a49cec 100644
--- a/src/com/android/deskclock/timer/TimerFragment.java
+++ b/src/com/android/deskclock/timer/TimerFragment.java
@@ -236,6 +236,26 @@ public final class TimerFragment extends DeskClockFragment {
}
}
+ @Override
+ public int getFabTargetVisibility() {
+ if (mCurrentView == mTimersView) {
+ final Timer timer = getTimer();
+ if (timer == null) {
+ return INVISIBLE;
+ } else {
+ return VISIBLE;
+ }
+ } else if (mCurrentView == mCreateTimerView) {
+ if (mCreateTimerView.hasValidInput()) {
+ return VISIBLE;
+ } else {
+ return INVISIBLE;
+ }
+ }
+
+ return INVISIBLE;
+ }
+
private void updateFab(@NonNull ImageView fab) {
if (mCurrentView == mTimersView) {
final Timer timer = getTimer();