title: Listview setOnItemClickListener not working
body: <p>I have a listview of items, each item has some imagesviews and textviews. I've googled many solutions, but none of them helped me. I am very new to android development, I guess I am losing something obvious. I also assume that maybe I've tried too many solutions and they block each other somehow. Please, help me out.
  here is my code:</p>
  
  <pre><code>public class MyActivity extends Activity {
  private List&lt;Lesson&gt; lessons = new ArrayList&lt;Lesson&gt;();
  
  private int loop_count = 0;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      setContentView(R.layout.my_layout);
  
      FillLessonList();
      FillListView();
  }
      private void FillListView()
  {
      ArrayAdapter&lt;Lesson&gt; adapter = new MyListAdapter();
      ListView list = (ListView) findViewById(R.id.lessonsList);
      list.setAdapter(adapter);
  
      list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
          public void onItemClick(AdapterView&lt;?&gt; parent, View view,
                                  int position, long id) {
              Log.i("debug", "item click: " + view.findViewById(R.id.lesson_text_lesson_name));
  
              Toast.makeText(getApplicationContext(), "Your toast message.",
                      Toast.LENGTH_SHORT).show();
  
              Intent intent = new Intent(view.getContext(), LessonActivity.class);
              startActivity(intent);
          }
      });
  }
  
  private class MyListAdapter extends ArrayAdapter&lt;Lesson&gt;
  {
      MyListAdapter()
      {
          super(MyActivity.this, R.layout.lesson_item, lessons);
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          View lessonView = convertView;
          if(lessonView == null)
          {
              lessonView = getLayoutInflater().inflate(R.layout.lesson_item, parent, false);
          }
  
          Lesson currentLesson = lessons.get(position);
  
          //here I add all the needed info into the item.
          //This part works fine and displays everything I need properly.
  
          return lessonView;
      }
  </code></pre>
  
  <p>The only thing that is really logged with every click is:</p>
  
  <pre><code>05-18 17:10:57.158 29101-29101/h2d.drawteam.howtodraw D/AbsListView: Touch down: touch mode = 0,mScrollY = 0,y = 122.7923,mFirstPosition = 0,mActivePointerId = 0,mDataChanged = false,adatper size = 15,this = android.widget.ListView{32614ed4 VFED.VC. .F...... 60,0-1020,1599 #7f0d0076 app:id/lessonsList}
      05-18 17:10:57.258 29101-29101/h2d.drawteam.howtodraw D/AbsListView: CheckForTap:mFirstPosition = 0,mMotionPosition = 0,child = android.widget.RelativeLayout{3506a91f V.E..... ........ 0,0-960,225}
      05-18 17:10:57.293 29101-29101/h2d.drawteam.howtodraw D/AbsListView: Touch up: touch mode = 1,mScrollY = 0,mLastY = -2147483648,mMotionPosition = 0,mFirstPosition = 0,mDataChanged = false,adatper size = 15,this = android.widget.ListView{32614ed4 VFED.VC. .F...... 60,0-1020,1599 #7f0d0076 app:id/lessonsList}
  </code></pre>
  
  <p>Here is my main layout xml file:</p>
  
  <pre><code>    &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:background="@drawable/bg_clear"
  android:orientation="vertical"
  android:paddingTop="10dp"
  android:paddingBottom="10dp"&gt;
  
  &lt;LinearLayout
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:id="@+id/container_button_back"
      android:paddingRight="25dp"
      android:paddingLeft="25dp"
      android:paddingTop="5dp"
      android:paddingBottom="5dp"
      android:weightSum="1"&gt;
  
      &lt;Button
          android:layout_width="64dp"
          android:layout_height="31dp"
          android:id="@+id/button_back"
          android:background="@drawable/back_button_fit"
          android:maxHeight="50dp"
          android:maxWidth="80dp"
          android:adjustViewBounds="true"
          android:longClickable="false"
          android:enabled="false"
          android:focusable="false"
          android:focusableInTouchMode="false"
          android:singleLine="false" /&gt;
  
  &lt;/LinearLayout&gt;
  
  &lt;ImageView
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:id="@+id/imageView"
      android:src="@drawable/separator_1" /&gt;
  
  &lt;LinearLayout
      android:orientation="vertical"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/container_list"
      android:paddingLeft="20dp"
      android:paddingRight="20dp"
      android:paddingBottom="5dp"&gt;
  
      &lt;ListView
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:id="@+id/lessonsList"
          android:dividerHeight="0dp"
          android:divider="@null"
          android:descendantFocusability="blocksDescendants"/&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>And this is my list item xml file:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent" android:layout_height="match_parent"
  android:clickable="false"
  android:paddingLeft="0dp"
  android:paddingRight="10dp"&gt;
  
  &lt;ImageView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/lesson_icon"
      android:layout_alignParentTop="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true"
      android:src="@drawable/abc_btn_check_material"
      android:minHeight="75dp"
      android:minWidth="75dp"
      android:focusable="false"
      android:focusableInTouchMode="false"
      android:clickable="false"/&gt;
  
  
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceMedium"
      android:text="@string/default_lesson_name"
      android:id="@+id/lesson_text_lesson_name"
      android:layout_marginTop="17dp"
      android:layout_alignParentTop="true"
      android:textSize="18sp"
      android:maxLines="1"
      android:layout_toLeftOf="@+id/lesson_rate"
      android:layout_toRightOf="@+id/lesson_icon"
      android:layout_toEndOf="@+id/lesson_icon"
      android:focusable="false"
      android:focusableInTouchMode="false"
      android:clickable="false"/&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceSmall"
      android:text="@string/default_steps"
      android:id="@+id/lesson_text_steps"
      android:layout_below="@+id/lesson_text_lesson_name"
      android:layout_toRightOf="@+id/lesson_icon"
      android:layout_toEndOf="@+id/lesson_icon"
      android:textSize="12sp"
      android:focusable="false"
      android:focusableInTouchMode="false"
      android:clickable="false"/&gt;
  
  &lt;ImageButton
      android:layout_width="200dp"
      android:layout_height="wrap_content"
      android:id="@+id/lesson_rate"
      android:src="@drawable/rate1"
      android:baselineAlignBottom="false"
      android:background="#00000000"
      android:layout_above="@+id/lesson_text_steps"
      android:layout_alignParentRight="true"
      android:layout_alignParentEnd="false"
      android:paddingRight="10dp"
      android:adjustViewBounds="true"
      android:cropToPadding="false"
      android:scaleType="centerInside"
      android:focusable="false"
      android:focusableInTouchMode="false"
      android:clickable="false"/&gt;
  
  &lt;ImageButton
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:id="@+id/lesson_separator"
      android:src="@drawable/separator"
      android:background="#00000000"
      android:adjustViewBounds="true"
      android:layout_alignBottom="@+id/lesson_icon"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true"
      android:focusable="false"
      android:focusableInTouchMode="false"
      android:clickable="false"/&gt;
  </code></pre>
  
  <p></p>