package com.wd.workoffice.app;

import com.wd.workoffice.util.WorkUtils;

import flexible.xd.android_base.base.BaseActivity;
import flexible.xd.android_base.mvpBase.IBaseView;
import me.jessyan.autosize.AutoSize;


/**
 * Created by flexible on 2018/6/6.
 */

public abstract class WorkBaseActivity extends BaseActivity implements IBaseView {


    @Override
    protected void onResume() {
        super.onResume();
        AutoSize.autoConvertDensity(this, 375, true);
        WorkUtils.addPermissionRule(getWindow().getDecorView());
    }

//    private void networkListener() {
//        netWorkBroadcast = new NetWorkBroadcast();
//        IntentFilter intentFilter = new IntentFilter();
//        intentFilter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
//        intentFilter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION);
//        intentFilter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
//        registerReceiver(netWorkBroadcast, intentFilter);
//    }

    @Override
    public void showLoading() {
        isLoad(true);
    }

    @Override
    public void hideLoading() {
        isLoad(false);
    }

    @Override
    public void onError(String message) {
        toast(message);
    }
}
