[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:
@@ -263,24 +263,26 @@ public class WifiSetupActivity extends WifiPickerActivity
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
int messageRes = getArguments().getInt("messageRes");
|
||||
return new AlertDialog.Builder(getActivity())
|
||||
final AlertDialog dialog = new AlertDialog.Builder(getActivity())
|
||||
.setMessage(messageRes)
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(R.string.wifi_skip_anyway,
|
||||
new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
WifiSetupActivity activity = (WifiSetupActivity) getActivity();
|
||||
activity.finishOrNext(RESULT_SKIP);
|
||||
}
|
||||
})
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
WifiSetupActivity activity = (WifiSetupActivity) getActivity();
|
||||
activity.finishOrNext(RESULT_SKIP);
|
||||
}
|
||||
})
|
||||
.setNegativeButton(R.string.wifi_dont_skip,
|
||||
new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
}
|
||||
})
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
}
|
||||
})
|
||||
.create();
|
||||
SetupWizardUtils.applyImmersiveFlags(dialog);
|
||||
return dialog;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user