// Path: app/src/main/java/com/popomusic/util/UIcollector.java
// @SuppressWarnings("ALL")
// public class UIcollector {
// 
// 
//     public static Context getContext() {
//         return BaseActivity.getContext();
//     }
// 
//     public static Activity getActivity() {
//         return BaseActivity.getActivity();
//     }
// 
// 
//     public static Drawable getDrawable(int id) {
//         return getContext().getResources().getDrawable(id);
//     }
// 
//     public static int getColor(int id) {
//         return getContext().getResources().getColor(id);
//     }
// 
//     public static String getString(int id) {
//         return getContext().getResources().getString(id);
//     }
// 
// 
//     public static String[] getStringArray(int id) {
//         return getContext().getResources().getStringArray(id);
//     }
// }


import android.app.Activity;
import android.content.Context;
import android.hardware.SensorManager;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.Toast;
import com.popomusic.util.UIcollector;
import butterknife.ButterKnife;
package com.popomusic.activity;






/**
 * Created by popo1379 on 2017/4/6 0006.
 */
public abstract class BaseActivity extends AppCompatActivity {

    private static Context context;
    private static Activity activity;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        init(savedInstanceState);//初始化view之前，进行的操作
        super.onCreate(savedInstanceState);
        setContentView(setLayoutResourceID());
        context = getApplicationContext();
        activity = this;
        ButterKnife.bind(this);
        initView();
        initListener();
        initData();
    }
    public void init(Bundle savedInstanceState){}
    public abstract int setLayoutResourceID();
    public abstract void initView();
    public  void initListener(){}
    public abstract void initData();

    public static Context getContext() {
        return context;
    }

    public static Activity getActivity() {
        return activity;
    }

    void Toast(String content) {
// Path: app/src/main/java/com/popomusic/util/UIcollector.java
// @SuppressWarnings("ALL")
// public class UIcollector {
// 
// 
//     public static Context getContext() {
//         return BaseActivity.getContext();
//     }
// 
//     public static Activity getActivity() {
//         return BaseActivity.getActivity();
//     }
// 
// 
//     public static Drawable getDrawable(int id) {
//         return getContext().getResources().getDrawable(id);
//     }
// 
//     public static int getColor(int id) {
//         return getContext().getResources().getColor(id);
//     }
// 
//     public static String getString(int id) {
//         return getContext().getResources().getString(id);
//     }
// 
// 
//     public static String[] getStringArray(int id) {
//         return getContext().getResources().getStringArray(id);
//     }
// }


// Path: app/src/main/java/com/popomusic/activity/BaseActivity.java
import android.app.Activity;
import android.content.Context;
import android.hardware.SensorManager;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.Toast;
import com.popomusic.util.UIcollector;
import butterknife.ButterKnife;

package com.popomusic.activity;






/**
 * Created by popo1379 on 2017/4/6 0006.
 */
public abstract class BaseActivity extends AppCompatActivity {

    private static Context context;
    private static Activity activity;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        init(savedInstanceState);//初始化view之前，进行的操作
        super.onCreate(savedInstanceState);
        setContentView(setLayoutResourceID());
        context = getApplicationContext();
        activity = this;
        ButterKnife.bind(this);
        initView();
        initListener();
        initData();
    }
    public void init(Bundle savedInstanceState){}
    public abstract int setLayoutResourceID();
    public abstract void initView();
    public  void initListener(){}
    public abstract void initData();

    public static Context getContext() {
        return context;
    }

    public static Activity getActivity() {
        return activity;
    }

    void Toast(String content) {
        Toast.makeText(UIcollector.getContext(), content, Toast.LENGTH_LONG).show();