diff options
| author | Keith Packard <keithp@keithp.com> | 2015-06-23 21:35:43 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2015-06-23 21:42:35 -0700 |
| commit | 56146cd379e1319b7adcf8e22cdda55f771e11be (patch) | |
| tree | 6417550c523318e3792167a947367bfd57a606c6 /altosdroid/res | |
| parent | 60b8bea12edb954e6140a92c8412364c9581e3c2 (diff) | |
altosdroid: Show direction to target in recover tab
This takes the bearing to target and current direction of motion (from
the Android API) and computes a turn amount and displays that so you
don't have to know which way is north when walking towards the rocket.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosdroid/res')
| -rw-r--r-- | altosdroid/res/layout/tab_recover.xml | 22 | ||||
| -rw-r--r-- | altosdroid/res/values/strings.xml | 1 |
2 files changed, 22 insertions, 1 deletions
diff --git a/altosdroid/res/layout/tab_recover.xml b/altosdroid/res/layout/tab_recover.xml index f27baa9e..c2806629 100644 --- a/altosdroid/res/layout/tab_recover.xml +++ b/altosdroid/res/layout/tab_recover.xml @@ -42,6 +42,26 @@ <RelativeLayout android:layout_width="wrap_content" + android:layout_height="wrap_content" > + + <TextView + android:id="@+id/direction_label" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/direction_label" /> + + <TextView + android:id="@+id/direction_value" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:layout_below="@+id/direction_label" + android:text="" + android:textAppearance="?android:attr/textAppearanceSmall" /> + </RelativeLayout> + + <RelativeLayout + android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingTop="5dp" > @@ -208,4 +228,4 @@ android:textAppearance="?android:attr/textAppearanceSmall" /> </RelativeLayout> -</LinearLayout>
\ No newline at end of file +</LinearLayout> diff --git a/altosdroid/res/values/strings.xml b/altosdroid/res/values/strings.xml index 5a9d9629..8c299a35 100644 --- a/altosdroid/res/values/strings.xml +++ b/altosdroid/res/values/strings.xml @@ -69,6 +69,7 @@ <string name="speed_label">Speed</string> <string name="accel_label">Acceleration</string> <string name="bearing_label">Bearing</string> + <string name="direction_label">Direction</string> <string name="elevation_label">Elevation</string> <string name="range_label">Range</string> <string name="distance_label">Distance</string> |
