// Path: app/src/main/java/org/kaerdan/mvp_navigation/core/data/Article.java
// public class Article {
//     private final int id;
//     private final String title;
//     private final String body;
//     private final boolean isFavourite;
// 
//     public Article(int id, String title, String body, boolean isFavourite) {
//         this.id = id;
//         this.title = title;
//         this.body = body;
//         this.isFavourite = isFavourite;
//     }
// 
//     public int getId() {
//         return id;
//     }
// 
//     public String getTitle() {
//         return title;
//     }
// 
//     public String getBody() {
//         return body;
//     }
// 
//     public boolean isFavourite() {
//         return isFavourite;
//     }
// }


import org.kaerdan.mvp_navigation.R;
import org.kaerdan.mvp_navigation.core.data.Article;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

    public ArticleFragment() {
        // Required empty public constructor
    }

    @Override
    public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
            final Bundle savedInstanceState) {

        // Inflate the layout for this fragment
        mPresenter = new ArticlePresenter(getArguments().getInt(ARTICLE_ID_TAG));

        View v = inflater.inflate(R.layout.fragment_article, container, false);
        mArticleTextView = (TextView) v.findViewById(R.id.article_body);
        return v;
    }

    @Override
    public void onStart() {
        super.onStart();
        mPresenter.onAttachView(this);
    }

    @Override
    public void onStop() {
        super.onStop();
        mPresenter.onDetachView();
    }

    @Override
// Path: app/src/main/java/org/kaerdan/mvp_navigation/core/data/Article.java
// public class Article {
//     private final int id;
//     private final String title;
//     private final String body;
//     private final boolean isFavourite;
// 
//     public Article(int id, String title, String body, boolean isFavourite) {
//         this.id = id;
//         this.title = title;
//         this.body = body;
//         this.isFavourite = isFavourite;
//     }
// 
//     public int getId() {
//         return id;
//     }
// 
//     public String getTitle() {
//         return title;
//     }
// 
//     public String getBody() {
//         return body;
//     }
// 
//     public boolean isFavourite() {
//         return isFavourite;
//     }
// }


// Path: app/src/main/java/org/kaerdan/mvp_navigation/core/ui/article/ArticleFragment.java
import org.kaerdan.mvp_navigation.R;
import org.kaerdan.mvp_navigation.core.data.Article;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;


    public ArticleFragment() {
        // Required empty public constructor
    }

    @Override
    public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
            final Bundle savedInstanceState) {

        // Inflate the layout for this fragment
        mPresenter = new ArticlePresenter(getArguments().getInt(ARTICLE_ID_TAG));

        View v = inflater.inflate(R.layout.fragment_article, container, false);
        mArticleTextView = (TextView) v.findViewById(R.id.article_body);
        return v;
    }

    @Override
    public void onStart() {
        super.onStart();
        mPresenter.onAttachView(this);
    }

    @Override
    public void onStop() {
        super.onStop();
        mPresenter.onDetachView();
    }

    @Override
    public void displayArticle(@NonNull final Article article) {