diff options
author | Fabrice Di Meglio <fdimeglio@google.com> | 2014-03-21 19:24:43 -0700 |
---|---|---|
committer | Fabrice Di Meglio <fdimeglio@google.com> | 2014-03-28 15:51:29 -0700 |
commit | d25314d3305ed1a07b53991a978cd71219ef2a10 (patch) | |
tree | 797a75d9ff94055ee025294848e0154fae26f365 /src/com/android/settings/wifi/WifiSettings.java | |
parent | 5f3442af6f1d1141f8f4dff033d4176214281b81 (diff) | |
download | packages_apps_Settings-d25314d3305ed1a07b53991a978cd71219ef2a10.zip packages_apps_Settings-d25314d3305ed1a07b53991a978cd71219ef2a10.tar.gz packages_apps_Settings-d25314d3305ed1a07b53991a978cd71219ef2a10.tar.bz2 |
Settings - update for new UI (no more Drawer)
- follow the UX spec by no more using a Drawer
- the Dashboard is now a Fragment that contains the list of Headers
- the search results are also put into a Fragment that is replacing
the initial one (Dashboard or other) when expanding the SearchView
- use a SearchView for query input
- when tapping on a Header or a Search Result, re-launch Settings as
an Activity so that we are benefiting from the Activity stack for
UP affordance and BACK button
- manage UP affordance to show it only when needed
- move some Actions to the Menu in the ActionBar for allowing space
to the Search action and removing some clutter
- fix an issue with the Index and WiFiEnabler and their cached Context
that was not updated when there was a Configuration change
- simplify the SettingsActivity code by extracting some inner classes
Change-Id: I50b5f77bb44a7fade1886114dbbc820609a5e63d
Diffstat (limited to 'src/com/android/settings/wifi/WifiSettings.java')
-rw-r--r-- | src/com/android/settings/wifi/WifiSettings.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java index 667feb3..21fecd3 100644 --- a/src/com/android/settings/wifi/WifiSettings.java +++ b/src/com/android/settings/wifi/WifiSettings.java @@ -416,7 +416,7 @@ public class WifiSettings extends RestrictedSettingsFragment if (activity instanceof SettingsActivity) { SettingsActivity sa = (SettingsActivity) activity; - addSwitch = !sa.onIsHidingHeaders(); + addSwitch = sa.onIsHidingHeaders(); } else if (activity instanceof WifiPickerActivity) { PreferenceActivity pa = (PreferenceActivity) activity; addSwitch = pa.onIsHidingHeaders(); @@ -458,12 +458,13 @@ public class WifiSettings extends RestrictedSettingsFragment @Override public void onResume() { + final Activity activity = getActivity(); super.onResume(); if (mWifiEnabler != null) { - mWifiEnabler.resume(); + mWifiEnabler.resume(activity); } - getActivity().registerReceiver(mReceiver, mFilter); + activity.registerReceiver(mReceiver, mFilter); updateAccessPoints(); } @@ -497,11 +498,11 @@ public class WifiSettings extends RestrictedSettingsFragment menu.add(Menu.NONE, MENU_ID_WPS_PBC, 0, R.string.wifi_menu_wps_pbc) .setIcon(ta.getDrawable(1)) .setEnabled(wifiIsEnabled) - .setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); + .setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER); menu.add(Menu.NONE, MENU_ID_ADD_NETWORK, 0, R.string.wifi_add_network) .setIcon(ta.getDrawable(0)) .setEnabled(wifiIsEnabled) - .setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); + .setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER); menu.add(Menu.NONE, MENU_ID_SCAN, 0, R.string.wifi_menu_scan) //.setIcon(R.drawable.ic_menu_scan_network) .setEnabled(wifiIsEnabled) |