use of com.hippo.ehviewer.ui.scene.BaseScene in project EhViewer by seven332.
the class MainActivity method onSceneViewCreated.
@Override
public void onSceneViewCreated(SceneFragment scene, Bundle savedInstanceState) {
super.onSceneViewCreated(scene, savedInstanceState);
if (scene instanceof BaseScene && mRightDrawer != null && mDrawerLayout != null) {
BaseScene baseScene = (BaseScene) scene;
mRightDrawer.removeAllViews();
View drawerView = baseScene.createDrawerView(baseScene.getLayoutInflater2(), mRightDrawer, savedInstanceState);
if (drawerView != null) {
mRightDrawer.addView(drawerView);
mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED, Gravity.RIGHT);
} else {
mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED, Gravity.RIGHT);
}
}
}
use of com.hippo.ehviewer.ui.scene.BaseScene in project EhViewer by seven332.
the class MainActivity method onSceneViewDestroyed.
@Override
public void onSceneViewDestroyed(SceneFragment scene) {
super.onSceneViewDestroyed(scene);
if (scene instanceof BaseScene) {
BaseScene baseScene = (BaseScene) scene;
baseScene.destroyDrawerView();
}
}
Aggregations