// Path: app/src/main/java/com/hut/zero/bean/BeanType.java
// public enum BeanType {
// 
//     TYPE_ZHIHU, TYPE_GUOKE,TYPE_DOUBAN;
// 
// }


import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import com.hut.zero.R;
import com.hut.zero.bean.BeanType;
package com.hut.zero.detail;



public class DetailActivity extends AppCompatActivity {
    private DetailFragment fragment;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.frame);

        if (savedInstanceState != null) {
            fragment = (DetailFragment) getSupportFragmentManager().getFragment(savedInstanceState,"detailFragment");
        } else {
            fragment = new DetailFragment();
            getSupportFragmentManager().beginTransaction()
                    .replace(R.id.container, fragment)
                    .commit();
        }

        Intent intent = getIntent();
        DetailPresenter presenter = new DetailPresenter(DetailActivity.this, fragment);
// Path: app/src/main/java/com/hut/zero/bean/BeanType.java
// public enum BeanType {
// 
//     TYPE_ZHIHU, TYPE_GUOKE,TYPE_DOUBAN;
// 
// }


// Path: app/src/main/java/com/hut/zero/detail/DetailActivity.java
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import com.hut.zero.R;
import com.hut.zero.bean.BeanType;

package com.hut.zero.detail;



public class DetailActivity extends AppCompatActivity {
    private DetailFragment fragment;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.frame);

        if (savedInstanceState != null) {
            fragment = (DetailFragment) getSupportFragmentManager().getFragment(savedInstanceState,"detailFragment");
        } else {
            fragment = new DetailFragment();
            getSupportFragmentManager().beginTransaction()
                    .replace(R.id.container, fragment)
                    .commit();
        }

        Intent intent = getIntent();
        DetailPresenter presenter = new DetailPresenter(DetailActivity.this, fragment);
        presenter.setType((BeanType) intent.getSerializableExtra("type"));