package org.wikipedia.overhaul;

import android.location.Location;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import org.wikipedia.R;
import org.wikipedia.history.HistoryEntry;
import org.wikipedia.history.HistoryFragment;
import org.wikipedia.nearby.NearbyFragment;
import org.wikipedia.overhaul.navtab.NavViewPagerAdapter;
import org.wikipedia.page.PageTitle;
import org.wikipedia.readinglist.ReadingListsFragment;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;

public class OverhaulFragment extends Fragment implements NearbyFragment.Callback,
        HistoryFragment.Callback, ReadingListsFragment.Callback {
    @BindView(R.id.fragment_overhaul_view_pager) ViewPager viewPager;
    private Unbinder unbinder;

    public static OverhaulFragment newInstance() {
        return new OverhaulFragment();
    }

    @Nullable @Override public View onCreateView(LayoutInflater inflater,
                                                 @Nullable ViewGroup container,
                                                 @Nullable Bundle savedInstanceState) {
        super.onCreateView(inflater, container, savedInstanceState);
        View view = inflater.inflate(R.layout.fragment_overhaul, container, false);
        unbinder = ButterKnife.bind(this, view);
        viewPager.setAdapter(new NavViewPagerAdapter(getFragmentManager()));

        return view;
    }

    @Override public void onDestroyView() {
        unbinder.unbind();
        unbinder = null;
        super.onDestroyView();
    }

    @Override public void onLoading() {
        // todo: [overhaul] update loading indicator.
    }

    @Override public void onLoaded() {
        // todo: [overhaul] update loading indicator.
    }

    @Override public void onLoadPage(PageTitle title, int entrySource, @Nullable Location location) {
        // todo: [overhaul] show link preview.
    }

    @Override public void onLoadPage(PageTitle title, HistoryEntry entry) {
        // todo: [overhaul] show link preview.
    }

    @Override public void onClearHistory() {
        // todo: [overhaul] clear history.
    }
}
@@ -330,16 +330,199 @@
 edia.R;%0A
+import org.wikipedia.feed.FeedFragment;%0Aimport org.wikipedia.feed.image.FeaturedImage;%0Aimport org.wikipedia.feed.image.FeaturedImageCard;%0Aimport org.wikipedia.feed.news.NewsItemCard;%0A
 import o
@@ -556,16 +556,16 @@
 yEntry;%0A
-
 import o
@@ -946,22 +946,20 @@
 lements 
-Nearby
+Feed
 Fragment
@@ -976,16 +976,41 @@
 %0A       
+ NearbyFragment.Callback,
  History
@@ -1905,16 +1905,16 @@
 = null;%0A
-
         
@@ -1935,32 +1935,1066 @@
 yView();%0A    %7D%0A%0A
+    @Override public void onFeedSearchRequested() %7B%0A        // todo: %5Boverhaul%5D search.%0A    %7D%0A%0A    @Override public void onFeedVoiceSearchRequested() %7B%0A        // todo: %5Boverhaul%5D voice search.%0A    %7D%0A%0A    @Override public void onFeedSelectPage(HistoryEntry entry) %7B%0A        // todo: %5Boverhaul%5D load page.%0A    %7D%0A%0A    @Override public void onFeedAddPageToList(HistoryEntry entry) %7B%0A        // todo: %5Boverhaul%5D add page to list.%0A    %7D%0A%0A    @Override public void onFeedSharePage(HistoryEntry entry) %7B%0A        // todo: %5Boverhaul%5D share page.%0A    %7D%0A%0A    @Override public void onFeedNewsItemSelected(NewsItemCard card) %7B%0A        // todo: %5Boverhaul%5D load page.%0A    %7D%0A%0A    @Override public void onFeedShareImage(FeaturedImageCard card) %7B%0A        // todo: %5Boverhaul%5D share image.%0A    %7D%0A%0A    @Override public void onFeedDownloadImage(FeaturedImage image) %7B%0A        // todo: %5Boverhaul%5D download image.%0A    %7D%0A%0A    @Override public void onFeaturedImageSelected(FeaturedImageCard card) %7B%0A        // todo: %5Boverhaul%5D update loading indicator.%0A    %7D%0A%0A
     @Override pu

Add callback stubs for Feed in OverhaulFragment