@SuppressLint("NewApi")
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.activity_stickylistheaders, container, false);
    StickyListHeadersListView listView =
        (StickyListHeadersListView) rootView.findViewById(R.id.activity_stickylistheaders_listview);
    listView.setFitsSystemWindows(true);

    AlphaInAnimationAdapter animationAdapter;

    MyStickyListHeadersTravelAdapter adapterTravel =
        new MyStickyListHeadersTravelAdapter(getActivity().getApplicationContext());
    animationAdapter = new AlphaInAnimationAdapter(adapterTravel);

    StickyListHeadersAdapterDecorator stickyListHeadersAdapterDecorator =
        new StickyListHeadersAdapterDecorator(animationAdapter);
    stickyListHeadersAdapterDecorator.setListViewWrapper(
        new StickyListHeadersListViewWrapper(listView));
    assert animationAdapter.getViewAnimator() != null;
    animationAdapter.getViewAnimator().setInitialDelayMillis(500);
    assert stickyListHeadersAdapterDecorator.getViewAnimator() != null;
    stickyListHeadersAdapterDecorator.getViewAnimator().setInitialDelayMillis(500);
    listView.setAdapter(stickyListHeadersAdapterDecorator);

    return rootView;
  }