// Path: app/src/main/java/io/github/emanual/app/ui/event/EmptyEvent.java
// public class EmptyEvent extends BaseEvent {
//     String message;
// 
//     public EmptyEvent(String message) {
//         this.message = message;
//     }
// }


import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.MenuItem;
import android.widget.Toast;
import com.umeng.analytics.MobclickAgent;
import java.io.Serializable;
import butterknife.ButterKnife;
import de.greenrobot.event.EventBus;
import de.greenrobot.event.Subscribe;
import io.github.emanual.app.R;
import io.github.emanual.app.ui.event.EmptyEvent;
package io.github.emanual.app.ui.base.activity;






public abstract class BaseActivity extends AppCompatActivity {

    protected abstract void initData(Bundle savedInstanceState);
    protected abstract void initLayout(Bundle savedInstanceState);
    protected abstract int getContentViewId();

    @Override protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getContentViewId());
        ButterKnife.bind(this);
        if(!EventBus.getDefault().isRegistered(this)){
            EventBus.getDefault().register(this);
        }
        initData(savedInstanceState);
        initLayout(savedInstanceState);
    }

    /**
     * EventBus 3必须要有一个@Subscribe
     */
    @Subscribe
// Path: app/src/main/java/io/github/emanual/app/ui/event/EmptyEvent.java
// public class EmptyEvent extends BaseEvent {
//     String message;
// 
//     public EmptyEvent(String message) {
//         this.message = message;
//     }
// }


// Path: app/src/main/java/io/github/emanual/app/ui/base/activity/BaseActivity.java
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.MenuItem;
import android.widget.Toast;
import com.umeng.analytics.MobclickAgent;
import java.io.Serializable;
import butterknife.ButterKnife;
import de.greenrobot.event.EventBus;
import de.greenrobot.event.Subscribe;
import io.github.emanual.app.R;
import io.github.emanual.app.ui.event.EmptyEvent;

package io.github.emanual.app.ui.base.activity;






public abstract class BaseActivity extends AppCompatActivity {

    protected abstract void initData(Bundle savedInstanceState);
    protected abstract void initLayout(Bundle savedInstanceState);
    protected abstract int getContentViewId();

    @Override protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getContentViewId());
        ButterKnife.bind(this);
        if(!EventBus.getDefault().isRegistered(this)){
            EventBus.getDefault().register(this);
        }
        initData(savedInstanceState);
        initLayout(savedInstanceState);
    }

    /**
     * EventBus 3必须要有一个@Subscribe
     */
    @Subscribe
    public void onEmpty(EmptyEvent event){