I'm struggling with getting more than just one value from a custom made list.  

I can get the "main" value out of it thanks to `getItem(int pos)`, but since I'm storing multiple values for one row (row meaning each `CustomList` in a `TableView`), I'd like to be able to get the corresponding values to the label I'm able to pull out.

I'm sure this is simpler than I'm making it out to be, so I'm hoping someone has done this before.

I've got a `CustomList` class,

```
public class CustomList extends ArrayAdapter<String>{

    private final Activity context;
    private final String[] labels;
    private final Integer[] imageId;
    private final String[] identifier;
    public CustomList(Activity context,
                      String[] labels, Integer[] imageId, String[] id) {
        super(context, R.layout.list_single, labels);
        this.context = context;
        this.labels = labels;
        this.imageId = imageId;
        this.identifier = id;

    }
    @Override
    public View getView(int position, View view, ViewGroup parent) {
        LayoutInflater inflater = context.getLayoutInflater();
        View rowView= inflater.inflate(R.layout.list_single, null, true);

        TextView txtTitle = (TextView) rowView.findViewById(R.id.txt);
        TextView idTitle = (TextView) rowView.findViewById(R.id.identifier);
        ImageView imageView = (ImageView) rowView.findViewById(R.id.img);

        txtTitle.setText(labels[position]);
        idTitle.setText(identifier[position]);
        imageView.setImageResource(imageId[position]);

        return rowView;
    }

    public String getKey(int position, int category) {
        LayoutInflater inflater = context.getLayoutInflater();
        View rowView= inflater.inflate(R.layout.list_single, null, true);

        TextView txtTitle = (TextView) rowView.findViewById(R.id.txt);
        TextView idTitle = (TextView) rowView.findViewById(R.id.identifier);
        ImageView imageView = (ImageView) rowView.findViewById(R.id.img);

        if (category == 1) {
            return idTitle.getText().toString();
        } else if (category == 2) {
            return "url:();";
        } else {
            return this.getItem(position);
        }
    }
}

```

**Note**: `getKey` is a tired, last attempt of getting values out of this `ListView/CustomList` data.  

I can't for the love of it call that function in any way, shape or form.

Here's how I use this `CustomList`,

```
CustomList adapter = new
                    CustomList(MainActivity.this, urls, images, identifiers);
list=(ListView)findViewById(R.id.listView1);
list.setAdapter(adapter);

```

Fairly straight forward, now later in the code - more specifically on a Button - I want to access the data stored in the List.  

I do this by doing the following:

(This is where I bump into a mind bender)

```
list=(ListView)findViewById(R.id.listView1);
ListView listView = (ListView)findViewById(R.id.listView1);
ListAdapter table = listView.getAdapter();

for(int i = 0; i < table.getCount(); i++){
    Object row = table.getItem(i);
    Log.i("Test", row.toString());
}

```

What I get out of this is the `CustomList.labels[i]` value, which isn't all to odd seeing as I assume this invokes `getItem` of `ArrayAdapter`.

I tried doing a `@Override` on `getItem` as well but as it only takes one argument, that is `position`, I wasn't familiar enough with Java to get that working for me.

Any Idea how I could go about getting either the `imageId` or `identifier` variables from each row item of `listView1`?

In case you need the `list_single.xml` which is the layout of `listView1` (at least, that's my interpretation of what this file does), here it is:

```
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >
    <TableRow>
        <ImageView
            android:id="@+id/img"
            android:layout_width="50dp"
            android:layout_height="50dp"/>

        <TextView
            android:id="@+id/identifier"
            android:layout_width="wrap_content"
            android:visibility="invisible"
            android:layout_height="50dp" />

        <TextView
            android:id="@+id/txt"
            android:layout_width="wrap_content"
            android:layout_height="50dp" />

    </TableRow>
</TableLayout>

```