mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-28 23:07:11 +00:00
TRACKING APP: fixes for preferences, course over ground display, strings updated
This commit is contained in:
1 parent
d8939602ce
commit
2740f699e8
9 files changed
+41
-17
No files matched your search
@@ -12,7 +12,7 @@
|
||||
android:id="@+id/speed_header_text_view"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sog"
|
||||
android:text="@string/speed_over_ground"
|
||||
android:textColor="@android:color/darker_gray"
|
||||
android:textSize="14sp"
|
||||
android:paddingLeft="10dp"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
android:id="@+id/speed_header_text_view"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sog"
|
||||
android:text="@string/speed_over_ground"
|
||||
android:textColor="@android:color/darker_gray"
|
||||
android:textSize="14sp"
|
||||
android:paddingLeft="10dp"
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
<string name="preference_energy_saving_is_disabled">Aus</string>
|
||||
<string name="prefrence_energy_saving_summary_is_enabled">GPS Updates werden alle 30 Sekunden verschickt.</string>
|
||||
<string name="prefrence_energy_saving_summary_is_disabled">GPS Updates werden alle 3 Sekunden verschickt.</string>
|
||||
<string name="preference_heading_with_declination_subtracted_key_is_enabled">Ein</string>
|
||||
<string name="preference_heading_with_declination_subtracted_key_is_disabled">Aus</string>
|
||||
<string name="preference_heading_with_declination_subtracted_key_summary_is_enabled">Anzeige: Magnetkompasskurs ohne Ablenkung</string>
|
||||
<string name="preference_heading_with_declination_subtracted_key_summary_is_disabled">Anzeige: Magnetkompasskurs mit Ablenkung</string>
|
||||
<string name="preference_heading_with_declination_subtracted_is_enabled">Ein</string>
|
||||
<string name="preference_heading_with_declination_subtracted_is_disabled">Aus</string>
|
||||
<string name="preference_heading_with_declination_subtracted_summary_is_enabled">Anzeige: Ablenkung abziehen</string>
|
||||
<string name="preference_heading_with_declination_subtracted_summary_is_disabled">Anzeige: Course over Ground</string>
|
||||
<string name="preference_heading_with_declination_subtracted_enabled">Richtung</string>
|
||||
|
||||
|
||||
|
||||
@@ -108,6 +108,7 @@
|
||||
<string name="hud_speed_over_ground_prefix">SPD: </string>
|
||||
<string name="heading">Kurs</string>
|
||||
<string name="course_over_ground">Course over Ground</string>
|
||||
<string name="speed_over_ground">Speed over Ground</string>
|
||||
<string name="sog">SOG</string>
|
||||
<string name="none">Keine</string>
|
||||
<string name="show_leaderboard">Leaderboard</string>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<string name="preference_server_url_default">http://95.85.58.11:8000</string>
|
||||
|
||||
<string name="preference_energy_saving_enabled_key">preferenceEnergySavingEnabled</string>
|
||||
<string name="preference_heading_with_declination_subtracted">preferenceHeadingWithDeclinationSubtracted</string>
|
||||
<string name="preference_heading_with_declination_subtracted_key">preferenceHeadingWithDeclinationSubtracted</string>
|
||||
|
||||
<string name="settings_category_energy_saving">Battery Saving</string>
|
||||
<string name="energy_saving_enabled">Save Energy</string>
|
||||
@@ -29,9 +29,9 @@
|
||||
<string name="preference_tracker_is_tracking_checkin_digest">trackerIsTrackingCheckinDigest</string>
|
||||
<string name="preference_last_scanned_qr_code">lastScannedQRCode</string>
|
||||
|
||||
<string name="preference_heading_with_declination_subtracted_key_is_enabled">On</string>
|
||||
<string name="preference_heading_with_declination_subtracted_key_is_disabled">Off</string>
|
||||
<string name="preference_heading_with_declination_subtracted_key_summary_is_enabled">Display: Course without declination</string>
|
||||
<string name="preference_heading_with_declination_subtracted_key_summary_is_disabled">Display: Course with declination</string>
|
||||
<string name="preference_heading_with_declination_subtracted_is_enabled">On</string>
|
||||
<string name="preference_heading_with_declination_subtracted_is_disabled">Off</string>
|
||||
<string name="preference_heading_with_declination_subtracted_summary_is_enabled">Display: Subtract declination</string>
|
||||
<string name="preference_heading_with_declination_subtracted_summary_is_disabled">Display: Course over ground</string>
|
||||
<string name="preference_heading_with_declination_subtracted_enabled">Heading</string>
|
||||
</resources>
|
||||
@@ -67,6 +67,7 @@
|
||||
<string name="regatta_in_progress">The regatta is in progress.</string>
|
||||
<string name="heading">Heading</string>
|
||||
<string name="course_over_ground">Course over Ground</string>
|
||||
<string name="speed_over_ground">Speed over Ground</string>
|
||||
<string name="sog">Speed over Ground</string>
|
||||
<string name="none">None</string>
|
||||
<string name="show_leaderboard">Leader board</string>
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/preference_heading_with_declination_subtracted"
|
||||
android:switchTextOn="@string/preference_heading_with_declination_subtracted_key_is_enabled"
|
||||
android:switchTextOff="@string/preference_heading_with_declination_subtracted_key_is_disabled"
|
||||
android:summaryOn="@string/preference_heading_with_declination_subtracted_key_summary_is_enabled"
|
||||
android:summaryOff="@string/preference_heading_with_declination_subtracted_key_summary_is_disabled"
|
||||
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" />
|
||||
</PreferenceCategory>
|
||||
|
||||
|
||||
+14
@@ -3,7 +3,9 @@ package com.sap.sailing.android.tracking.app.ui.fragments.preference;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.preference.Preference;
|
||||
import android.preference.SwitchPreference;
|
||||
|
||||
import com.sap.sailing.android.shared.logging.ExLog;
|
||||
import com.sap.sailing.android.shared.ui.fragments.preference.BasePreferenceFragment;
|
||||
import com.sap.sailing.android.tracking.app.R;
|
||||
import com.sap.sailing.android.tracking.app.utils.AppPreferences;
|
||||
@@ -34,4 +36,16 @@ public class GeneralPreferenceFragment extends BasePreferenceFragment {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
|
||||
SwitchPreference prefEnergy = (SwitchPreference)findPreference(R.string.preference_energy_saving_enabled_key);
|
||||
SwitchPreference prefDeclination = (SwitchPreference)findPreference(R.string.preference_heading_with_declination_subtracted_key);
|
||||
|
||||
AppPreferences prefs = new AppPreferences(getActivity());
|
||||
|
||||
prefs.setEnergySavingEnabledByUser(prefEnergy.isChecked());
|
||||
prefs.setDisplayHeadingWithSubtractedDeclination(prefDeclination.isChecked());
|
||||
}
|
||||
}
|
||||
+9
-1
@@ -92,12 +92,20 @@ public class AppPreferences {
|
||||
preferences.edit().putString(context.getString(R.string.preference_competitor_key), id).commit();
|
||||
}
|
||||
|
||||
public void setEnergySavingEnabledByUser(boolean newValue) {
|
||||
preferences.edit().putBoolean(context.getString(R.string.preference_energy_saving_enabled_key), newValue).commit();
|
||||
}
|
||||
|
||||
public boolean getEnergySavingEnabledByUser() {
|
||||
return preferences.getBoolean(context.getString(R.string.preference_energy_saving_enabled_key), false);
|
||||
}
|
||||
|
||||
public void setDisplayHeadingWithSubtractedDeclination(boolean newValue) {
|
||||
preferences.edit().putBoolean(context.getString(R.string.preference_heading_with_declination_subtracted_key), newValue).commit();
|
||||
}
|
||||
|
||||
public boolean getDisplayHeadingWithSubtractedDeclination() {
|
||||
return preferences.getBoolean(context.getString(R.string.preference_heading_with_declination_subtracted_enabled), true);
|
||||
return preferences.getBoolean(context.getString(R.string.preference_heading_with_declination_subtracted_key), true);
|
||||
}
|
||||
|
||||
public void setTrackingTimerStarted(long milliseconds)
|
||||
|
||||
Reference in new issue
Block a user