I have developed an `ListView` into a dialog pop up, everything is working fine - listener for `Spinner` and `CheckBox`. I can access which element has changed value: 

for spinner:

```
  @Override
    public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
        Log.d("MyLog", "SPINNER at position: " + pos + " changed value to: " + parent.getItemAtPosition(pos));

    }

```

and for check box:

```
    @Override
    public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
            Log.d("MyLog", "changed value - is checked: " + isChecked);
        }

```

But **how** **can I accews title** - `TextView` of each `ListView` element, for example to set error if spinner changed element or checkBox changed state?

The view is look like:
[![enter image description here](https://i.stack.imgur.com/UN67m.png)](https://i.stack.imgur.com/UN67m.png)

**My whole code:**
xml base layout

```
    <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/dialog_base"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <RelativeLayout
        android:id="@+id/title_dialog_zone"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#30883D">

        <ImageView
            android:id="@+id/dialog_imgView"
            android:layout_width="32dp"
            android:layout_height="32dp"
            android:layout_margin="@dimen/material_margin_medium"
            android:src="@android:drawable/ic_dialog_alert" />

        <TextView
            android:id="@+id/dialog_base_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignBottom="@+id/dialog_imgView"
            android:layout_alignParentEnd="true"
            android:layout_alignParentRight="true"
            android:layout_alignRight="@+id/dialog_imgView"
            android:layout_toEndOf="@+id/dialog_imgView"
            android:layout_toRightOf="@+id/dialog_imgView"
            android:clickable="true"
            android:focusable="true"
            android:focusableInTouchMode="true"
            android:singleLine="true"
            android:text="@string/txt_sys_dialog_caution"
            android:textAppearance="?android:attr/textAppearanceMedium" />
    </RelativeLayout>

    <ListView
        android:id="@+id/dialog_listView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/view_delimiter"
        android:layout_gravity="center_horizontal"
        android:paddingBottom="@dimen/material_margin_medium" />

</RelativeLayout>

```

custom element - can be TextView+TextView / TextView+CheckBox / TextView+Spinner:

```
 <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <TextView
        android:id="@+id/dialog_element_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="@dimen/material_margin"
        android:layout_marginStart="@dimen/material_margin"
        android:clickable="true"
        android:focusable="true"
        android:focusableInTouchMode="true"
        android:text="Ttitle Text"
        android:textAppearance="?android:attr/textAppearanceMedium" />

    <TextView
        android:id="@+id/dialog_txtView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/dialog_element_title"
        android:layout_marginBottom="@dimen/material_margin_medium"
        android:layout_marginEnd="@dimen/material_margin"
        android:layout_marginLeft="@dimen/material_margin_large"
        android:layout_marginRight="@dimen/material_margin"
        android:layout_marginStart="@dimen/material_margin_large"
        android:hint="Here it is" />

    <CheckBox
        android:id="@+id/dialog_checkBox"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/dialog_element_title"
        android:layout_marginBottom="@dimen/material_margin_medium"
        android:layout_marginLeft="@dimen/material_margin_large"
        android:layout_marginStart="@dimen/material_margin_large"
        android:checked="false"
        android:text="Do your choise" />

    <Spinner
        android:id="@+id/dialog_spinner"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/dialog_element_title"
        android:layout_gravity="center_horizontal"
        android:layout_marginBottom="@dimen/material_margin_medium"
        android:layout_marginEnd="@dimen/material_margin"
        android:layout_marginLeft="@dimen/material_margin_large"
        android:layout_marginRight="@dimen/material_margin"
        android:layout_marginStart="@dimen/material_margin_large"
        android:background="#8E8276"
        android:popupBackground="#8E8276"
        android:spinnerMode="dropdown" />

</RelativeLayout>

```

My dialog creation code is very long, but idea is to set up `BaseAdapter` using a JSON obj I choose what kind of view do I need to add in `ListView`. And I have adapters for `CheckBox` and `Spinner`.