use of com.github.obsessive.library.swipeback.SwipeBackActivityHelper in project SimplifyReader by chentao0707.
the class BasePlayerActivity method onCreate.
@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();
}
use of com.github.obsessive.library.swipeback.SwipeBackActivityHelper in project SimplifyReader by chentao0707.
the class BaseSwipeBackCompatActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mHelper = new SwipeBackActivityHelper(this);
mHelper.onActivityCreate();
}
use of com.github.obsessive.library.swipeback.SwipeBackActivityHelper in project SimplifyReader by chentao0707.
the class BaseSwipeBackFragmentActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mHelper = new SwipeBackActivityHelper(this);
mHelper.onActivityCreate();
}
Aggregations