forked from upstream-mirrors/OpenTracks
Removing track_color_mode_none.
The default value for track_color_mode_options is @string/none, not @string/track_color_mode_none. See preferences.xml
This commit is contained in:
@@ -522,7 +522,6 @@ limitations under the License.
|
|||||||
<string name="zephyr_bt_sensor_option">Bluetooth Zephyr</string>
|
<string name="zephyr_bt_sensor_option">Bluetooth Zephyr</string>
|
||||||
|
|
||||||
<!-- Track Color Modes -->
|
<!-- Track Color Modes -->
|
||||||
<string name="track_color_mode_none">Ninguno</string>
|
|
||||||
<string name="track_color_mode_fixed">Fijo (BETA)</string>
|
<string name="track_color_mode_fixed">Fijo (BETA)</string>
|
||||||
<string name="track_color_mode_dynamic">Dinámico (BETA)</string>
|
<string name="track_color_mode_dynamic">Dinámico (BETA)</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ limitations under the License.
|
|||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="track_color_mode_options">
|
<string-array name="track_color_mode_options">
|
||||||
<item>@string/track_color_mode_none</item>
|
<item>@string/none</item>
|
||||||
<item>@string/track_color_mode_fixed</item>
|
<item>@string/track_color_mode_fixed</item>
|
||||||
<item>@string/track_color_mode_dynamic</item>
|
<item>@string/track_color_mode_dynamic</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|||||||
@@ -584,7 +584,6 @@ limitations under the License.
|
|||||||
<string name="zephyr_bt_sensor_option">Zephyr Bluetooth</string>
|
<string name="zephyr_bt_sensor_option">Zephyr Bluetooth</string>
|
||||||
|
|
||||||
<!-- Track Color Modes -->
|
<!-- Track Color Modes -->
|
||||||
<string name="track_color_mode_none">None</string>
|
|
||||||
<string name="track_color_mode_fixed">Fixed (BETA)</string>
|
<string name="track_color_mode_fixed">Fixed (BETA)</string>
|
||||||
<string name="track_color_mode_dynamic">Dynamic (BETA)</string>
|
<string name="track_color_mode_dynamic">Dynamic (BETA)</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public class TrackPathPainterFactory {
|
|||||||
String colorMode = prefs.getString(context.getString(R.string.track_color_mode_key), null);
|
String colorMode = prefs.getString(context.getString(R.string.track_color_mode_key), null);
|
||||||
Log.i(TAG, "Creating track path painter of type: " + colorMode);
|
Log.i(TAG, "Creating track path painter of type: " + colorMode);
|
||||||
|
|
||||||
if (colorMode == null || colorMode.equals(context.getString(R.string.track_color_mode_none))) {
|
if (colorMode == null || colorMode.equals(context.getString(R.string.none))) {
|
||||||
return new SingleColorTrackPathPainter(context);
|
return new SingleColorTrackPathPainter(context);
|
||||||
} else if (colorMode.equals(context.getString(R.string.track_color_mode_fixed))) {
|
} else if (colorMode.equals(context.getString(R.string.track_color_mode_fixed))) {
|
||||||
return new DynamicSpeedTrackPathPainter(context,
|
return new DynamicSpeedTrackPathPainter(context,
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@ public class TrackPathPainterFactoryTest extends TrackPathPainterTestCase {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
testTrackPathPainterFactorySpecific(context, prefs, R.string.track_color_mode_none,
|
testTrackPathPainterFactorySpecific(context, prefs, R.string.none,
|
||||||
SingleColorTrackPathPainter.class);
|
SingleColorTrackPathPainter.class);
|
||||||
testTrackPathPainterFactorySpecific(context, prefs, R.string.track_color_mode_fixed,
|
testTrackPathPainterFactorySpecific(context, prefs, R.string.track_color_mode_fixed,
|
||||||
DynamicSpeedTrackPathPainter.class);
|
DynamicSpeedTrackPathPainter.class);
|
||||||
|
|||||||
Reference in New Issue
Block a user