Access the various elements of each items in a custom item list
I have a custom list in android, this list has a text editor and a check box for each element, I want a method to get the data and the status of each element, and save these in an array of Movie objects, where movie is *Movie(String description, boolean status)*

My custom ListAdapter is

        public class CustomAdapter extends ArrayAdapter<String> {
        
           private HashMap<Integer, Boolean> movieCollection =
                    new HashMap<Integer, Boolean>();
        
           private String[] data;
        
           public CustomAdapter(Context context) {
              super(context, R.layout.movie_item, android.R.id.text1, context
                       .getResources().getStringArray(R.array.movies));
        
              data =
                       context.getResources().getStringArray(R.array.movie_thumbs);
           }
        
           public void toggleMovie(int position) {
              if (!isInCollection(position)) {
                 movieCollection.put(position, true);
              } else {
                 movieCollection.put(position, false);
              }
           }
        
           public boolean isInCollection(int position) {
              return movieCollection.get(position) == Boolean.TRUE;
           }
    
       @Override
       public View getView(int position, View convertView, ViewGroup parent) {
          View listItem = super.getView(position, convertView, parent);
    
          CheckBox checkMark =
                   (CheckBox) listItem.findViewById(android.R.id.check_movie);
          checkMark.setChecked(isInCollection(position));
    
          EditText editText = (EditText) listItem.findViewById(R.id.movie_description;
          editText.setTag(position);
          String textUrl = this.data[position];
          new DownloadTask(position, editText).execute(editText);
    
          return listItem;
       }
    }



Access the various elements of each items in a custom item list
===

I have a custom list in android, this list has a text editor and a check box for each element, I want a method to get the data and the status of each element, and save these in an array of Movie objects, where movie is *Movie(String description, boolean status)*

My custom ListAdapter is

        public class CustomAdapter extends ArrayAdapter<String> {
        
           private HashMap<Integer, Boolean> movieCollection =
                    new HashMap<Integer, Boolean>();
        
           private String[] data;
        
           public CustomAdapter(Context context) {
              super(context, R.layout.movie_item, android.R.id.text1, context
                       .getResources().getStringArray(R.array.movies));
        
              data =
                       context.getResources().getStringArray(R.array.movie_thumbs);
           }
        
           public void toggleMovie(int position) {
              if (!isInCollection(position)) {
                 movieCollection.put(position, true);
              } else {
                 movieCollection.put(position, false);
              }
           }
        
           public boolean isInCollection(int position) {
              return movieCollection.get(position) == Boolean.TRUE;
           }
    
       @Override
       public View getView(int position, View convertView, ViewGroup parent) {
          View listItem = super.getView(position, convertView, parent);
    
          CheckBox checkMark =
                   (CheckBox) listItem.findViewById(android.R.id.check_movie);
          checkMark.setChecked(isInCollection(position));
    
          EditText editText = (EditText) listItem.findViewById(R.id.movie_description;
          editText.setTag(position);
          String textUrl = this.data[position];
          new DownloadTask(position, editText).execute(editText);
    
          return listItem;
       }
    }


