public void Showaddipcdialog () {
LOG.I ("Ssssssssss", "wwwwwwwwww");
Layoutinflater inflater = this.getactivity (). Getlayoutinflater ();
LOG.I ("Ssssssssssinflater", inflater+ "");
//Error
//final View layout = Inflater.inflate (R.LAYOUT.ADDIPC, (ViewGroup) Findviewbyid (R.id.addipc_dialog));//Add layout
Correct
Final View layout = inflater.inflate (R.LAYOUT.ADDIPC, NULL);//Add layout
LOG.I ("Sssssssssslayout", layout+ "");
EditText etname = (EditText) Layout.findviewbyid (r.id.et_camera_name);
EditText edit = (EditText) Layout.findviewbyid (R.ID.SN);
EditText Editps = (EditText) Layout.findviewbyid (R.id.password);
New Alertdialog.builder (This.getactivity ()). Settitle ("Add Surveillance Camera"). Setview (Layout)
. Setpositivebutton ("OK", new Dialoginterface.onclicklistener () {
public void OnClick (dialoginterface arg0, int arg1) {
}
}). Setnegativebutton ("Cancel", null). Show ();
}
//Summary: duplication requires caution
Errors encountered by Alertdialog in Android