added RaceFactor to race setup

This commit is contained in:
Peter Siegmund committed 2016-04-04 16:58:22 +02:00
1 parent 4f4dff2132
commit 9c82b23ea5
14 files changed
+326 -139

No files matched your search

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
@@ -10,6 +10,15 @@
android:baselineAligned="false"
android:orientation="horizontal">
<com.sap.sailing.racecommittee.app.ui.views.PanelButton
android:id="@+id/button_factor"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
app:buttonHeader="@string/race_factor"
app:buttonType="typeValue"
app:linePosition="right" />
<com.sap.sailing.racecommittee.app.ui.views.PanelButton
android:id="@+id/button_course"
android:layout_width="0dp"
@@ -17,7 +26,7 @@
android:layout_weight="1"
app:buttonHeader="@string/course"
app:buttonType="typeValue"
app:linePosition="right"/>
app:linePosition="right" />
<com.sap.sailing.racecommittee.app.ui.views.PanelButton
android:id="@+id/button_wind"
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
@@ -16,7 +15,7 @@
android:layout_height="0dp"
android:layout_weight="1"
app:buttonHeader="@string/start_procedure"
app:buttonType="typeValue"/>
app:buttonType="typeValue" />
<com.sap.sailing.racecommittee.app.ui.views.PanelButton
android:id="@+id/button_mode"
@@ -51,6 +50,14 @@
app:buttonSwitch=""
app:buttonType="typeSwitch" />
<com.sap.sailing.racecommittee.app.ui.views.PanelButton
android:id="@+id/button_factor"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
app:buttonHeader="@string/race_factor"
app:buttonType="typeValue" />
<com.sap.sailing.racecommittee.app.ui.views.PanelButton
android:id="@+id/button_course"
android:layout_width="match_parent"
@@ -66,7 +73,6 @@
android:layout_weight="1"
app:buttonHeader="@string/wind"
app:buttonType="typeValue" />
</LinearLayout>
<View
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/sap_gray_black_30">
<com.sap.sailing.racecommittee.app.ui.layouts.HeaderLayout
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:headerText="@string/gate_start_pathfinder" />
<RelativeLayout
android:id="@+id/path_finder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_gravity="center_vertical">
<Button
android:id="@+id/set_path_finder"
style="?attr/button"
android:layout_width="@dimen/default_button_width"
android:layout_height="@dimen/default_button_height"
android:layout_centerInParent="true"
android:layout_margin="@dimen/unscheduled_confirm_button_margin"
android:enabled="false"
android:text="@string/gate_start_set_pathfinder"
android:textSize="@dimen/textSize_18" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/path_finder"
android:layout_below="@id/header">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_margin="@dimen/default_margin_twice">
<com.sap.sailing.racecommittee.app.ui.layouts.FloatLabelLayout
android:layout_width="200dp"
android:layout_height="wrap_content"
app:floatLabelPaddingLeft="@dimen/float_label_padding"
app:floatLabelTextAppearance="?attr/floatLabel">
<EditText
android:id="@+id/pathfinder_nat"
style="?attr/editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:hint="@string/gate_start_nationality"
android:inputType="textCapCharacters"
android:textAppearance="?attr/textNormal"
android:textColor="?attr/white" />
</com.sap.sailing.racecommittee.app.ui.layouts.FloatLabelLayout>
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
@@ -434,6 +434,8 @@
<string name="preference_allow_dependent_races_header">Relative Startzeit</string>
<string name="preference_allow_dependent_races_description">Aktiviert relative Startzeiten zwischen Rennen</string>
<string name="preference_dependent_races_offset_header">Standard Offset der relativen Startzeit (Minuten)</string>
<string name="preference_allow_edit_race_factor_header">Rennfaktor ändern</string>
<string name="preference_allow_edit_race_factor_description">Rennleiter können den Rennfaktor je Rennen ändern</string>
<string name="error_finished_time">Die ausgewählte Zielzeit liegt vor der Zeit, der ersten Schiffeinfahrt. Bitte überprüfe die Uhrzeit.</string>
<string name="error_finishing_time">Die ausgewählte Zeit is vor dem Rennstart. Bitte überprüfe die Uhrzeit.</string>
<string name="error_time_in_future">Die ausgewählte Zeit liegt in der Zukunft. Bitte überprüfe die Uhrzeit.</string>
@@ -496,5 +498,6 @@
<string name="preference_non_public_events_header">Zeige nicht öffentliche Events</string>
<string name="preference_non_public_events_summary">Lade alle Events, auch die nicht öffentlichen.</string>
<string name="race_factor">Faktor</string>
</resources>
@@ -87,6 +87,8 @@
<bool name="preference_allow_dependent_races_default">true</bool>
<string name="preference_dependent_races_offset_key" translatable="false">dependentRacesOffset</string>
<integer name="preference_dependent_races_offset_default">5</integer>
<string name="preference_allow_edit_race_factor_key" translatable="false">raceFactor</string>
<bool name="preference_allow_edit_race_factor_default">false</bool>
<string name="preference_allow_demo_key" translatable="false">allow_demo</string>
<bool name="preference_allow_demo_default">false</bool>
@@ -456,6 +456,8 @@
<string name="preference_allow_dependent_races_header">Relative Start Time (Minutes)</string>
<string name="preference_allow_dependent_races_description">Enable Relative Start Time between Races</string>
<string name="preference_dependent_races_offset_header">Default Relative Start Time Offset</string>
<string name="preference_allow_edit_race_factor_header">Race factor change</string>
<string name="preference_allow_edit_race_factor_description">Race managers can change the race factor per race</string>
<string name="error_finished_time">The given finish time is earlier than the first finisher time. Please recheck the time.</string>
<string name="error_finishing_time">The selected time is before the race start.</string>
<string name="error_time_in_future">The given time is in future. Please recheck the time.</string>
@@ -524,4 +526,5 @@
<string name="preference_non_public_events_header">Show Non Public Events</string>
<string name="preference_non_public_events_summary">Load all events including the no public one.</string>
<string name="race_factor">Factor</string>
</resources>
@@ -7,33 +7,39 @@
android:defaultValue="@string/preference_racing_procedure_override_default"
android:key="@string/preference_racing_procedure_override_key"
android:summary="@string/override_default_start_procedure_type_select_description"
android:title="@string/override_default_start_procedure_type_select_header"/>
android:title="@string/override_default_start_procedure_type_select_header" />
<ListPreference
android:defaultValue="@string/preference_course_designer_override_default"
android:key="@string/preference_course_designer_override_key"
android:title="@string/override_default_course_designer_type_select_header"/>
android:title="@string/override_default_course_designer_type_select_header" />
<CheckBoxPreference
android:defaultValue="@bool/preference_allow_dependent_races_default"
android:key="@string/preference_allow_dependent_races_key"
android:summary="@string/preference_allow_dependent_races_description"
android:title="@string/preference_allow_dependent_races_header"/>
android:title="@string/preference_allow_dependent_races_header" />
<com.sap.sailing.racecommittee.app.ui.views.IntegerEditTextPreference
android:defaultValue="@integer/preference_dependent_races_offset_default"
android:key="@string/preference_dependent_races_offset_key"
android:numeric="integer"
android:title="@string/preference_dependent_races_offset_header"/>
android:title="@string/preference_dependent_races_offset_header" />
<SwitchPreference
android:defaultValue="@bool/preference_heading_with_declination_subtracted_default"
android:key="@string/preference_heading_with_declination_subtracted_key"
android:switchTextOn="@string/preference_heading_with_declination_subtracted_is_enabled"
android:switchTextOff="@string/preference_heading_with_declination_subtracted_is_disabled"
android:summaryOn="@string/preference_heading_with_declination_subtracted_summary_is_enabled"
android:summaryOff="@string/preference_heading_with_declination_subtracted_summary_is_disabled"
android:title="@string/preference_heading_with_declination_subtracted_enabled"/>
android:summaryOn="@string/preference_heading_with_declination_subtracted_summary_is_enabled"
android:switchTextOff="@string/preference_heading_with_declination_subtracted_is_disabled"
android:switchTextOn="@string/preference_heading_with_declination_subtracted_is_enabled"
android:title="@string/preference_heading_with_declination_subtracted_enabled" />
<CheckBoxPreference
android:defaultValue="@bool/preference_allow_edit_race_factor_default"
android:key="@string/preference_allow_edit_race_factor_key"
android:summary="@string/preference_allow_edit_race_factor_description"
android:title="@string/preference_allow_edit_race_factor_header" />
</PreferenceCategory>
<PreferenceCategory android:title="RRS26">
@@ -42,19 +48,19 @@
android:defaultValue="@string/preference_racing_procedure_classflag_default"
android:key="@string/preference_racing_procedure_rrs26_classflag_key"
android:summary="@string/empty"
android:title="@string/preference_racing_procedure_classflag_header"/>
android:title="@string/preference_racing_procedure_classflag_header" />
<CheckBoxPreference
android:defaultValue="@bool/preference_racing_procedure_rrs26_hasxray_default"
android:key="@string/preference_racing_procedure_rrs26_hasxray_key"
android:summary="@string/preference_racing_procedure_hasxray_description"
android:title="@string/preference_racing_procedure_hasxray_header"/>
android:title="@string/preference_racing_procedure_hasxray_header" />
<com.sap.sailing.racecommittee.app.ui.views.FixedMultiSelectListPreference
android:defaultValue="@array/preference_racing_procedure_rrs26_startmode_flags_default"
android:key="@string/preference_racing_procedure_rrs26_startmode_flags_key"
android:summary="@string/empty"
android:title="@string/preference_racing_procedure_rrs26_startmode_flags_header"/>
android:title="@string/preference_racing_procedure_rrs26_startmode_flags_header" />
</PreferenceCategory>
@@ -64,25 +70,25 @@
android:defaultValue="@string/preference_racing_procedure_classflag_default"
android:key="@string/preference_racing_procedure_gatestart_classflag_key"
android:summary="@string/empty"
android:title="@string/preference_racing_procedure_classflag_header"/>
android:title="@string/preference_racing_procedure_classflag_header" />
<CheckBoxPreference
android:defaultValue="@bool/preference_racing_procedure_gatestart_hasxray_default"
android:key="@string/preference_racing_procedure_gatestart_hasxray_key"
android:summary="@string/preference_racing_procedure_hasxray_description"
android:title="@string/preference_racing_procedure_hasxray_header"/>
android:title="@string/preference_racing_procedure_hasxray_header" />
<CheckBoxPreference
android:defaultValue="@bool/preference_racing_procedure_gatestart_haspathfinder_default"
android:key="@string/preference_racing_procedure_gatestart_haspathfinder_key"
android:summary="@string/preference_racing_procedure_gatestart_haspathfinder_description"
android:title="@string/preference_racing_procedure_gatestart_haspathfinder_header"/>
android:title="@string/preference_racing_procedure_gatestart_haspathfinder_header" />
<CheckBoxPreference
android:defaultValue="@bool/preference_racing_procedure_gatestart_hasadditionalgolfdowntime_default"
android:key="@string/preference_racing_procedure_gatestart_hasadditionalgolfdowntime_key"
android:summary="@string/preference_racing_procedure_gatestart_hasadditionalgolfdowntime_description"
android:title="@string/preference_racing_procedure_gatestart_hasadditionalgolfdowntime_header"/>
android:title="@string/preference_racing_procedure_gatestart_hasadditionalgolfdowntime_header" />
</PreferenceCategory>
@@ -92,13 +98,13 @@
android:defaultValue="@string/preference_racing_procedure_classflag_default"
android:key="@string/preference_racing_procedure_ess_classflag_key"
android:summary="@string/empty"
android:title="@string/preference_racing_procedure_classflag_header"/>
android:title="@string/preference_racing_procedure_classflag_header" />
<CheckBoxPreference
android:defaultValue="@bool/preference_racing_procedure_ess_hasxray_default"
android:key="@string/preference_racing_procedure_ess_hasxray_key"
android:summary="@string/preference_racing_procedure_hasxray_description"
android:title="@string/preference_racing_procedure_hasxray_header"/>
android:title="@string/preference_racing_procedure_hasxray_header" />
</PreferenceCategory>
@@ -108,13 +114,13 @@
android:defaultValue="@string/preference_racing_procedure_classflag_default"
android:key="@string/preference_racing_procedure_basic_classflag_key"
android:summary="@string/empty"
android:title="@string/preference_racing_procedure_classflag_header"/>
android:title="@string/preference_racing_procedure_classflag_header" />
<CheckBoxPreference
android:defaultValue="@bool/preference_racing_procedure_basic_hasxray_default"
android:key="@string/preference_racing_procedure_basic_hasxray_key"
android:summary="@string/preference_racing_procedure_hasxray_description"
android:title="@string/preference_racing_procedure_hasxray_header"/>
android:title="@string/preference_racing_procedure_hasxray_header" />
</PreferenceCategory>
@@ -124,13 +130,13 @@
android:defaultValue="@string/preference_racing_procedure_classflag_default"
android:key="@string/preference_racing_procedure_league_classflag_key"
android:summary="@string/empty"
android:title="@string/preference_racing_procedure_classflag_header"/>
android:title="@string/preference_racing_procedure_classflag_header" />
<CheckBoxPreference
android:defaultValue="@bool/preference_racing_procedure_league_hasxray_default"
android:key="@string/preference_racing_procedure_league_hasxray_key"
android:summary="@string/preference_racing_procedure_hasxray_description"
android:title="@string/preference_racing_procedure_hasxray_header"/>
android:title="@string/preference_racing_procedure_hasxray_header" />
</PreferenceCategory>
</PreferenceScreen>