Hi All,

                 I am using custom list with each item in the list have
RelativeLayout with 1 textview and 1 Button.Then at run time I am not
getting response in OnItemClickListener upon selection on particular item.As
per follwing code(I am using BaseAdapter for item in a custom list):-


      list.setOnItemClickListener(new OnItemClickListener()
{                                                                   //*listener
on item in a list*
            public void onItemClick(AdapterView<?> parent, View view,
                    int position, long id) {
                System.out.println("Found
)))))))))))))))))))))"+view.toString);


((Button)((RelativeLayout)parent.getChildAt(position)).getChildAt(1)).setOnClickListener(new
OnClickListener() {
                         public void onClick(View v) {

 System.out.println("DDDDDDDDS!!!!!!!!!!!1");
//*listener on Button *
                             processDelete(tempStr.trim());

                         }
                        });

                }
});


            But if I will set btn.setFocusable(true)   for button then
ItemClickListener will be executed.As you can see inside
list.setOnItemClickListener ,there is  butn.setOnClickListener.

             So, if I will click on textview(i.e area other then
Button).then it will show that I clicked on RelativeLayout & *listener on
Button* will not be called.Then if I will press next time on button
then *listener
on Button* will be called but not *listener on item in a list.

              *But I want if I will press on a button then *listener on item
in a list *&* listener on Button *both should be called so that I can get
the position of the button in list from  *listener on item in a list *& then
I can perform some task using that postion.

               Can Anybody tell how to achieve this?Or if there is way to do
this kind of thing?

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

Reply via email to