From c604c1229789dbf7ef55d594886724fca3a368e8 Mon Sep 17 00:00:00 2001 From: Jimmy Shih Date: Thu, 15 Dec 2011 18:00:03 -0800 Subject: [PATCH] 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. --- MyTracks/res/layout/sensor_state.xml | 198 ++++++------------ MyTracks/res/values/do_not_translate.xml | 1 - MyTracks/res/values/strings.xml | 43 ++-- MyTracks/res/values/styles.xml | 18 ++ .../apps/mytracks/SensorStateActivity.java | 139 +++++++----- 5 files changed, 197 insertions(+), 202 deletions(-) diff --git a/MyTracks/res/layout/sensor_state.xml b/MyTracks/res/layout/sensor_state.xml index bf995f4b6..ae0e1ed89 100644 --- a/MyTracks/res/layout/sensor_state.xml +++ b/MyTracks/res/layout/sensor_state.xml @@ -14,139 +14,79 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> - - + android:layout_height="fill_parent" + android:layout_width="fill_parent" + android:orientation="vertical"> - - + android:layout_width="fill_parent" + android:orientation="vertical"> - - - - - - - - - - - - - - - - - - - - - - - - - - android:layout_column="5" - android:text="@string/watts" /> - - - - - - - - - - android:layout_column="2" - android:text="@string/revolutions_per_minute" /> - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/MyTracks/res/values/do_not_translate.xml b/MyTracks/res/values/do_not_translate.xml index 5e6015191..e4b8895a6 100644 --- a/MyTracks/res/values/do_not_translate.xml +++ b/MyTracks/res/values/do_not_translate.xml @@ -49,6 +49,5 @@ limitations under the License. com.google.android.apps.mytracks.END_CURRENT_TRACK android.intent.action.SAVE com.google.android.apps.mytracks.START_NEW_TRACK - % - diff --git a/MyTracks/res/values/strings.xml b/MyTracks/res/values/strings.xml index c5bfffdae..f8631350d 100644 --- a/MyTracks/res/values/strings.xml +++ b/MyTracks/res/values/strings.xml @@ -1239,6 +1239,14 @@ limitations under the License. Screenshot: sensor_state_none.png"> Battery level + + %1$d %% + Cadence + + %1$d rpm + Heart rate + + %1$d bpm + Power + + %1$d W + - bpm - ft @@ -2365,15 +2389,6 @@ limitations under the License. translation_description="Abbreviation for minutes per mile. E.g, '5 min/mi'."> min/mi - - rpm - - - W - gone + + + +