Note that there are some explanatory texts on larger screens.

plurals
  1. POonitemclick is not working in listview dialog
    primarykey
    data
    text
    <p>on click item is not working inside dialog..</p> <p>Description: i have one print button when i click that button a dialog will appear which contains listview using adapter.. when i click on listview row it must go to other activity.. But problem is onitemclick is not working in listview dialog..</p> <p>thank u in advance.</p> <p>WorkDetailView.java</p> <pre><code> printbutton = (Button) findViewById(R.id.barcodePrintButton); printbutton.setOnClickListener(new OnClickListener() { private Context context = WorkDetailView.this; /** * * Description: barcodePrintButton onClick to ServiceManager.callPrintService * */ @Override public void onClick(View view) { dialog = new Dialog(context); dialog.setContentView(R.layout.dialoglistview); dialog.setTitle("Print Dialog"); listviewDialog = (ListView) dialog.findViewById(R.id.dialogList); dataDialogAdapter = new WorkDetailDialogAdapter(context, sampleDetailsArray); listviewDialog.setAdapter(dataDialogAdapter); listviewDialog.setClickable(true); listviewDialog.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView&lt;?&gt; adapter, View view, int position, long id) { Log.i("selectedAdapter", "selectedAdapter"+ position); Intent intent = new Intent("com.google.zxing.client.android.ENCODE"); intent.putExtra("ENCODE_DATA", patient.getMrnNumber()); intent.putExtra("ENCODE_FORMAT", "CODE_128"); // intent.putExtra("ENCODE_SHOW_CONTENTS", false); startActivity(intent); Toast.makeText(WorkDetailView.this, "Printing Barcode Result", Toast.LENGTH_LONG).show(); } }); dialog.show(); } }); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload