[WifiSettings] Refactor Wi-Fi required info

Instead of using an invisible TextView in the layout itself, make the
required info a list header. This paves way for using the Setup
Wizard library by including all the required contents in the ListView
itself.

The required info is not shown since Lollipop, but can be tested with
    adb shell am start -a "com.android.net.wifi.SETUP_WIFI_NETWORK" \
            --es theme material_light \
            --ez useImmersiveMode true \
            --ez wifi_show_wifi_required_info true

Bug: 19698532
Change-Id: I5a7da726b2f49af7dd755b41c73e1a1b4349699c
This commit is contained in:
Maurice Lam
2015-03-05 11:20:47 -08:00
parent bc614dfcb5
commit b484340e3d
6 changed files with 30 additions and 37 deletions

View File

@@ -73,7 +73,9 @@ public class WifiSettingsForSetupWizard extends WifiSettings {
final Intent intent = getActivity().getIntent();
if (intent.getBooleanExtra(EXTRA_SHOW_WIFI_REQUIRED_INFO, false)) {
view.findViewById(R.id.wifi_required_info).setVisibility(View.VISIBLE);
final View requiredInfo =
inflater.inflate(R.layout.setup_wifi_required_info, list, false);
list.addHeaderView(requiredInfo, null, false);
}
return view;