Add a setup menu item to change the size of the text everywhere.
This involved re-doing the layout for most of the tabs.
Signed-off-by: Keith Packard <keithp@keithp.com>
<application android:label="@string/app_name"
android:icon="@drawable/app_icon"
android:allowBackup="true"
- android:theme="@style/CustomTheme">
+ android:theme="@style/Medium">
<activity android:name="org.altusmetrum.AltosDroid.AltosDroid"
android:label="@string/app_name"
public static final int SETUP_UNITS = 2;
public static final int SETUP_MAP_SOURCE = 4;
public static final int SETUP_MAP_TYPE = 8;
+ public static final int SETUP_FONT_SIZE = 16;
public static FragmentManager fm;
for (AltosDroidTab mTab : mTabs)
mTab.update_ui(telem_state, state, from_receiver, location, mTab == mTabsAdapter.currentItem());
- AltosDebug.debug("quiet %b\n", quiet);
if (mAltosVoice != null && mTabsAdapter.currentItem() != null)
mAltosVoice.tell(telem_state, state, from_receiver, location, (AltosDroidTab) mTabsAdapter.currentItem(), quiet);
}
int deg = (int) Math.floor(p);
double min = (p - Math.floor(p)) * 60.0;
- return String.format("%d°%9.4f\" %s", deg, min, h);
+ return String.format("%d° %7.4f\" %s", deg, min, h);
}
static String number(String format, double value) {
return tab_view;
}
+ static public int[] themes = {
+ R.style.Small,
+ R.style.Medium,
+ R.style.Large,
+ R.style.Extra
+ };
+
@Override
public void onCreate(Bundle savedInstanceState) {
+ // Initialise preferences
+ AltosDroidPreferences.init(this);
+ setTheme(themes[AltosDroidPreferences.font_size()]);
super.onCreate(savedInstanceState);
AltosDebug.init(this);
AltosDebug.debug("+++ ON CREATE +++");
- // Initialise preferences
- AltosDroidPreferences.init(this);
fm = getSupportFragmentManager();
update_ui(telemetry_state, state, true);
}
- static final int MY_PERMISSION_REQUEST_FINE_POSITION = 1001;
+ static final int MY_PERMISSION_REQUEST = 1001;
public boolean have_location_permission = false;
- public boolean asked_location_permission = false;
+ public boolean have_storage_permission = false;
+ public boolean asked_permission = false;
AltosMapOnline map_online;
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions,
int[] grantResults) {
- switch (requestCode) {
- case MY_PERMISSION_REQUEST_FINE_POSITION:
- if (grantResults.length > 0 &&
- grantResults[0] == PackageManager.PERMISSION_GRANTED) {
- have_location_permission = true;
- enable_location_updates();
- if (map_online != null)
- map_online.position_permission();
+ if (requestCode == MY_PERMISSION_REQUEST) {
+ for (int i = 0; i < grantResults.length; i++) {
+ if (grantResults[i] == PackageManager.PERMISSION_GRANTED) {
+ if (permissions[i].equals(Manifest.permission.ACCESS_FINE_LOCATION)) {
+ have_location_permission = true;
+ enable_location_updates();
+ if (map_online != null)
+ map_online.position_permission();
+ }
+ if (permissions[i].equals(Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
+ have_storage_permission = true;
+ }
+ }
}
- break;
}
}
super.onResume();
AltosDebug.debug("+ ON RESUME +");
- if (!asked_location_permission) {
- asked_location_permission = true;
+ if (!asked_permission) {
+ asked_permission = true;
if (ActivityCompat.checkSelfPermission(this,
Manifest.permission.ACCESS_FINE_LOCATION)
== PackageManager.PERMISSION_GRANTED)
{
have_location_permission = true;
}
- else
+ if (ActivityCompat.checkSelfPermission(this,
+ Manifest.permission.WRITE_EXTERNAL_STORAGE)
+ == PackageManager.PERMISSION_GRANTED)
{
- ActivityCompat.requestPermissions(this,
- new String[]{Manifest.permission.ACCESS_FINE_LOCATION},
- MY_PERMISSION_REQUEST_FINE_POSITION);
+ have_storage_permission = true;
+ }
+ int count = (have_location_permission ? 0 : 1) + (have_storage_permission ? 0 : 1);
+ if (count > 0)
+ {
+ String[] permissions = new String[count];
+ int i = 0;
+ if (!have_location_permission)
+ permissions[i++] = Manifest.permission.ACCESS_FINE_LOCATION;
+ if (!have_location_permission)
+ permissions[i++] = Manifest.permission.WRITE_EXTERNAL_STORAGE;
+ ActivityCompat.requestPermissions(this, permissions, MY_PERMISSION_REQUEST);
}
}
if (have_location_permission)
}
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
- AltosDebug.debug("onActivityResult " + resultCode);
+ AltosDebug.debug("onActivityResult request %d result %d", requestCode, resultCode);
switch (requestCode) {
case REQUEST_CONNECT_DEVICE:
// When DeviceListActivity returns with a device to connect to
private void note_setup_changes(Intent data) {
int changes = data.getIntExtra(SetupActivity.EXTRA_SETUP_CHANGES, 0);
+ AltosDebug.debug("note_setup_changes changes %d\n", changes);
+
if ((changes & SETUP_BAUD) != 0) {
try {
mService.send(Message.obtain(null, TelemetryService.MSG_SETBAUD,
/* nothing to do here */
}
set_switch_time();
+ if ((changes & SETUP_FONT_SIZE) != 0) {
+ AltosDebug.debug(" ==== Recreate to switch font sizes ==== ");
+ finish();
+ startActivity(getIntent());
+ }
}
private void connectUsb(UsbDevice device) {
final static String activeDeviceAddressPreference = "ACTIVE-DEVICE-ADDRESS";
final static String activeDeviceNamePreference = "ACTIVE-DEVICE-NAME";
+ public static final int font_size_small = 0;
+ public static final int font_size_medium = 1;
+ public static final int font_size_large = 2;
+ public static final int font_size_extra = 3;
+
+ final static String fontSizePreference = "FONT-SIZE";
+
+ static int font_size = font_size_medium;
+
static DeviceAddress active_device_address;
/* Map source preference name */
AltosPreferences.init(new AltosDroidPreferencesBackend(context));
+ font_size = backend.getInt(fontSizePreference, font_size_medium);
+
String address = backend.getString(activeDeviceAddressPreference, null);
String name = backend.getString(activeDeviceNamePreference, null);
map_source_listeners.remove(l);
}
}
+
+ public static int font_size() {
+ synchronized (backend) {
+ return font_size;
+ }
+ }
+
+ public static void set_font_size(int new_font_size) {
+ synchronized (backend) {
+ if (font_size != new_font_size) {
+ font_size = new_font_size;
+ backend.putInt(fontSizePreference, font_size);
+ flush_preferences();
+ }
+ }
+ }
}
if (state == null)
return false;
- AltosDebug.debug("tell_pad lag %b ltm %d\n", last_apogee_good, last_tell_mode);
-
if (state.apogee_voltage != AltosLib.MISSING)
last_apogee_good = tell_gonogo("apogee",
state.apogee_voltage >= AltosLib.ao_igniter_good,
public class SetupActivity extends Activity {
private Spinner select_rate;
private Spinner set_units;
+ private Spinner font_size;
private Spinner map_type;
private Spinner map_source;
private Button manage_frequencies;
"2400",
};
+ static final String[] sizes = {
+ "Small",
+ "Medium",
+ "Large",
+ "Extra"
+ };
+
static final String[] map_types = {
"Hybrid",
"Satellite",
private int set_map_source;
private int set_map_type;
private boolean set_imperial_units;
-
- private int changes = 0;
-
- private void add_change(int change) {
- changes |= change;
- }
+ private int set_font_size;
private void done() {
+ int changes = 0;
Intent intent = new Intent();
- if ((changes & AltosDroid.SETUP_BAUD) != 0)
+
+ if (set_telemetry_rate != AltosPreferences.telemetry_rate(1)) {
+ changes |= AltosDroid.SETUP_BAUD;
AltosPreferences.set_telemetry_rate(1, set_telemetry_rate);
- if ((changes & AltosDroid.SETUP_UNITS) != 0)
+ }
+ if (set_imperial_units != AltosPreferences.imperial_units()) {
+ changes |= AltosDroid.SETUP_UNITS;
AltosPreferences.set_imperial_units(set_imperial_units);
- if ((changes & AltosDroid.SETUP_MAP_SOURCE) != 0)
+ }
+ if (set_map_source != AltosDroidPreferences.map_source()) {
+ changes |= AltosDroid.SETUP_MAP_SOURCE;
AltosDroidPreferences.set_map_source(set_map_source);
- if ((changes & AltosDroid.SETUP_MAP_TYPE) != 0)
+ }
+ if (set_map_type != AltosPreferences.map_type()) {
+ changes |= AltosDroid.SETUP_MAP_TYPE;
AltosPreferences.set_map_type(set_map_type);
+ }
+ if (set_font_size != AltosDroidPreferences.font_size()) {
+ changes |= AltosDroid.SETUP_FONT_SIZE;
+ AltosDroidPreferences.set_font_size(set_font_size);
+ }
intent.putExtra(EXTRA_SETUP_CHANGES, changes);
setResult(Activity.RESULT_OK, intent);
finish();
}
private void add_strings(Spinner spinner, String[] strings, int def) {
- ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item);
+ ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_dropdown_item);
for (int i = 0; i < strings.length; i++)
adapter.add(strings[i]);
}
private void setBaud(int baud) {
- try {
- service.send(Message.obtain(null, TelemetryService.MSG_SETBAUD, baud));
- set_telemetry_rate = baud;
- add_change(AltosDroid.SETUP_BAUD);
- } catch (RemoteException e) {
- }
+ set_telemetry_rate = baud;
}
private int string_to_rate(String baud) {
set_imperial_units = true;
break;
}
- add_change(AltosDroid.SETUP_UNITS);
+ }
+
+ private void set_font_size(int pos) {
+ set_font_size = pos;
}
private int default_map_type_pos() {
private void select_map_type(int pos) {
set_map_type = map_type_values[pos];
- add_change(AltosDroid.SETUP_MAP_TYPE);
}
private int default_map_source_pos() {
set_map_source = AltosDroidPreferences.MAP_SOURCE_OFFLINE;
break;
}
- add_change(AltosDroid.SETUP_MAP_SOURCE);
}
private void manage_frequencies(){
@Override
protected void onCreate(Bundle savedInstanceState) {
+ setTheme(AltosDroid.themes[AltosDroidPreferences.font_size()]);
super.onCreate(savedInstanceState);
AltosDebug.init(this);
add_strings(select_rate, rates, default_rate_pos());
select_rate.setOnItemSelectedListener(new OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
+ AltosDebug.debug("rate selected pos %d id %d", pos, id);
select_rate(pos);
}
public void onNothingSelected(AdapterView<?> parent) {
}
});
+ font_size = (Spinner) findViewById(R.id.font_size);
+ add_strings(font_size, sizes, AltosDroidPreferences.font_size());
+ font_size.setOnItemSelectedListener(new OnItemSelectedListener() {
+ public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
+ set_font_size(pos);
+ }
+ public void onNothingSelected(AdapterView<?> parent) {
+ }
+ });
+
map_type = (Spinner) findViewById(R.id.map_type);
add_strings(map_type, map_types, default_map_type_pos());
map_type.setOnItemSelectedListener(new OnItemSelectedListener() {
public void show(TelemetryState telem_state, AltosState state, AltosGreatCircle from_receiver, Location receiver) {
if (state != null) {
- set_value(speed_view, AltosConvert.speed, 6, state.speed());
- set_value(height_view, AltosConvert.height, 6, state.height());
- set_value(max_speed_view, AltosConvert.speed, 6, state.max_speed());
- set_value(max_height_view, AltosConvert.height, 6, state.max_height());
+ set_value(speed_view, AltosConvert.speed, 1, state.speed());
+ set_value(height_view, AltosConvert.height, 1, state.height());
+ set_value(max_speed_view, AltosConvert.speed, 1, state.max_speed());
+ set_value(max_height_view, AltosConvert.height, 1, state.max_height());
if (from_receiver != null) {
- elevation_view.setText(AltosDroid.number("%3.0f°", from_receiver.elevation));
- set_value(range_view, AltosConvert.distance, 6, from_receiver.range);
- bearing_view.setText(AltosDroid.number("%3.0f°", from_receiver.bearing));
+ elevation_view.setText(AltosDroid.number("%1.0f°", from_receiver.elevation));
+ set_value(range_view, AltosConvert.distance, 1, from_receiver.range);
+ bearing_view.setText(AltosDroid.number("%1.0f°", from_receiver.bearing));
compass_view.setText(from_receiver.bearing_words(AltosGreatCircle.BEARING_LONG));
- set_value(distance_view, AltosConvert.distance, 6, from_receiver.distance);
+ set_value(distance_view, AltosConvert.distance, 1, from_receiver.distance);
} else {
elevation_view.setText("<unknown>");
range_view.setText("<unknown>");
if (state.apogee_voltage == AltosLib.MISSING) {
apogee_view.setVisibility(View.GONE);
} else {
- apogee_voltage_view.setText(AltosDroid.number("%4.2f V", state.apogee_voltage));
+ apogee_voltage_view.setText(AltosDroid.number("%1.2f V", state.apogee_voltage));
apogee_lights.set(state.apogee_voltage > 3.2, state.apogee_voltage == AltosLib.MISSING);
apogee_view.setVisibility(View.VISIBLE);
}
if (state.main_voltage == AltosLib.MISSING) {
main_view.setVisibility(View.GONE);
} else {
- main_voltage_view.setText(AltosDroid.number("%4.2f V", state.main_voltage));
+ main_voltage_view.setText(AltosDroid.number("%1.2f V", state.main_voltage));
main_lights.set(state.main_voltage > 3.2, state.main_voltage == AltosLib.MISSING);
main_view.setVisibility(View.VISIBLE);
}
public void show(TelemetryState telem_state, AltosState state, AltosGreatCircle from_receiver, Location receiver) {
if (state != null) {
- battery_voltage_view.setText(AltosDroid.number(" %4.2f V", state.battery_voltage));
+ battery_voltage_view.setText(AltosDroid.number("%1.2f V", state.battery_voltage));
battery_lights.set(state.battery_voltage >= AltosLib.ao_battery_good, state.battery_voltage == AltosLib.MISSING);
if (state.apogee_voltage == AltosLib.MISSING) {
apogee_row.setVisibility(View.GONE);
} else {
- apogee_voltage_view.setText(AltosDroid.number(" %4.2f V", state.apogee_voltage));
+ apogee_voltage_view.setText(AltosDroid.number("%1.2f V", state.apogee_voltage));
apogee_row.setVisibility(View.VISIBLE);
}
apogee_lights.set(state.apogee_voltage >= AltosLib.ao_igniter_good, state.apogee_voltage == AltosLib.MISSING);
if (state.main_voltage == AltosLib.MISSING) {
main_row.setVisibility(View.GONE);
} else {
- main_voltage_view.setText(AltosDroid.number(" %4.2f V", state.main_voltage));
+ main_voltage_view.setText(AltosDroid.number("%1.2f V", state.main_voltage));
main_row.setVisibility(View.VISIBLE);
}
main_lights.set(state.main_voltage >= AltosLib.ao_igniter_good, state.main_voltage == AltosLib.MISSING);
if (voltage == AltosLib.MISSING) {
ignite_row[i].setVisibility(View.GONE);
} else {
- ignite_voltage_view[i].setText(AltosDroid.number(" %4.2f V", voltage));
+ ignite_voltage_view[i].setText(AltosDroid.number("%1.2f V", voltage));
ignite_row[i].setVisibility(View.VISIBLE);
}
ignite_lights[i].set(voltage >= AltosLib.ao_igniter_good, voltage == AltosLib.MISSING);
if (telem_state.receiver_battery == AltosLib.MISSING) {
receiver_row.setVisibility(View.GONE);
} else {
- receiver_voltage_view.setText(AltosDroid.number(" %4.2f V", telem_state.receiver_battery));
+ receiver_voltage_view.setText(AltosDroid.number("%1.2f V", telem_state.receiver_battery));
receiver_row.setVisibility(View.VISIBLE);
}
receiver_voltage_lights.set(telem_state.receiver_battery >= AltosLib.ao_battery_good, telem_state.receiver_battery == AltosLib.MISSING);
public void show(TelemetryState telem_state, AltosState state, AltosGreatCircle from_receiver, Location receiver) {
if (from_receiver != null) {
- mBearingView.setText(String.format("%3.0f°", from_receiver.bearing));
- set_value(mDistanceView, AltosConvert.distance, 6, from_receiver.distance);
+ mBearingView.setText(String.format("%1.0f°", from_receiver.bearing));
+ set_value(mDistanceView, AltosConvert.distance, 1, from_receiver.distance);
String direction = AltosDroid.direction(from_receiver, receiver);
if (direction == null)
mDirectionView.setText("");
}
if (state != null) {
- set_value(mMaxHeightView, AltosConvert.height, 6, state.max_height());
- set_value(mMaxAccelView, AltosConvert.accel, 6, state.max_acceleration());
- set_value(mMaxSpeedView, AltosConvert.speed, 6, state.max_speed());
+ set_value(mMaxHeightView, AltosConvert.height, 1, state.max_height());
+ set_value(mMaxAccelView, AltosConvert.accel, 1, state.max_acceleration());
+ set_value(mMaxSpeedView, AltosConvert.speed, 1, state.max_speed());
}
}
}
android:spinnerMode="dropdown"
/>
</TableRow>
+ <TableRow
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:padding="2dip"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content">
+ <TextView
+ android:id="@+id/font_size_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/font_size"
+ />
+ <Spinner android:id="@+id/font_size"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:prompt="@string/font_size"
+ android:spinnerMode="dropdown"
+ />
+ </TableRow>
<TableRow
android:layout_gravity="center"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical" >
- <LinearLayout
+ <TableLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:stretchColumns="2,3"
android:layout_weight="0"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" >
-
- <LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:baselineAligned="true"
- android:orientation="horizontal" >
-
- <RelativeLayout
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1" >
-
- <TextView
- android:id="@+id/speed_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/speed_label" />
-
- <TextView
- android:id="@+id/speed_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/speed_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- <RelativeLayout
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1" >
-
- <TextView
- android:id="@+id/height_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/height_label" />
-
- <TextView
- android:id="@+id/height_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/height_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- </LinearLayout>
-
- <LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:baselineAligned="true"
- android:orientation="horizontal" >
-
- <RelativeLayout
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1" >
-
- <TextView
- android:id="@+id/max_speed_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/max_speed_label" />
-
- <TextView
- android:id="@+id/max_speed_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/max_speed_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- <RelativeLayout
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1" >
-
- <TextView
- android:id="@+id/max_height_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/max_height_label" />
-
- <TextView
- android:id="@+id/max_height_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/max_height_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- </LinearLayout>
-
- <LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:baselineAligned="true"
- android:orientation="horizontal"
- android:paddingTop="5dp" >
-
- <RelativeLayout
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1" >
-
- <TextView
- android:id="@+id/elevation_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/elevation_label" />
-
- <TextView
- android:id="@+id/elevation_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/elevation_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- <RelativeLayout
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1" >
-
- <TextView
- android:id="@+id/range_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/range_label" />
-
- <TextView
- android:id="@+id/range_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/range_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- </LinearLayout>
-
- <LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:baselineAligned="true"
- android:orientation="horizontal"
- android:paddingTop="5dp" >
-
- <RelativeLayout
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1" >
-
- <TextView
- android:id="@+id/bearing_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/bearing_label" />
-
- <TextView
- android:id="@+id/bearing_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/bearing_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- <RelativeLayout
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1" >
-
- <TextView
- android:id="@+id/compass_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="" />
-
- <TextView
- android:id="@+id/compass_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/compass_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- </LinearLayout>
-
- <LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:baselineAligned="true"
- android:orientation="horizontal"
- android:paddingTop="5dp" >
-
- <RelativeLayout
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1" >
-
- <TextView
- android:id="@+id/distance_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/gnd_distance_label" />
-
- <TextView
- android:id="@+id/distance_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/distance_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- <TextView
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1" >
- </TextView>
-
- </LinearLayout>
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content">
- <RelativeLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingTop="5dp" >
-
- <TextView
- android:id="@+id/lat_label"
+ <TableRow
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:padding="2dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/latitude_label" />
-
- <TextView
- android:id="@+id/lat_value"
+ >
+
+ <TextView
+ android:id="@+id/speed_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_column="2"
+ android:text="@string/speed_label" />
+
+ <TextView
+ android:id="@+id/speed_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text=""
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+ </TableRow>
+
+ <TableRow
+ android:layout_weight="1"
+ android:padding="2dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/lat_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- <RelativeLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingTop="5dp" >
-
- <TextView
- android:id="@+id/lon_label"
+ >
+
+ <TextView
+ android:id="@+id/height_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_column="2"
+ android:text="@string/height_label" />
+
+ <TextView
+ android:id="@+id/height_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:text=""
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+ </TableRow>
+
+ <TableRow
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:padding="2dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/longitude_label" />
-
- <TextView
- android:id="@+id/lon_value"
+ >
+
+ <TextView
+ android:id="@+id/max_speed_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_column="2"
+ android:text="@string/max_speed_label" />
+
+ <TextView
+ android:id="@+id/max_speed_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="" />
+ </TableRow>
+
+ <TableRow
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:padding="2dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/lon_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- <RelativeLayout
- android:id="@+id/apogee_view"
- android:visibility="gone"
- android:layout_gravity="fill"
- android:layout_weight="1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingTop="5dp" >
-
- <ImageView
- android:id="@+id/apogee_redled"
+ >
+
+ <TextView
+ android:id="@+id/max_height_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_column="2"
+ android:text="@string/max_height_label" />
+
+ <TextView
+ android:id="@+id/max_height_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="" />
+ </TableRow>
+
+ <TableRow
+ android:layout_weight="1"
+ android:padding="2dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:contentDescription="@string/apogee_voltage_label"
- android:src="@drawable/grayled" />
-
- <ImageView
- android:id="@+id/apogee_greenled"
+ >
+
+ <TextView
+ android:id="@+id/elevation_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_column="2"
+ android:text="@string/elevation_label" />
+
+ <TextView
+ android:id="@+id/elevation_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="" />
+ </TableRow>
+
+ <TableRow
+ android:layout_weight="1"
+ android:padding="2dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_toRightOf="@id/apogee_redled"
- android:contentDescription="@string/apogee_voltage_label"
- android:paddingRight="5dp"
- android:src="@drawable/grayled" />
-
- <TextView
- android:id="@+id/apogee_voltage_label"
+ >
+
+ <TextView
+ android:id="@+id/range_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_column="2"
+ android:text="@string/range_label" />
+
+ <TextView
+ android:id="@+id/range_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:text=""
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+ </TableRow>
+
+ <TableRow
+ android:layout_weight="1"
+ android:padding="2dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_toRightOf="@id/apogee_greenled"
- android:text="@string/apogee_voltage_label" />
-
- <TextView
- android:id="@+id/apogee_voltage_value"
+ >
+
+ <TextView
+ android:id="@+id/bearing_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_column="2"
+ android:text="@string/bearing_label" />
+
+ <TextView
+ android:id="@+id/bearing_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:text=""
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+ </TableRow>
+
+ <TableRow
+ android:layout_weight="1"
+ android:padding="2dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- <RelativeLayout
- android:id="@+id/main_view"
- android:visibility="gone"
- android:layout_gravity="fill"
- android:layout_weight="1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingTop="5dp" >
-
- <ImageView
- android:id="@+id/main_redled"
+ >
+
+ <TextView
+ android:id="@+id/compass_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_column="3"
+ android:text=""
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+ </TableRow>
+
+ <TableRow
+ android:layout_weight="1"
+ android:padding="2dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:contentDescription="@string/main_voltage_label"
- android:src="@drawable/grayled" />
-
- <ImageView
- android:id="@+id/main_greenled"
+ >
+
+ <TextView
+ android:id="@+id/distance_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_column="2"
+ android:text="@string/gnd_distance_label" />
+
+ <TextView
+ android:id="@+id/distance_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:text=""
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+ </TableRow>
+
+
+ <TableRow
+ android:layout_weight="1"
+ android:padding="2dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_toRightOf="@id/main_redled"
- android:contentDescription="@string/main_voltage_label"
- android:paddingRight="5dp"
- android:src="@drawable/grayled" />
-
- <TextView
- android:id="@+id/main_voltage_label"
+ >
+
+ <TextView
+ android:id="@+id/lat_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_column="2"
+ android:text="@string/latitude_label" />
+
+ <TextView
+ android:id="@+id/lat_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:text=""
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+ </TableRow>
+
+ <TableRow
+ android:layout_weight="1"
+ android:padding="2dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_toRightOf="@id/main_greenled"
- android:text="@string/main_voltage_label" />
-
- <TextView
- android:id="@+id/main_voltage_value"
+ >
+
+ <TextView
+ android:id="@+id/lon_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_column="2"
+ android:text="@string/longitude_label" />
+
+ <TextView
+ android:id="@+id/lon_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:text=""
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+ </TableRow>
+
+ <TableRow
+ android:id="@+id/apogee_view"
+ android:visibility="gone"
+ android:layout_weight="1"
+ android:padding="2dip"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ >
+
+ <ImageView
+ android:id="@+id/apogee_redled"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:contentDescription="@string/apogee_voltage_label"
+ android:src="@drawable/grayled" />
+
+ <ImageView
+ android:id="@+id/apogee_greenled"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:contentDescription="@string/apogee_voltage_label"
+ android:src="@drawable/grayled" />
+
+ <TextView
+ android:id="@+id/apogee_voltage_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toRightOf="@id/apogee_greenled"
+ android:text="@string/apogee_voltage_label" />
+
+ <TextView
+ android:id="@+id/apogee_voltage_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:text=""
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+ </TableRow>
+
+ <TableRow
+ android:id="@+id/main_view"
+ android:visibility="gone"
+ android:layout_weight="1"
+ android:padding="2dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
- </LinearLayout>
+ >
+
+ <ImageView
+ android:id="@+id/main_redled"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
+ android:contentDescription="@string/main_voltage_label"
+ android:src="@drawable/grayled" />
+
+ <ImageView
+ android:id="@+id/main_greenled"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:contentDescription="@string/main_voltage_label"
+ android:paddingRight="5dp"
+ android:src="@drawable/grayled" />
+
+ <TextView
+ android:id="@+id/main_voltage_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toRightOf="@id/main_greenled"
+ android:text="@string/main_voltage_label" />
+
+ <TextView
+ android:id="@+id/main_voltage_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:text=""
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+ </TableRow>
+ </TableLayout>
</LinearLayout>
android:id="@+id/tabLabel"
android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:textSize="13dp"
android:textColor="#ffffff"
android:gravity="center_horizontal"
android:background="#808080"
android:layout_weight="1"/>
</FrameLayout>
- <LinearLayout
+ <TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
+ android:stretchColumns="1,3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:baselineAligned="true"
android:orientation="horizontal" >
- <RelativeLayout
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:paddingTop="5dp" >
-
- <TextView
- android:id="@+id/distance_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingRight="4dp"
- android:text="@string/distance_label" />
-
- <TextView
- android:id="@+id/distance_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toRightOf="@id/distance_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- <RelativeLayout
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:paddingTop="5dp" >
-
- <TextView
- android:id="@+id/bearing_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingRight="4dp"
- android:text="@string/bearing_label" />
-
- <TextView
- android:id="@+id/bearing_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toRightOf="@id/bearing_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- </LinearLayout>
-
- <LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:baselineAligned="true"
- android:orientation="horizontal" >
-
- <RelativeLayout
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:paddingTop="5dp" >
-
- <TextView
- android:id="@+id/target_lat_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingRight="4dp"
- android:text="@string/target_latitude_label" />
-
- <TextView
- android:id="@+id/target_lat_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toRightOf="@id/target_lat_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- <RelativeLayout
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:paddingTop="5dp" >
-
- <TextView
- android:id="@+id/target_lon_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingRight="4dp"
- android:text="@string/target_longitude_label" />
-
- <TextView
- android:id="@+id/target_lon_value"
+ <TableRow
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:padding="2dip"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toRightOf="@id/target_lon_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
- </LinearLayout>
-
- <LinearLayout
+ android:layout_height="wrap_content">
+ <TextView
+ android:id="@+id/distance_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingRight="4dp"
+ android:text="@string/distance_label" />
+
+ <TextView
+ android:id="@+id/distance_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="" />
+
+ <TextView
+ android:id="@+id/bearing_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingRight="4dp"
+ android:text="@string/bearing_label" />
+
+ <TextView
+ android:id="@+id/bearing_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="" />
+ </TableRow>
+ </TableLayout>
+
+ <TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:stretchColumns="1,2"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:baselineAligned="true"
android:orientation="horizontal" >
- <RelativeLayout
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:paddingTop="5dp" >
-
- <TextView
- android:id="@+id/receiver_lat_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingRight="4dp"
- android:text="@string/receiver_latitude_label" />
-
- <TextView
- android:id="@+id/receiver_lat_value"
+ <TableRow
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:padding="2dip"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toRightOf="@id/receiver_lat_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- <RelativeLayout
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:paddingTop="5dp" >
-
- <TextView
- android:id="@+id/receiver_lon_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingRight="4dp"
- android:text="@string/receiver_longitude_label" />
-
- <TextView
- android:id="@+id/receiver_lon_value"
+ android:layout_height="wrap_content">
+
+ <TextView
+ android:id="@+id/target_pos_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingRight="4dp"
+ android:text="@string/target_pos_label" />
+
+ <TextView
+ android:id="@+id/target_lat_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="" />
+
+ <TextView
+ android:id="@+id/target_lon_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="" />
+ </TableRow>
+
+ <TableRow
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:padding="2dip"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toRightOf="@id/receiver_lon_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
- </LinearLayout>
+ android:layout_height="wrap_content">
+
+ <TextView
+ android:id="@+id/receiver_pos_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingRight="4dp"
+ android:text="@string/receiver_pos_label" />
+
+ <TextView
+ android:id="@+id/receiver_lat_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="" />
+
+ <TextView
+ android:id="@+id/receiver_lon_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="" />
+ </TableRow>
+ </TableLayout>
</LinearLayout>
<ImageView
android:id="@+id/battery_redled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
android:contentDescription="@string/battery_voltage_label"
android:src="@drawable/grayled"
/>
<ImageView
android:id="@+id/battery_greenled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
android:contentDescription="@string/battery_voltage_label"
+ android:paddingRight="5dp"
android:src="@drawable/grayled" />
<TextView
<ImageView
android:id="@+id/receiver_redled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
android:contentDescription="@string/receiver_voltage_label"
android:src="@drawable/grayled" />
<ImageView
android:id="@+id/receiver_greenled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
android:contentDescription="@string/receiver_voltage_label"
android:src="@drawable/grayled" />
<ImageView
android:id="@+id/logging_redled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
android:contentDescription="@string/logging_label"
android:src="@drawable/grayled" />
<ImageView
android:id="@+id/logging_greenled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
android:contentDescription="@string/logging_label"
android:src="@drawable/grayled" />
<ImageView
android:id="@+id/gps_locked_redled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
android:contentDescription="@string/gps_locked_label"
android:src="@drawable/grayled" />
<ImageView
android:id="@+id/gps_locked_greenled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
android:contentDescription="@string/gps_locked_label"
android:src="@drawable/grayled" />
<ImageView
android:id="@+id/gps_ready_redled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
android:contentDescription="@string/gps_ready_label"
android:src="@drawable/grayled" />
<ImageView
android:id="@+id/gps_ready_greenled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
android:contentDescription="@string/gps_ready_label"
android:src="@drawable/grayled" />
<ImageView
android:id="@+id/apogee_redled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
android:contentDescription="@string/apogee_voltage_label"
android:src="@drawable/grayled" />
<ImageView
android:id="@+id/apogee_greenled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
android:contentDescription="@string/apogee_voltage_label"
android:src="@drawable/grayled" />
<ImageView
android:id="@+id/main_redled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
android:contentDescription="@string/main_voltage_label"
android:src="@drawable/grayled" />
<ImageView
android:id="@+id/main_greenled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
android:contentDescription="@string/main_voltage_label"
android:src="@drawable/grayled" />
<ImageView
android:id="@+id/ignite_a_redled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
android:contentDescription="@string/ignite_a_voltage_label"
android:src="@drawable/grayled" />
<ImageView
android:id="@+id/ignite_a_greenled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
android:contentDescription="@string/ignite_a_voltage_label"
android:src="@drawable/grayled" />
<ImageView
android:id="@+id/ignite_b_redled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
android:contentDescription="@string/ignite_b_voltage_label"
android:src="@drawable/grayled" />
<ImageView
android:id="@+id/ignite_b_greenled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
android:contentDescription="@string/ignite_b_voltage_label"
android:src="@drawable/grayled" />
<ImageView
android:id="@+id/ignite_c_redled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
android:contentDescription="@string/ignite_c_voltage_label"
android:src="@drawable/grayled" />
<ImageView
android:id="@+id/ignite_c_greenled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
android:contentDescription="@string/ignite_c_voltage_label"
android:src="@drawable/grayled" />
<ImageView
android:id="@+id/ignite_d_redled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
android:contentDescription="@string/ignite_d_voltage_label"
android:src="@drawable/grayled" />
<ImageView
android:id="@+id/ignite_d_greenled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:paddingRight="5dp"
android:contentDescription="@string/ignite_d_voltage_label"
android:src="@drawable/grayled" />
android:layout_height="wrap_content"
android:orientation="vertical" >
- <LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_weight="0"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" >
-
- <RelativeLayout
- android:layout_gravity="fill"
- android:layout_weight="1"
+ <TableLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:stretchColumns="0,1"
+ android:layout_weight="0"
android:layout_width="wrap_content"
- android:layout_height="wrap_content" >
-
- <TextView
- android:id="@+id/bearing_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/bearing_label" />
-
- <TextView
- android:id="@+id/bearing_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@+id/bearing_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- <RelativeLayout
- android:layout_gravity="fill"
- android:layout_weight="1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" >
+ android:layout_height="wrap_content">
- <TextView
- android:id="@+id/direction_label"
+ <TableRow
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:padding="2dip"
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_gravity="fill"
- android:layout_weight="1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
+ <TextView
+ android:id="@+id/bearing_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/bearing_label" />
- <TextView
- android:id="@+id/distance_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/distance_label" />
+ <TextView
+ android:id="@+id/bearing_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="" />
+ </TableRow>
- <TextView
- android:id="@+id/distance_value"
+ <TableRow
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:padding="2dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@+id/distance_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- <RelativeLayout
- android:layout_gravity="fill"
- android:layout_weight="1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
+ >
- <TextView
- android:id="@+id/target_lat_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/target_latitude_label" />
+ <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/target_lat_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/target_lat_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- <RelativeLayout
- android:layout_gravity="fill"
- android:layout_weight="1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
+ <TextView
+ android:id="@+id/direction_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="" />
+ </TableRow>
- <TextView
- android:id="@+id/target_lon_label"
- android:layout_width="wrap_content"
+ <TableRow
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:padding="2dip"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/target_longitude_label" />
+ >
- <TextView
- android:id="@+id/target_lon_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/target_lon_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- <RelativeLayout
- android:layout_gravity="fill"
- android:layout_weight="1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
+ <TextView
+ android:id="@+id/distance_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/distance_label" />
- <TextView
- android:id="@+id/receiver_lat_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/receiver_latitude_label" />
+ <TextView
+ android:id="@+id/distance_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="" />
+ </TableRow>
- <TextView
- android:id="@+id/receiver_lat_value"
- android:layout_width="wrap_content"
+ <TableRow
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:padding="2dip"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/receiver_lat_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- <RelativeLayout
- android:layout_gravity="fill"
- android:layout_weight="1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
+ >
+
+ <TextView
+ android:id="@+id/target_lat_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/target_latitude_label" />
- <TextView
- android:id="@+id/receiver_lon_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/receiver_longitude_label" />
+ <TextView
+ android:id="@+id/target_lat_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="" />
+ </TableRow>
- <TextView
- android:id="@+id/receiver_lon_value"
+ <TableRow
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:padding="2dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/receiver_lon_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- <RelativeLayout
- android:layout_gravity="fill"
- android:layout_weight="1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
+ >
- <TextView
- android:id="@+id/max_height_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/max_height_label" />
+ <TextView
+ android:id="@+id/target_lon_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/target_longitude_label" />
- <TextView
- android:id="@+id/max_height_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/max_height_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- <RelativeLayout
- android:layout_gravity="fill"
- android:layout_weight="1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
+ <TextView
+ android:id="@+id/target_lon_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="" />
- <TextView
- android:id="@+id/max_speed_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/max_speed_label" />
+ </TableRow>
- <TextView
- android:id="@+id/max_speed_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/max_speed_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
-
- <RelativeLayout
- android:layout_gravity="fill"
- android:layout_weight="1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
+ <TableRow
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:padding="2dip"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ >
+
+ <TextView
+ android:id="@+id/receiver_lat_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/receiver_latitude_label" />
+
+ <TextView
+ android:id="@+id/receiver_lat_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="" />
+ </TableRow>
+
+ <TableRow
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:padding="2dip"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ >
+
+ <TextView
+ android:id="@+id/receiver_lon_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/receiver_longitude_label" />
+
+ <TextView
+ android:id="@+id/receiver_lon_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text=""/>
+ </TableRow>
+
+ <TableRow
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:padding="2dip"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ >
+
+ <TextView
+ android:id="@+id/max_height_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/max_height_label" />
- <TextView
- android:id="@+id/max_accel_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/max_accel_label" />
+ <TextView
+ android:id="@+id/max_height_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="" />
+ </TableRow>
+
+ <TableRow
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:padding="2dip"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ >
+
+
+ <TextView
+ android:id="@+id/max_speed_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/max_speed_label" />
- <TextView
- android:id="@+id/max_accel_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/max_accel_label"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </RelativeLayout>
- </LinearLayout>
+ <TextView
+ android:id="@+id/max_speed_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="" />
+ </TableRow>
+
+ <TableRow
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:padding="2dip"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ >
+
+ <TextView
+ android:id="@+id/max_accel_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/max_accel_label" />
+
+ <TextView
+ android:id="@+id/max_accel_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="" />
+ </TableRow>
+ </TableLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <style name="CustomTheme" parent="android:Theme.Material.Light">
- </style>
+ <style name="Small" parent="android:Theme.Material.Light">
+ <item name="android:textColor">#000000</item>
+ <item name="android:textSize">12sp</item>
+ <item name="android:lineHeight">14sp</item>
+ </style>
+ <style name="Medium" parent="android:Theme.Material.Light">
+ <item name="android:textColor">#000000</item>
+ <item name="android:textSize">15sp</item>
+ <item name="android:lineHeight">18sp</item>
+ </style>
+ <style name="Large" parent="android:Theme.Material.Light">
+ <item name="android:textColor">#000000</item>
+ <item name="android:textSize">20sp</item>
+ <item name="android:lineHeight">40sp</item>
+ </style>
+ <style name="Extra" parent="android:Theme.Material.Light">
+ <item name="android:textColor">#000000</item>
+ <item name="android:textSize">27sp</item>
+ <item name="android:lineHeight">32sp</item>
+ </style>
</resources>
<string name="select_tracker">Select Tracker</string>
<string name="delete_track">Delete Track</string>
<string name="map_type">Map Type</string>
- <string name="map_source">Toggle Online/Offline maps</string>
+ <string name="map_source">Map Source</string>
<!-- MapTypeActivity -->
<!-- <string name="map_type">Map Type</string> -->
<!-- UI fields -->
<!-- Header -->
- <string name="callsign_label">Callsign</string>
+ <string name="callsign_label">Call</string>
<string name="serial_label">Serial</string>
<string name="flight_label">Flight</string>
<string name="state_label">State</string>
<string name="gps_ready_label">GPS Ready</string>
<string name="latitude_label">Latitude</string>
<string name="longitude_label">Longitude</string>
+ <string name="target_pos_label">Tar</string>
+ <string name="receiver_pos_label">Me</string>
<string name="target_latitude_label">Tar Lat</string>
<string name="target_longitude_label">Tar Lon</string>
<string name="receiver_latitude_label">My Lat</string>
<!-- <string name="map_type">Map Type</string> -->
<!-- <string name="map_source">Map Source</string> -->
<!-- <string name="preload_maps">Preload Maps</string> -->
+ <string name="font_size">Text Size</string>
<string name="manage_frequencies">Manage Frequencies</string>
<string name="done">OK</string>