[WifiSetup] Make dialogs immersive

Added a dialog specific applyImmersiveFlags method that adds
immersive flags without the LAYOUT_ flags. The LAYOUT_ flags causes
the dialog to not resize when IME is visible, and the dialog doesn't
need to be drawn under the navigation / status bars anyway.

Bug: 17759269
Change-Id: I0186e85d9f398af73c511b1a5ec6e83febe97f83
This commit is contained in:
Maurice Lam
2015-01-22 11:33:28 -08:00
parent 342d08537f
commit 3f7c09bd5a
3 changed files with 38 additions and 11 deletions

View File

@@ -16,6 +16,7 @@
package com.android.settings.wifi;
import android.app.Dialog;
import android.content.Intent;
import android.net.wifi.WifiConfiguration;
import android.os.Bundle;
@@ -29,6 +30,7 @@ import android.widget.ListView;
import android.widget.TextView;
import com.android.settings.R;
import com.android.settings.SetupWizardUtils;
/**
* This customized version of WifiSettings is shown to the user only during Setup Wizard. Menu
@@ -118,6 +120,13 @@ public class WifiSettingsForSetupWizard extends WifiSettings {
// Do not show menu during setup wizard
}
@Override
public Dialog onCreateDialog(int dialogId) {
final Dialog dialog = super.onCreateDialog(dialogId);
SetupWizardUtils.applyImmersiveFlags(dialog);
return dialog;
}
@Override
protected void connect(final WifiConfiguration config) {
WifiSetupActivity activity = (WifiSetupActivity) getActivity();