title: Linear Layout onclick listener not working with recycle view
body: <p>I have a problem with Recycleview in linearLayout. In the below code When I click on chat section(Linear Layout) Toast is not getting visible when I set LayoutManager to RecycleView. Please help me the toast will be visible when I click on linear layout.</p>
  
  <p>Activity code:</p>
  
  <pre><code>public class PracticeActivity extends AppCompatActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_practice);
          setLayoutViews();
      }
  
      private void setLayoutViews(){
  
          // setting up messages list view
          RecyclerView mMessagesView = (RecyclerView) findViewById(R.id.messages);
  
          // if i uncomment below line Toast will not be visible.
          //mMessagesView.setLayoutManager(new LinearLayoutManager(this));
  
          (findViewById(R.id.chat_section)).setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  Toast.makeText(PracticeActivity.this, " Chat section was clicked", Toast.LENGTH_SHORT).show();
              }
          });
      }
  </code></pre>
  
  <p>activity_practice.xml</p>
  
  <pre><code>&lt;RelativeLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      android:id="@+id/activity_main"&gt;
          &lt;LinearLayout
              android:id="@+id/chat_section"
              android:layout_width="match_parent"
              android:layout_height="320dp"
              android:background="@color/chat_back_ground"&gt;
              &lt;android.support.v7.widget.RecyclerView
                  android:id="@+id/messages"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:paddingLeft="@dimen/activity_horizontal_margin"
                  android:paddingRight="@dimen/activity_horizontal_margin"
                  android:scrollbars="vertical"
                  android:scrollbarStyle="outsideOverlay"/&gt;
          &lt;/LinearLayout&gt;
  
         &lt;TextView
             android:layout_below="@id/chat_section"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:text="Just text"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>