title: CollapsingToolbarLayout collapsed title has bad position
body: <p>I have a straight forward CollapsingToolbarLayout.
  It works fine so far but if I collapse the toolbar the title's position isn't centered vertically.</p>
  
  <p>Here is my 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"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:fitsSystemWindows="true"&gt;
  
  
  &lt;android.support.design.widget.AppBarLayout
      android:id="@+id/app_bar_layout"
      android:layout_width="match_parent"
      android:layout_height="@dimen/appbar_header_height_expanded"
      android:fitsSystemWindows="true"
      android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"&gt;
  
      &lt;android.support.design.widget.CollapsingToolbarLayout
          android:id="@+id/collapsing_toolbar"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:fitsSystemWindows="true"
          app:contentScrim="?attr/colorPrimary"
          app:expandedTitleMarginEnd="64dp"
          app:expandedTitleMarginStart="48dp"
          app:layout_scrollFlags="scroll|exitUntilCollapsed"&gt;
  
          &lt;ImageView
              android:id="@+id/image"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:fitsSystemWindows="true"
              android:scaleType="centerCrop"
              android:src="@drawable/placekitten_1"
              app:layout_collapseMode="parallax" /&gt;
  
          &lt;android.support.v7.widget.Toolbar
              android:id="@+id/toolbar"
              android:layout_width="match_parent"
              android:layout_height="?attr/actionBarSize"
              app:layout_collapseMode="pin"
              app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /&gt;
      &lt;/android.support.design.widget.CollapsingToolbarLayout&gt;
  
  
  &lt;/android.support.design.widget.AppBarLayout&gt;
  
  
  &lt;android.support.v4.widget.NestedScrollView
      android:id="@+id/scroll"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:clipToPadding="false"
      app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;
  
      &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="Text" /&gt;
  
  &lt;/android.support.v4.widget.NestedScrollView&gt;
  </code></pre>
  
  <p></p>
  
  <p>Have a look on my screenshots, so you can see how it behaves at the two states.</p>
  
  <p><a href="https://i.stack.imgur.com/KYtgC.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/KYtgC.jpg" alt="expanded toolbar"></a></p>
  
  <p>Here is the collapsed Toolbar's problem with the title.</p>
  
  <p><a href="https://i.stack.imgur.com/H6naR.png" rel="noreferrer"><img src="https://i.stack.imgur.com/H6naR.png" alt="enter image description here"></a></p>
  
  <p>I have this in my BaseFragment to set my toolbar at the actual Fragment:</p>
  
  <pre><code>protected void setToolbar(View view, int resource, String title, String subtitle) {
      Toolbar toolbar = view.findViewById(resource);
      ((AppCompatActivity) getActivity()).setSupportActionBar(toolbar);
      ((AppCompatActivity) getActivity()).getSupportActionBar().setTitle(title);
      ((AppCompatActivity) getActivity()).getSupportActionBar().setSubtitle(subtitle);
  }
  </code></pre>
  
  <p>So I found out,..
  If I show a Snackbar then the title jumps to the right position and the expand/collaps works fine! So any ideas why it works after showing a Snackbar?</p>
  
  <pre><code>View view = findViewById(R.id.content_frame);
      Snackbar mySnackbar = Snackbar.make(view, text, Snackbar.LENGTH_LONG);
      mySnackbar.getView().setBackgroundColor(getResources().getColor(color));
      mySnackbar.show();
  </code></pre>
  
  <p>And content_frame.xml is the root layout for the main activity:</p>
  
  <pre><code>&lt;android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/content_frame"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:fitsSystemWindows="true" /&gt;
  </code></pre>
  
  <p>any ideas?</p>