title: Action bar moving down while replacing with fragment
body: <p>I am adding a fragment to activity, and then i am replacing that fragment with the second fragment.After replacing the second fragment action bar is slightly moving down like this
  <a href="https://i.stack.imgur.com/A8Wri.png" rel="noreferrer"><img src="https://i.stack.imgur.com/A8Wri.png" alt="enter image description here"></a></p>
  
  <p>My Activity code</p>
  
  <pre><code>public class MyActivity extends AppCompatActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.meetinglist_activity);
      Fragment first_fragment = new FirstFragment();
      FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
      ft.add(R.id.content_frame, first_fragment).commit();
       }
  </code></pre>
  
  <p>Replacing second fragment in the first fragment's button click</p>
  
  <pre><code>public class Firstfragment extends Fragment  {
  
  
  FloatingActionButton new_fab;
  
  @Nullable
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  
      View list_view=inflater.inflate(R.layout.meetingslist_fragment,container,false);
      new_fab=(FloatingActionButton)list_view.findViewById(R.id.meeting_new);
      new_fab.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
              Fragment second_fragment = new SecondFragment();
              FragmentTransaction ft =getActivity().getSupportFragmentManager().beginTransaction();
              ft.replace(R.id.content_frame, second_fragment).commit();
    }
  </code></pre>
  
  <p>Activity layout</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
   &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:orientation="vertical" android:layout_width="match_parent"
   android:layout_height="match_parent"&gt;
   &lt;FrameLayout
      android:id="@+id/content_frame"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;&lt;/FrameLayout&gt;
     &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Fragment's Xml</p>
  
  <pre><code>&lt;!--First Layout--&gt;
  &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"&gt;
  
  &lt;android.support.design.widget.FloatingActionButton
      android:id="@+id/meeting_new"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="bottom|end"
      android:layout_margin="@dimen/fab_margin"
      android:src="@android:drawable/ic_dialog_email" /&gt;
  
      &lt;/android.support.design.widget.CoordinatorLayout&gt;
  
  
   &lt;!--Second Layout--&gt;
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical" android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceLarge"
      android:text="Large Text"
      android:gravity="center"
      android:id="@+id/textView"
      android:layout_gravity="center_horizontal" /&gt;
      &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>I am using  <strong>android.support.v4.app.Fragment;</strong></p>
  
  <p>I am using Android Studio version2.0 and latest API levels.</p>
  
  <p>Can anybody help me? Thanks in advance. </p>