title: Android - RecyclerView starts in the middle instead of the top
body: <p>There are several related posts here, but none are quite the same situation/none of the solutions have worked for me. </p>
  
  <p>I have a RecyclerView that loads in some data from Firebase. I'm using a custom adapter. The issue is that when the view loads in, it loads in at the middle of the RecyclerView. I then would have to scroll up to the top manually. </p>
  
  <p>My layout is very simple:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:tools="http://schemas.android.com/tools"
            xmlns:app="http://schemas.android.com/apk/res-auto"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:background="@color/grey"
            android:layout_marginBottom="50dp"
            &gt;
  
  &lt;android.support.v7.widget.RecyclerView
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:id="@+id/recycler_view_feed"
          android:layout_marginTop="10dp"
  &gt;
  
  &lt;/android.support.v7.widget.RecyclerView&gt;
  
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>After loading in my custom objects from Firebase, I set up the RecyclerView like this (this is in a method being called from onCreateView (it's a fragment)):</p>
  
  <pre><code>CompleteWorkoutRecyclerAdapter adapter = new CompleteWorkoutRecyclerAdapter(list, getContext(),
                                  getActivity());
  mRecyclerView.setAdapter(adapter);
  mRecyclerView.setHasFixedSize(false);
  linearLayoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, true);
  mRecyclerView.setLayoutManager(linearLayoutManager);
  </code></pre>
  
  <p>I've tried these things to fix the issue, with no luck:</p>
  
  <pre><code>linearLayoutManager.scrollToPosition(0);
  </code></pre>
  
  <p>and </p>
  
  <pre><code>mRecyclerView.scrollToPosition(0);
  </code></pre>
  
  <p>and </p>
  
  <pre><code>android:focusableInTouchMode="true"
  </code></pre>
  
  <p>Thanks for reading. If you guys need any more code I can post whatever you need</p>