tags:

views:

11

answers:

0

Hi, I want to change the background of list view when the particular list item is clicked. I am passing a layout xml file to the ArrayAdaptor. as follows

public View getView(final int position, View convertView,ViewGroup parent) {

   LayoutInflater inflater=context.getLayoutInflater();
   if(convertView == null){

    convertView = inflater.inflate(R.layout.testrows, parent,false);
    holder = new ViewHolder();
    holder.text = (TextView)convertView.findViewById(R.id.powerbuyfilter1Label);
    holder.icon = (ImageView)convertView.findViewById(R.id.powerbuyfilter1Icon);
    holder._btnAvail = (ImageView)convertView.findViewById(R.id.powerbuyAvail);
    holder._btnBuy = (ImageView)convertView.findViewById(R.id.powerbuyBuy);

    convertView.setTag(holder);
   }
   else {
     holder = (ViewHolder) convertView.getTag();
    }

now i want to chage the background of testrows xml file to some different color on clicking on it and also i want the boolean array to track the list items.

can anyone solve this probelm....thanks in advance..

related questions