Sir , I am going to create the custom dialog with some editText fields and which the values of the selected item of the Listview is drawn and set into the value of the EditText.
But when it comes to the execution , it always turn null as follows

08-29 18:08:06.211: D/dalvikvm(10652): GC_FOR_ALLOC freed 219K, 6% free 21317K/22663K, paused 11ms, total 11ms08-29 18:08:07.811: D/debug getCovreage Address(10652): 1508-29 18:08:07.831: D/txtB(10652): null08-29 18:08:07.831: D/txtFt(10652): null08-29 18:08:07.831: D/txtFr(10652): nullWould you please tell me how to initialise the editText in the custom editText , set the values and get the values of the EditText ?

coverageList.setBackgroundColor(Color.WHITE); coverageList.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView arg0, View arg1, int arg2, long arg3) { curservid = resultList.get(arg2).get("Block").toString(); Log.d("debug getCovreage Address" , curservid); final Dialog dialog = new Dialog(EOrderCheckCoverage.this); dialog.setContentView(R.layout.custom_coverage_ope n_order); dialog.setTitle("Open Order"); // set the custom dialog components - text, image and button final EditText txtB = (EditText)findViewById(R.id.txtBlock); Log.d("txtB" , String.valueOf(txtB)); final EditText txtFt = (EditText)findViewById(R.id.txtFlat); Log.d("txtFt" , String.valueOf(txtFt)); final EditText txtFr = (EditText)findViewById(R.id.txtBlockFloor); Log.d("txtFr" , String.valueOf(txtFr)); Button dialogButton = (Button) dialog.findViewById(R.id.dialogButtonOK); // if button is clicked, close the custom dialog dialogButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { String a = txtB.getText().toString(); String b = txtFt.getText().toString(); String c = txtFr.getText().toString(); dialog.dismiss(); Toast.makeText(EOrderCheckCoverage.this, a + " " + b + " " + c, Toast.LENGTH_LONG).show(); } }); dialog.show(); } });

Check Solution