forked from upstream-mirrors/OpenTracks
Fix sensor state activity to support right-to-left.
- Need to generate the value as one string rather than always putting the unit on the right.
This commit is contained in:
@@ -49,6 +49,5 @@ limitations under the License.
|
||||
<string name="track_action_end">com.google.android.apps.mytracks.END_CURRENT_TRACK</string>
|
||||
<string name="track_action_save">android.intent.action.SAVE</string>
|
||||
<string name="track_action_start">com.google.android.apps.mytracks.START_NEW_TRACK</string>
|
||||
<string name="unit_percent">%</string>
|
||||
<string name="value_unknown">-</string>
|
||||
</resources>
|
||||
|
||||
@@ -1239,6 +1239,14 @@ limitations under the License.
|
||||
Screenshot: sensor_state_none.png">
|
||||
Battery level
|
||||
</string>
|
||||
<string name="sensor_state_battery_value"
|
||||
translation_description="In the 'Sensor state' page, the value for the 'Battery level'. E.g,
|
||||
'Battery level: 50 %'.
|
||||
|
||||
%1$d: a number. E.g., '50'.
|
||||
%%: escape sequence for the '%' character.">
|
||||
%1$d %%
|
||||
</string>
|
||||
<string name="sensor_state_cadence"
|
||||
translation_description="In the 'Sensor state' page, the label for the cadence on the bike
|
||||
sensor. Cadence is the number of revolutions of the crank per minute. E.g.,
|
||||
@@ -1247,6 +1255,13 @@ limitations under the License.
|
||||
Screenshot: sensor_state_none.png">
|
||||
Cadence
|
||||
</string>
|
||||
<string name="sensor_state_cadence_value"
|
||||
translation_description="In the 'Sensor state' page, the value for the 'Cadence'. Cadence is the
|
||||
number of revolutions of the crank per minute. E.g., 'Cadence: 80 rpm'.
|
||||
|
||||
%1$d: a number. E.g., '80'.">
|
||||
%1$d rpm
|
||||
</string>
|
||||
<string name="sensor_state_connected"
|
||||
translation_description="In the 'Sensor state' page, the 'Sensor state' value when the sensor
|
||||
has connected.
|
||||
@@ -1275,6 +1290,13 @@ limitations under the License.
|
||||
Screenshot: sensor_state_none.png">
|
||||
Heart rate
|
||||
</string>
|
||||
<string name="sensor_state_heart_rate_value"
|
||||
translation_description="In the 'Sensor state' page, the value for the 'Heart rate'. E.g.,
|
||||
'Hear rate: 100 bpm'.
|
||||
|
||||
%1$d: a number. E.g., '100'.">
|
||||
%1$d bpm
|
||||
</string>
|
||||
<string name="sensor_state_last_sensor_time"
|
||||
translation_description="In the 'Sensor state' page, the label for the last time the sensor has
|
||||
sent a data. E.g., 'Last sensor time: 10:05 am'.
|
||||
@@ -1289,6 +1311,13 @@ limitations under the License.
|
||||
Screenshot: sensor_state_none.png">
|
||||
Power
|
||||
</string>
|
||||
<string name="sensor_state_power_value"
|
||||
translation_description="In the 'Sensor state' page, the value for the 'Power'. Power is the
|
||||
power output of the rider. E.g., 'Power: 50 W'.
|
||||
|
||||
%1$d: a number. E.g., '50'.">
|
||||
%1$d W
|
||||
</string>
|
||||
<string name="sensor_state_sending"
|
||||
translation_description="In the 'Sensor state' page, the 'Sensor state' value when the sensor is
|
||||
sending data.
|
||||
@@ -2320,11 +2349,6 @@ limitations under the License.
|
||||
</string>
|
||||
|
||||
<!-- Unit -->
|
||||
<string name="unit_beat_per_minute"
|
||||
translation_description="Abbreviation for beats per minute, unit for heart rate. E.g.,
|
||||
'Heart rate: 80 bpm'.">
|
||||
bpm
|
||||
</string>
|
||||
<string name="unit_feet"
|
||||
translation_description="Abbreviation for feet. E.g., '2 ft'.">
|
||||
ft
|
||||
@@ -2365,15 +2389,6 @@ limitations under the License.
|
||||
translation_description="Abbreviation for minutes per mile. E.g, '5 min/mi'.">
|
||||
min/mi
|
||||
</string>
|
||||
<string name="unit_revolution_per_minute"
|
||||
translation_description="Abbreviation for revolutions per minute, unit for cadence. E.g.,
|
||||
'Cadence: 80 rpm'.">
|
||||
rpm
|
||||
</string>
|
||||
<string name="unit_watt"
|
||||
translation_description="Abbreviation for watts, unit for power. E.g., 'Power: 80 W'.">
|
||||
W
|
||||
</string>
|
||||
|
||||
<!-- Value -->
|
||||
<string name="value_adapt_accuracy"
|
||||
|
||||
@@ -71,6 +71,24 @@ limitations under the License.
|
||||
<item name="android:visibility">gone</item>
|
||||
</style>
|
||||
|
||||
<style name="SensorStateHeader">
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_width">fill_parent</item>
|
||||
<item name="android:paddingLeft">4dp</item>
|
||||
<item name="android:paddingRight">4dp</item>
|
||||
</style>
|
||||
|
||||
<style name="SensorStateValue">
|
||||
<item name="android:background">@color/stat_label_background</item>
|
||||
<item name="android:gravity">right</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_width">fill_parent</item>
|
||||
<item name="android:paddingLeft">4dp</item>
|
||||
<item name="android:paddingRight">4dp</item>
|
||||
<item name="android:textColor">@color/stat_label_text</item>
|
||||
<item name="android:textSize">40sp</item>
|
||||
</style>
|
||||
|
||||
<!-- The style for a view which divides the numerator and denominator of the units on the statistics activity. -->
|
||||
<style name="StatsDivider" parent="@android:Widget.TextView">
|
||||
<item name="android:background">@color/black</item>
|
||||
|
||||
Reference in New Issue
Block a user