mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-05 18:42:55 +00:00
disable Set Time button after fragment creation
This commit is contained in:
1 parent
b21c010592
commit
8fc651a67b
1 file changed
+14
-7
+14
-7
@@ -62,6 +62,7 @@ public class StartTimeFragment extends BaseFragment
|
||||
private static final int FUTURE_DAYS = 25;
|
||||
private static final int PAST_DAYS = 3;
|
||||
private static final int MAX_DIFF_MIN = 60;
|
||||
private static final int NONE = -1;
|
||||
private static final int ABSOLUTE = 0;
|
||||
private static final int RELATIVE = 1;
|
||||
|
||||
@@ -224,13 +225,6 @@ public class StartTimeFragment extends BaseFragment
|
||||
mStartTimeOffset = result.getStartTimeDiff();
|
||||
mRaceId = Util.get(result.getDependingOnRaces(), 0);
|
||||
}
|
||||
|
||||
if (mSetStartAbsolute != null) {
|
||||
mSetStartAbsolute.setEnabled(false);
|
||||
}
|
||||
if (mSetStartRelative != null) {
|
||||
mSetStartRelative.setEnabled(false);
|
||||
}
|
||||
break;
|
||||
|
||||
default: // MODE_SETUP
|
||||
@@ -262,6 +256,11 @@ public class StartTimeFragment extends BaseFragment
|
||||
|
||||
initViewsAbsolute(time);
|
||||
initViewsRelative();
|
||||
|
||||
// reset Set Time button after init
|
||||
if (getArguments() != null && getArguments().getInt(START_MODE, START_MODE_PRESETUP) == MODE_TIME_PANEL) {
|
||||
activateSetTime(NONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -685,6 +684,14 @@ public class StartTimeFragment extends BaseFragment
|
||||
mSetStartRelative.setEnabled(true);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (mSetStartAbsolute != null) {
|
||||
mSetStartAbsolute.setEnabled(false);
|
||||
}
|
||||
if (mSetStartRelative != null) {
|
||||
mSetStartRelative.setEnabled(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user