summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--altosdroid/res/menu/option_menu.xml6
-rw-r--r--altosdroid/res/values/CustomTheme.xml3
-rw-r--r--altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java20
3 files changed, 9 insertions, 20 deletions
diff --git a/altosdroid/res/menu/option_menu.xml b/altosdroid/res/menu/option_menu.xml
index 2109ae04..1b3142a8 100644
--- a/altosdroid/res/menu/option_menu.xml
+++ b/altosdroid/res/menu/option_menu.xml
@@ -22,9 +22,6 @@
<item android:id="@+id/disconnect"
android:icon="@android:drawable/ic_notification_clear_all"
android:title="@string/disconnect_device" />
- <item android:id="@+id/quit"
- android:icon="@android:drawable/ic_menu_close_clear_cancel"
- android:title="@string/quit" />
<item android:id="@+id/select_freq"
android:icon="@android:drawable/ic_menu_preferences"
android:title="@string/select_freq" />
@@ -40,4 +37,7 @@
<item android:id="@+id/map_type"
android:icon="@android:drawable/ic_menu_mapmode"
android:title="@string/map_type" />
+ <item android:id="@+id/quit"
+ android:icon="@android:drawable/ic_menu_close_clear_cancel"
+ android:title="@string/quit" />
</menu>
diff --git a/altosdroid/res/values/CustomTheme.xml b/altosdroid/res/values/CustomTheme.xml
index 4daed1f8..6c701ea2 100644
--- a/altosdroid/res/values/CustomTheme.xml
+++ b/altosdroid/res/values/CustomTheme.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <style name="CustomTheme" parent="android:Theme">
- <item name="android:windowNoTitle">false</item>
+ <style name="CustomTheme" parent="android:Theme.Holo">
</style>
</resources>
diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java
index 5be9ba84..293dff7f 100644
--- a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java
+++ b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java
@@ -82,9 +82,6 @@ public class AltosDroid extends FragmentActivity implements AltosUnitsListener {
private BluetoothAdapter mBluetoothAdapter = null;
- // Layout Views
- private TextView mTitle;
-
// Flight state values
private TextView mCallsignView;
private TextView mRSSIView;
@@ -221,20 +218,20 @@ public class AltosDroid extends FragmentActivity implements AltosUnitsListener {
if (telemetry_state.telemetry_rate != AltosLib.ao_telemetry_rate_38400)
str = str.concat(String.format(" %d bps",
AltosLib.ao_telemetry_rate_values[telemetry_state.telemetry_rate]));
- mTitle.setText(str);
+ setTitle(str);
} else {
- mTitle.setText(R.string.title_connected_to);
+ setTitle(R.string.title_connected_to);
}
break;
case TelemetryState.CONNECT_CONNECTING:
if (telemetry_state.address != null)
- mTitle.setText(String.format("Connecting to %s...", telemetry_state.address.name));
+ setTitle(String.format("Connecting to %s...", telemetry_state.address.name));
else
- mTitle.setText("Connecting to something...");
+ setTitle("Connecting to something...");
break;
case TelemetryState.CONNECT_DISCONNECTED:
case TelemetryState.CONNECT_NONE:
- mTitle.setText(R.string.title_not_connected);
+ setTitle(R.string.title_not_connected);
break;
}
}
@@ -427,9 +424,7 @@ public class AltosDroid extends FragmentActivity implements AltosUnitsListener {
fm = getSupportFragmentManager();
// Set up the window layout
- requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.altosdroid);
- getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title);
// Create the Tabs and ViewPager
mTabHost = (TabHost)findViewById(android.R.id.tabhost);
@@ -447,11 +442,6 @@ public class AltosDroid extends FragmentActivity implements AltosUnitsListener {
mTabsAdapter.addTab(mTabHost.newTabSpec("map").setIndicator(create_tab_view("Map")), TabMap.class, null);
mTabsAdapter.addTab(mTabHost.newTabSpec("offmap").setIndicator(create_tab_view("OffMap")), TabMapOffline.class, null);
- // Set up the custom title
- mTitle = (TextView) findViewById(R.id.title_left_text);
- mTitle.setText(R.string.app_name);
- mTitle = (TextView) findViewById(R.id.title_right_text);
-
// Display the Version
mVersion = (TextView) findViewById(R.id.version);
mVersion.setText("Version: " + BuildInfo.version +