Hello there,

I have created a
I have set the OnItemClickListener to the list view.
It doenst listen when I press the center key of the emulator.

But

When I create the listview where each list item has ONLY a text view,
the Listener works.

why is this?



This is the composite adapter s getView();

public View getView(int position, View convertView, ViewGroup parent)
{
                ViewHolder holder;
                        if (convertView == null) {
                                convertView = mInflater.inflate
(R.layout.list_item_icon_text,null);
                                holder = new ViewHolder();
                                holder.text = (TextView) 
convertView.findViewById(R.id.text);
                                holder.icon = (ImageButton) 
convertView.findViewById(R.id.icon);
                                convertView.setTag(holder);
                        } else {
                                holder = (ViewHolder) convertView.getTag();
                        }
                        
holder.text.setText(bookList[position].getDisplayName());
                        holder.icon.setBackgroundResource(R.drawable.del);
                        return convertView;


}
static class ViewHolder {
        TextView text;
        ImageButton icon;
}
--~--~---------~--~----~------------~-------~--~----~
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