Cannot scroll RecyclerView inside a Fragment?
<p>I am having troubles integrating a RecyclerView (using cardviews for the rows) inside a fragment. For some reason I cannot scroll the card view? Please, any suggestions?</p>

<p>This is my app design:</p>

<p><a href="https://i.stack.imgur.com/Q701P.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q701P.gif" alt="enter image description here"></a></p>

<p>This is my fragment code:</p>

<pre><code>public class PageFragment2 extends Fragment {
public static final String ARG_PAGE2 = "ARG_PAGE";
private int mPage2;

public static PageFragment2 newInstance(int page) {
    Bundle args = new Bundle();
    args.putInt(ARG_PAGE2, page);
    PageFragment2 fragment = new PageFragment2();
    fragment.setArguments(args);
    return fragment;
}

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mPage2 = getArguments().getInt(ARG_PAGE2);

    Log.d("MainActivity", "onCreate" + mPage2);
}

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_page2,container,false);

    RecyclerView recList = (RecyclerView) view;
    recList.setHasFixedSize(true);
    LinearLayoutManager llm = new LinearLayoutManager(getActivity());
    recList.setLayoutManager(llm);

    ArrayList&lt;String&gt; names = new ArrayList&lt;&gt;();
    names.add("Georgi Koemdzhiev");
    names.add("Mariya Menova");
    names.add("Simeon Simeonov");
    names.add("Ivan Dqkov");
    names.add("Dymityr Vasilev");
    names.add("Petar Dimov");
    CardAdapter adapter = new CardAdapter(names);

    recList.setAdapter(adapter);
    Log.d("MainActivity","onCreateView" + mPage2);
    return view;
}
}
</code></pre>

<p>This is my fragment XML code:</p>

<pre><code>&lt;android.support.v7.widget.RecyclerView
android:id="@+id/cardList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="true"
xmlns:android="http://schemas.android.com/apk/res/android"/&gt;
</code></pre>

<p>My activity_main layout:</p>

<pre><code>&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="koemdzhiev.com.newtablayouttest.MainActivity"&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.TabLayout
        android:id="@+id/sliding_tabs"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/&gt;

    &lt;android.support.v4.view.ViewPager
        android:id="@+id/viewpager"
        android:layout_width="match_parent"
        android:layout_height="0px"
        android:layout_weight="1"
        android:background="@android:color/white" /&gt;

&lt;/android.support.design.widget.AppBarLayout&gt;

&lt;include layout="@layout/content_main"/&gt;
</code></pre>

<p></p>