title: android listview onitemclick in viewpager
body: <p>I have a problem with onitemclick listener in my listview.
  My app has viewpager. On one (first - index 0) of my pages I have listview. When I click button (search), listview is filled with bluetooth devices. Then I can click on any of them and it works great, onitemclick fires and my viewpager changes view from 1 page to 3 pages, and app automaticly goes to second page (index 1). When I slide back to first page (0), I can still click on my bluetooth devices (ArrayAdapter, view in xml). It works always until I slide to my third page (index 2). When I go back from it to my first page, listeners stop working. Where could be the problem? If code needed witch one would You like me to upload? </p>
  
  <p>this is adapter code</p>
  
  <pre><code>@Override
  public View getView(int position, View convertView, ViewGroup parent){
      View v = convertView;
      if (v == null){
          LayoutInflater li = (LayoutInflater)ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          v = li.inflate(R.layout.bt_dev_list_item, null);
      }
      btListClass btlc = items.get(position);
  
      if (btlc != null){
          ((ImageView)v.findViewById(R.id.ivLed)).setImageResource(btlc.isOn ? R.drawable.led_green : R.drawable.led_yellow);
          ((TextView)v.findViewById(R.id.tvName)).setText(btlc.btD.getName());
      }
      return v;
  }
  </code></pre>
  
  <p>This is listview item xml code</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/llLI"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:background="@drawable/bt_dev_back_selector"
      android:orientation="horizontal" &gt;
  
      &lt;ImageView
          android:id="@+id/ivLed"
          android:layout_width="30dp"
          android:layout_height="30dp"
          android:layout_gravity="center_vertical"
          android:src="@drawable/led_red" /&gt;
  
      &lt;TextView
          android:id="@+id/tvName"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="10dp"
          android:text="Nazwa"
          android:textColor="#ccc"
          android:textSize="30sp" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>and this is xml code of my first page</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical" &gt;
  
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="72dp"
      android:background="@drawable/pager_bar_downb" &gt;
  
      &lt;Button
          android:id="@+id/bSearch"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:background="@drawable/selector_bottom_button"
          android:drawableLeft="@drawable/search_button_selector"
          android:drawablePadding="20dp"
          android:gravity="left|center_vertical"
          android:paddingBottom="5dp"
          android:paddingLeft="50dp"
          android:text="Szukaj"
          android:textColor="@drawable/search_button_text"
          android:textSize="34sp"
          android:textStyle="bold" /&gt;
  
  &lt;/LinearLayout&gt;
  
  &lt;ListView
      android:id="@+id/lvBtDevs"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginTop="4dp"
      android:choiceMode="singleChoice"
      android:drawSelectorOnTop="false"
      android:listSelector="@android:color/transparent" &gt;
  
  &lt;/ListView&gt;
  &lt;/LinearLayout&gt;
  </code></pre>