Dialog dialog = new Dialog(context,R.style.AppBaseTheme); wifiView = AppData.inflater.inflate(R.layout.wifi_ip_info_form, null); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setContentView(wifiView); /* Window dialogWindow = dialog.getWindow(); //getActivity().getWindow().setFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM, //WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM); dialogWindow.setLayout(LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT); dialogWindow.setGravity(Gravity.TOP); dialog.show();*/ dialog.show();
String title = "\n\""+itemInfo.itemSSID+"\" ";
View password_view = AppData.inflater.inflate(R.layout.wifi_cancel_connect, null); TextView password_title = (TextView)password_view.findViewById(R.id.wifi_show_info); password_title.setText(title); final AlertDialog alertDialog = new AlertDialog.Builder(WirelessNetworkActivity.this).create(); alertDialog.setView(password_view); Window window = alertDialog.getWindow(); WindowManager.LayoutParams lp = window.getAttributes(); alertDialog.show(); lp.width = 920; lp.height = 300; lp.alpha = 0.9f; window.setAttributes(lp);