content: package yifeiyuan.practice.practicedemos.materialsupport;
  
  
  import android.app.Fragment;
  import android.os.Bundle;
  import android.support.design.widget.AppBarLayout;
  import android.support.design.widget.CollapsingToolbarLayout;
  import android.support.v7.widget.Toolbar;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  
  import butterknife.ButterKnife;
  import butterknife.InjectView;
  import yifeiyuan.practice.practicedemos.R;
  import yifeiyuan.practice.practicedemos.base.BaseFragment;
  
  /**
   * A simple {@link Fragment} subclass.
   */
  public class InfoFragment extends BaseFragment {
  
  
      @InjectView(R.id.toolbar)
      Toolbar mToolbar;
      @InjectView(R.id.collapsing_toolbar)
      CollapsingToolbarLayout mCollapsingToolbar;
      @InjectView(R.id.appbar)
      AppBarLayout mAppbar;
  
      public InfoFragment() {
          // Required empty public constructor
      }
  
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          // Inflate the layout for this fragment
          View view = inflater.inflate(R.layout.fragment_info, container, false);
          ButterKnife.inject(this, view);
          return view;
      }
  
  
      @Override
      protected void init(Bundle savedInstanceState) {
  
          //Notice 必须要自己设置
          mCollapsingToolbar.setTitle("程序亦非猿");
      }
  
      @Override
      public void onDestroyView() {
          super.onDestroyView();
          ButterKnife.reset(this);
      }
  
  }
  