After doing a very quick read of your code snippet, move this code:
         // Bind the data to the new widget from the data from given list
         itemView.setName(device_list.get(position).getName());
         itemView.setText(device_list.get(position).getText());
         itemView.setIconImage(device_list.get(position).getIconImage());
      
         // Set the listener for the checkbox
         itemView.getCheckBox().setOnCheckedChangeListener(
            device_list.get(position));
         Log.i("DEBUG", "View is null---- " + itemView.getName());

*after *the if statement:

      // Check to see if the view is null and inflate it if so
      if (convertView == null)
      {     
         itemView = new CheckBoxItemView(app_context);
      
      }
      else
      {
         itemView = (CheckBoxItemView) convertView;
      }

      // Bind the data to the new widget from the data from given list
      itemView.setName(device_list.get(position).getName());
      itemView.setText(device_list.get(position).getText());
      itemView.setIconImage(device_list.get(position).getIconImage());
      
      // Set the listener for the checkbox
      itemView.getCheckBox().setOnCheckedChangeListener(
device_list.get(position));
      Log.i("DEBUG", "View is null---- " + itemView.getName());

-- 
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