you can, but it's much more work

you need to implement a custom listadapter, then when you inflat the
view, keep a local reference to them, then implement an
onclicklistener on the item selection to perform any custom
highlighting. the following code show how to implement that custom
listadapter

    private class CategoryAdapter extends BaseAdapter{

        @Override
        public int getCount() {
            return searchResult.getCategories().size();
        }

        @Override
        public Object getItem(int position) {
            return searchResult.getCategories().get(position);
        }

        @Override
        public long getItemId(int position) {
            return position;
        }

        @Override
        public View getView(int position, View convertView, ViewGroup
parent) {
            final LayoutInflater inflater =
LayoutInflater.from(AndroidResults.this);
            final View view = inflater.inflate(
                    R.layout.results_row, parent, false);
              //keep a array of 'views', add onclick listener callback
to the view
              itemsViews.add(view);
              //
view.setOnClickListener(  { itemsViews.get(position).highlight()   })

            Category cat = searchResult.getCategories().get(position);
            TextView txt = ((TextView)view.findViewById(R.id.name));
            txt.setText(cat.getName());
            return view;
        }

    }

On Nov 6, 10:19 pm, NY <[EMAIL PROTECTED]> wrote:
> Such as I click the the first select item
> but I want to highlight the second and the third
> Can I do this?
--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to