title: Why match_parent doesn't work when recycler view item root is LinearLayout?
body: <p>I simplified the code to show the issue</p>
  
  <p>Mainactivity.java</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
      private RecyclerView mRecyclerView;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          mRecyclerView = (RecyclerView) findViewById(R.id.recycler_view);
  
          ItemData itemsData[] = { new ItemData("test 1"),
                  new ItemData("test 2"),
                  new ItemData("test 3")};
  
          mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
          MyAdapter mAdapter = new MyAdapter(itemsData, this);
          mRecyclerView.setAdapter(mAdapter);
          mRecyclerView.setItemAnimator(new DefaultItemAnimator());
      }
  }
  </code></pre>
  
  <p>MyAdapter.java</p>
  
  <pre><code>public class MyAdapter extends RecyclerView.Adapter&lt;MyAdapter.ViewHolder&gt; {
      static Context mContext;
      private ItemData[] itemsData;
  
      public MyAdapter(ItemData[] itemsData, Context context) {
          this.itemsData = itemsData;
          mContext = context;
      }
  
      @Override
      public MyAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          View itemLayoutView = LayoutInflater.from(parent.getContext())
              .inflate(R.layout.item_layout, null);
  
          ViewHolder viewHolder = new ViewHolder(itemLayoutView);
          return viewHolder;
      }
  
      @Override
      public void onBindViewHolder(ViewHolder viewHolder, int position) {
          viewHolder.txtViewTitle.setText(itemsData[position].getTitle());
      }
  
      public static class ViewHolder extends RecyclerView.ViewHolder {
          public TextView txtViewTitle;
  
          public ViewHolder(View itemLayoutView) {
              super(itemLayoutView);
              txtViewTitle = (TextView)     itemLayoutView.findViewById(R.id.item_title);
          }
      }
  
      @Override
      public int getItemCount() {
          return itemsData.length;
      }
  }
  </code></pre>
  
  <p>ItemData.java</p>
  
  <pre><code>public class ItemData {
      private String title;
  
      public String getTitle() {
          return title;
      }
  
      public void setTitle(String title) {
          this.title = title;
      }
  
      public ItemData(String title){
          this.title = title;
      }
  }
  </code></pre>
  
  <p>activity_main.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:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      android:paddingBottom="@dimen/activity_vertical_margin"     tools:context=".MainActivity"&gt;
  
      &lt;android.support.v7.widget.RecyclerView
          android:id="@+id/recycler_view"
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
  
      &lt;/android.support.v7.widget.RecyclerView&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>item_layout.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="80dp"&gt;
  
      &lt;TextView
          android:id="@+id/item_title"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:textColor="@android:color/background_dark"
          android:background="@android:color/holo_blue_bright"
          android:layout_marginLeft="8dp"
          android:layout_marginRight="8dp"
          android:layout_marginTop="8dp"
          android:textSize="22dp" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>When I change LinearLayout to RelativeLayout in item_layout.xml it works fine, but when I use LinearLayout it ignores match_parent.
  I need to make it work without changing LinearLayout to RelativeLayout.</p>