Signed-off-by: Keith Packard <keithp@keithp.com>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:paddingLeft="69dp"
- android:paddingTop="5dp" >
+ android:paddingLeft="69dp">
<TextView
android:id="@+id/pad_lat_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<TextView
android:id="@+id/pad_lat_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android.paddingRight="4dp"
+ android:width="100sp"
+ android.paddingRight="10sp"
android:layout_toRightOf="@id/gps_ready_greenled"
android:text="@string/pad_lat_label" />
android:layout_toRightOf="@id/gps_ready_greenled"
android:text="@string/pad_lat_label" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:paddingLeft="69dp"
- android:paddingTop="5dp" >
+ android:paddingLeft="69dp">
<TextView
android:id="@+id/pad_lon_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<TextView
android:id="@+id/pad_lon_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android.paddingRight="4dp"
+ android:width="100sp"
+ android.paddingRight="10sp"
android:layout_toRightOf="@id/gps_ready_greenled"
android:text="@string/pad_lon_label" />
android:layout_toRightOf="@id/gps_ready_greenled"
android:text="@string/pad_lon_label" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:paddingLeft="69dp"
- android:paddingTop="5dp" >
+ android:paddingLeft="69dp">
<TextView
android:id="@+id/pad_alt_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<TextView
android:id="@+id/pad_alt_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android.paddingRight="4dp"
+ android:width="100sp"
+ android.paddingRight="10sp"
android:layout_toRightOf="@id/gps_ready_greenled"
android:text="@string/pad_alt_label" />
android:layout_toRightOf="@id/gps_ready_greenled"
android:text="@string/pad_alt_label" />
}
}
public void update_ui(AltosState state, AltosGreatCircle from_receiver, Location receiver) {
}
}
public void update_ui(AltosState state, AltosGreatCircle from_receiver, Location receiver) {
+ if (from_receiver != null) {
+ mBearingView.setText(String.format("%3.0f°", from_receiver.bearing));
+ mDistanceView.setText(String.format("%6.0f m", from_receiver.distance));
+ }
+
- if (state.from_pad != null) {
- mDistanceView.setText(String.format("%6.0f m", state.from_pad.distance));
- mBearingView.setText(String.format("%3.0f°", state.from_pad.bearing));
- }
if (mapLoaded) {
if (state.gps != null) {
mRocketMarker.setPosition(new LatLng(state.gps.lat, state.gps.lon));
if (mapLoaded) {
if (state.gps != null) {
mRocketMarker.setPosition(new LatLng(state.gps.lat, state.gps.lon));