title: CardView not shown in RecyclerView
body: <p>I have a problem which is driving me nuts. Basically it is a simple RecyclerView which displays a cardview. There are a lot of posts out there already, which I checked. I have assigned a LayoutManager as indicated here (<a href="https://stackoverflow.com/questions/37403478/recyclerview-not-displaying-any-cardview-items">RecyclerView Not Displaying Any CardView Items</a>) , I have implemented the getItemCount method as explained here (<a href="https://stackoverflow.com/questions/33205813/card-view-not-showing-up">card view not showing up</a>), and I changed to the following versions (changing version was suggested here <a href="https://stackoverflow.com/questions/26648320/recyclerview-of-cards-not-showing-anything">RecyclerView of cards not showing anything</a>):</p>
  
  <pre><code>compile 'com.android.support:support-v4:24.0.0'
  compile 'com.android.support:cardview-v7:24.0.0'
  compile 'com.android.support:recyclerview-v7:24.0.0'
  </code></pre>
  
  <p>I also did the notifyDataSetChanged() as indicated here (<a href="https://stackoverflow.com/questions/37403478/recyclerview-not-displaying-any-cardview-items">RecyclerView Not Displaying Any CardView Items</a>). However, nothing fixed it for me.</p>
  
  <p>I have an Activity which has the following code (only relevant sections, getDummyData returns a List with 1 dummy data):</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      DatabaseHelper databaseHelper = new DatabaseHelper(getApplicationContext());
  
      setContentView(R.layout.activity_overview);
      Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
      setSupportActionBar(toolbar);
      RecyclerView rv = (RecyclerView) findViewById(R.id.rv);
      rv.setHasFixedSize(true);
      LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
      linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
      rv.setLayoutManager(linearLayoutManager);
  
      RVAdapter adapter = new RVAdapter(getDummyData());
      rv.setAdapter(adapter);
      FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
      fab.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                      .setAction("Action", null).show();
          }
      });
      adapter.notifyDataSetChanged();
  
  }
  
  
  public class RVAdapter extends RecyclerView.Adapter&lt;RVAdapter.DocumentViewHolder&gt; {
  
      List&lt;Document&gt; DocumentList;
  
      public RVAdapter(List&lt;Document&gt; Documents) {
          this.DocumentList = Documents;
      }
  
      @Override
      public DocumentViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.document_item, parent, false);
          DocumentViewHolder pvh = new DocumentViewHolder(v);
          return pvh;
      }
  
      @Override
      public void onBindViewHolder(DocumentViewHolder DocumentViewHolder, int i) {
          DocumentViewHolder.Date.setText(DocumentList.get(i).getCreatedFormatted());
          DocumentViewHolder.participants.setText(DocumentList.get(i).getParticipants(getApplicationContext()));
          DocumentViewHolder.counterOfItems.setText(DocumentList.get(i).getcounterOfItems(getApplicationContext()) + StringUtils.EMPTY);
      }
  
      @Override
      public void onAttachedToRecyclerView(RecyclerView recyclerView) {
          super.onAttachedToRecyclerView(recyclerView);
      }
  
      @Override
      public int getItemCount() {
  
          //return DocumentList.size();
      return 1;
      }
  
      public class DocumentViewHolder extends RecyclerView.ViewHolder {
          TextView Date;
          TextView participants;
          TextView ideasPreview;
          TextView counterOfItems;
          ImageView Photo;
  
          public DocumentViewHolder(View itemView) {
              super(itemView);
              Date = (TextView) itemView.findViewById(R.id._date);
              participants = (TextView) itemView.findViewById(R.id.participants);
              ideasPreview = (TextView) itemView.findViewById(R.id.ideas_preview);
              counterOfItems = (TextView) itemView.findViewById(R.id.counter_of_items);
              Photo = (ImageView) itemView.findViewById(R.id._photo);
          }
      }
  
  
  }
  </code></pre>
  
  <p>And I have a Document_item - xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &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;android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
      android:id="@+id/card_view"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_gravity="center"
      card_view:cardCornerRadius="@dimen/_card_corner"&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="horizontal"&gt;
  
          &lt;ImageView
              android:id="@+id/_photo"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_weight="0.25" /&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:gravity="center_horizontal"
              android:orientation="vertical"
              android:paddingBottom="@dimen/activity_vertical_margin"
              android:paddingEnd="@dimen/activity_horizontal_margin"
              android:paddingStart="@dimen/activity_horizontal_margin"
              android:paddingTop="@dimen/activity_vertical_margin"&gt;
  
              &lt;TextView
                  android:id="@+id/_date"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:text="21st June 2016" /&gt;
  
              &lt;TextView
                  android:id="@+id/participants"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:text="Thomas, Christian and Johann" /&gt;
  
              &lt;TextView
                  android:id="@+id/counter_of_items"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:text="Thomas, Christian and Johann" /&gt;
  
              &lt;TextView
                  android:id="@+id/ideas_preview"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:text="Hello, Test, Test, Test" /&gt;
  
          &lt;/LinearLayout&gt;
      &lt;/LinearLayout&gt;
  &lt;/android.support.v7.widget.CardView&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>The activity's xml looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.design.widget.CoordinatorLayout     
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:fitsSystemWindows="true"
  tools:context="com.chmaurer.idea.OverviewActivity"&gt;
  
  &lt;android.support.design.widget.AppBarLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:theme="@style/AppTheme.AppBarOverlay"&gt;
  
      &lt;android.support.v7.widget.Toolbar
          android:id="@+id/toolbar"
          android:layout_width="match_parent"
          android:layout_height="?attr/actionBarSize"
          android:background="?attr/colorPrimary"
          app:popupTheme="@style/AppTheme.PopupOverlay" /&gt;
  
  &lt;/android.support.design.widget.AppBarLayout&gt;
  
  &lt;android.support.v7.widget.RecyclerView
      android:id="@+id/rv"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  &lt;/android.support.v7.widget.RecyclerView&gt;
  
  &lt;android.support.design.widget.FloatingActionButton
      android:id="@+id/fab"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="bottom|end"
      android:layout_margin="@dimen/fab_margin"
      android:src="@drawable/ic_playlist_add_white_24dp" /&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>The code is compiling and executing normally, but no cards are shown. I have tried a few hour for myself now, but it is definitely the point where I'd be glad to have a hint...</p>