summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGilles Debunne <debunne@google.com>2011-07-25 11:36:15 -0700
committerGilles Debunne <debunne@google.com>2011-07-25 14:01:12 -0700
commitcd8e5246f1d538384dae87b8d2867ba3e44a6981 (patch)
treeb65e0c310aed2ac444f0980473b0f5f631f079bb /src
parent672b3c6576efa9e8e4ad0ebbea7f0c36ecf77d9b (diff)
downloadpackages_apps_settings-cd8e5246f1d538384dae87b8d2867ba3e44a6981.zip
packages_apps_settings-cd8e5246f1d538384dae87b8d2867ba3e44a6981.tar.gz
packages_apps_settings-cd8e5246f1d538384dae87b8d2867ba3e44a6981.tar.bz2
Text instead of icons in account settings options
Also changed the default style to remove the opaque title background. Change-Id: I948d9a15961223c3703bb607e2e5a6bf41e0ff5e
Diffstat (limited to 'src')
-rw-r--r--src/com/android/settings/Settings.java16
-rw-r--r--src/com/android/settings/accounts/AccountSyncSettings.java10
-rw-r--r--src/com/android/settings/accounts/ManageAccountsSettings.java8
-rw-r--r--src/com/android/settings/wifi/WifiSettings.java1
4 files changed, 18 insertions, 17 deletions
diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java
index 2b69c2a..c630ee2 100644
--- a/src/com/android/settings/Settings.java
+++ b/src/com/android/settings/Settings.java
@@ -16,6 +16,11 @@
package com.android.settings;
+import com.android.settings.accounts.AccountSyncSettings;
+import com.android.settings.bluetooth.BluetoothEnabler;
+import com.android.settings.fuelgauge.PowerUsageSummary;
+import com.android.settings.wifi.WifiEnabler;
+
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -37,11 +42,6 @@ import android.widget.ListAdapter;
import android.widget.Switch;
import android.widget.TextView;
-import com.android.settings.accounts.ManageAccountsSettings;
-import com.android.settings.bluetooth.BluetoothEnabler;
-import com.android.settings.fuelgauge.PowerUsageSummary;
-import com.android.settings.wifi.WifiEnabler;
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -81,7 +81,7 @@ public class Settings extends PreferenceActivity implements ButtonBarHandler {
@Override
protected void onCreate(Bundle savedInstanceState) {
final int theme = getIntent().getIntExtra(
- EXTRA_THEME, android.R.style.Theme_Holo_SolidActionBar_SplitActionBarWhenNarrow);
+ EXTRA_THEME, android.R.style.Theme_Holo_SplitActionBarWhenNarrow);
setTheme(theme);
getMetaData();
@@ -289,8 +289,8 @@ public class Settings extends PreferenceActivity implements ButtonBarHandler {
// some fragments would like a custom activity theme
if (DataUsageSummary.class.getName().equals(fragmentName) ||
PowerUsageSummary.class.getName().equals(fragmentName) ||
- UserDictionarySettings.class.getName().equals(fragmentName) ||
- ManageAccountsSettings.class.getName().equals(fragmentName)) {
+ AccountSyncSettings.class.getName().equals(fragmentName) ||
+ UserDictionarySettings.class.getName().equals(fragmentName)) {
intent.putExtra(EXTRA_THEME, android.R.style.Theme_Holo_SolidActionBar);
}
diff --git a/src/com/android/settings/accounts/AccountSyncSettings.java b/src/com/android/settings/accounts/AccountSyncSettings.java
index 547b0e1..e70cbad 100644
--- a/src/com/android/settings/accounts/AccountSyncSettings.java
+++ b/src/com/android/settings/accounts/AccountSyncSettings.java
@@ -236,10 +236,12 @@ public class AccountSyncSettings extends AccountPreferenceBase {
getString(R.string.sync_menu_sync_cancel))
.setIcon(com.android.internal.R.drawable.ic_menu_close_clear_cancel);
- removeAccount.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS
- | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
- syncNow.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
- syncCancel.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
+ removeAccount.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER |
+ MenuItem.SHOW_AS_ACTION_WITH_TEXT);
+ syncNow.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER |
+ MenuItem.SHOW_AS_ACTION_WITH_TEXT);
+ syncCancel.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER |
+ MenuItem.SHOW_AS_ACTION_WITH_TEXT);
}
@Override
diff --git a/src/com/android/settings/accounts/ManageAccountsSettings.java b/src/com/android/settings/accounts/ManageAccountsSettings.java
index 7d935f0..d9dea00 100644
--- a/src/com/android/settings/accounts/ManageAccountsSettings.java
+++ b/src/com/android/settings/accounts/ManageAccountsSettings.java
@@ -19,7 +19,6 @@ package com.android.settings.accounts;
import com.android.settings.AccountPreference;
import com.android.settings.DialogCreatable;
import com.android.settings.R;
-import com.google.android.collect.Maps;
import android.accounts.Account;
import android.accounts.AccountManager;
@@ -35,7 +34,6 @@ import android.content.Intent;
import android.content.SyncAdapterType;
import android.content.SyncInfo;
import android.content.SyncStatusInfo;
-import android.content.pm.PackageManager;
import android.graphics.drawable.Drawable;
import android.net.ConnectivityManager;
import android.os.Bundle;
@@ -201,6 +199,7 @@ public class ManageAccountsSettings extends AccountPreferenceBase
return null;
}
+ @Override
public void showDialog(int dialogId) {
if (mDialogFragment != null) {
Log.e(TAG, "Old dialog fragment not null!");
@@ -212,8 +211,7 @@ public class ManageAccountsSettings extends AccountPreferenceBase
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
MenuItem actionItem =
- menu.add(0, MENU_ADD_ACCOUNT, 0, R.string.add_account_label)
- .setIcon(R.drawable.ic_menu_add);
+ menu.add(0, MENU_ADD_ACCOUNT, 0, R.string.add_account_label);
actionItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM
| MenuItem.SHOW_AS_ACTION_WITH_TEXT);
}
@@ -235,6 +233,7 @@ public class ManageAccountsSettings extends AccountPreferenceBase
connManager.setBackgroundDataSetting(enabled);
}
+ @Override
protected void onSyncStateUpdated() {
// Catch any delayed delivery of update messages
if (getActivity() == null) return;
@@ -342,6 +341,7 @@ public class ManageAccountsSettings extends AccountPreferenceBase
onSyncStateUpdated();
}
+ @Override
protected void onAuthDescriptionsUpdated() {
// Update account icons for all account preference items
for (int i = 0; i < mManageAccountsCategory.getPreferenceCount(); i++) {
diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java
index ba8e440..af83984 100644
--- a/src/com/android/settings/wifi/WifiSettings.java
+++ b/src/com/android/settings/wifi/WifiSettings.java
@@ -261,7 +261,6 @@ public class WifiSettings extends SettingsPreferenceFragment
.setEnabled(wifiIsEnabled)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
menu.add(Menu.NONE, MENU_ID_ADD_NETWORK, 0, R.string.wifi_add_network)
- //.setIcon(android.R.drawable.ic_menu_add)
.setEnabled(wifiIsEnabled)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
menu.add(Menu.NONE, MENU_ID_ADVANCED, 0, R.string.wifi_menu_advanced)