本文整理汇总了Java中com.github.obsessive.library.base.BaseAppManager类的典型用法代码示例。如果您正苦于以下问题:Java BaseAppManager类的具体用法?Java BaseAppManager怎么用?Java BaseAppManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BaseAppManager类属于com.github.obsessive.library.base包,在下文中一共展示了BaseAppManager类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: exitApp
import com.github.obsessive.library.base.BaseAppManager; //导入依赖的package包/类
public void exitApp() {
BaseAppManager.getInstance().clear();
System.gc();
MobclickAgent.onKillProcess(this);
android.os.Process.killProcess(android.os.Process.myPid());
}
示例2: onCreate
import com.github.obsessive.library.base.BaseAppManager; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// base setup
mHelper = new SwipeBackActivityHelper(this);
mHelper.onActivityCreate();
Bundle extras = getIntent().getExtras();
if (null != extras) {
getBundleExtras(extras);
}
if (isBindEventBusHere()) {
EventBus.getDefault().register(this);
}
SmartBarUtils.hide(getWindow().getDecorView());
setTranslucentStatus(isApplyStatusBarTranslucency());
mContext = this;
TAG_LOG = this.getClass().getSimpleName();
BaseAppManager.getInstance().addActivity(this);
DisplayMetrics displayMetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
mScreenDensity = displayMetrics.density;
mScreenHeight = displayMetrics.heightPixels;
mScreenWidth = displayMetrics.widthPixels;
if (getContentViewLayoutID() != 0) {
setContentView(getContentViewLayoutID());
} else {
throw new IllegalArgumentException("You must return a right contentView layout resource Id");
}
mNetChangeObserver = new NetChangeObserver() {
@Override
public void onNetConnected(NetUtils.NetType type) {
super.onNetConnected(type);
onNetworkConnected(type);
}
@Override
public void onNetDisConnect() {
super.onNetDisConnect();
onNetworkDisConnected();
}
};
NetStateReceiver.registerObserver(mNetChangeObserver);
initViewsAndEvents();
}
示例3: finish
import com.github.obsessive.library.base.BaseAppManager; //导入依赖的package包/类
@Override
public void finish() {
super.finish();
BaseAppManager.getInstance().removeActivity(this);
}