here it is..This is the adapter class and in it there is a click on holder.productName where
i am displaying the dialog..

There are a couple of questions you didn't answer:

1) How do you know it isn't getting to the click handler? Are you seeing the dialog appear, but not get dismissed? Are you not seeing "list ID CLICKED" in LogCat? I assume you *are* seeing the dialog appear? You have one click handler being added inside another click handler, but if you're seeing the dialog appear then it must at least be getting inside the outer handler.

2) Do you see any unusual entries in LogCat - particularly exceptions?

Curiously, if I add a button to a content view and on clicking that, have this code:

@Override
public void onClick(View v)
{
   final Dialog dialog = new Dialog(m_thisScreen);
   dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
   ListView lv = new ListView(m_thisScreen); // Instead of from a resource.
   dialog.setContentView(lv);
   dialog.setCancelable(true);
final ListView customerList = lv ; // Though final might be the issue, but it's not.
   customerList.setOnItemClickListener(new OnItemClickListener()
   {
       @Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3)
       {
           System.out.println("list ID CLICKED ");
           dialog.dismiss();

       }

   } );
customerList.setAdapter(new ArrayAdapter<String>(m_thisScreen, R.layout.list_item_layout,
       new String[] {"Hello","Goodbye"} ) );
   dialog.show();

}


it worked just fine :(


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to