title: TextView click listener not being called
body: <p>I'm trying to make a TextView on an android app clickable, but the listener isn't being called.</p>
  <pre><code>&lt;RelativeLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      android:id=&quot;@+id/fragment_oggi&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;&gt;
  
      &lt;TextView
          android:id=&quot;@+id/fragment_oggi_title_textview&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:paddingLeft=&quot;20dp&quot;
          android:paddingTop=&quot;20dp&quot;
          android:text=&quot;Oggi&quot;
          android:textStyle=&quot;bold&quot;
          android:textSize=&quot;25sp&quot; /&gt;
  
      &lt;ListView
          android:id=&quot;@+id/listView&quot;
          android:layout_width=&quot;fill_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:divider=&quot;@drawable/list_divider&quot;
          android:dividerHeight=&quot;21dp&quot;
          android:paddingTop=&quot;80dp&quot;
          android:paddingRight=&quot;5dp&quot;
          android:clickable=&quot;false&quot;/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  <p>That is the fragment, and I'm trying to make &quot;fragment_oggi_title_textview&quot; clickable.</p>
  <pre><code>@Nullable
  @Override
  public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState)  {
      View view = inflater.inflate(R.layout.fragment_oggi, container, false);
  
      view.post(() -&gt; {
          TextView textView = (TextView) MainActivity.getInstance().findViewById(R.id.fragment_oggi_title_textview);
  
          textView.setClickable(true);
          textView.setFocusable(true);
  
          formattedDate = format.format(calendar.getTime());
          textView.setText(String.format(&quot;Oggi (%s)&quot;, formattedDate));
  
          DatePickerDialog.OnDateSetListener dateListener = (view1, year, monthOfYear, dayOfMonth) -&gt; {
              calendar.set(Calendar.YEAR, year);
              calendar.set(Calendar.MONTH, monthOfYear);
              calendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);
  
              FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
              fragmentTransaction.detach(this);
              fragmentTransaction.attach(this);
              fragmentTransaction.commit();
              System.out.println(&quot;CLICK1!&quot;);
          };
  
          textView.setOnClickListener((View.OnClickListener) v -&gt; {
              new DatePickerDialog(MainActivity.getInstance(), dateListener, calendar
                      .get(Calendar.YEAR), calendar.get(Calendar.MONTH),
                      calendar.get(Calendar.DAY_OF_MONTH)).show();
              System.out.println(&quot;CLICK!&quot;);
          });
      });
  
      return view;
  }
  </code></pre>
  <p>That is my Fragment class. I'm setting the TextView clickable and focusable. Sadly, when I click on the TextView from an emulator and from an actual phone, the listener isn't called. The only time when it's called is when I select it with my keyboard and press it with the enter key. Does anyone have an idea of what I could be doing wrong?</p>
  <p>Edit: The TextVuew was being covered by the listview, which is why I couldn't click it.</p>