use of org.videolan.vlc.gui.helpers.Navigator in project vlc-android by GeoffreyMetais.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (!VLCInstance.testCompatibleCPU(this)) {
finish();
return;
}
Permissions.checkReadStoragePermission(this, false);
/**
* Start initializing the UI **
*/
setContentView(R.layout.main);
mDrawerLayout = findViewById(R.id.root_container);
setupNavigationView();
initAudioPlayerContainerActivity();
mNavigator = new Navigator(this, mSettings, mExtensionManagerService, savedInstanceState);
if (savedInstanceState == null) {
if (getIntent().getBooleanExtra(Constants.EXTRA_UPGRADE, false)) {
/*
* The sliding menu is automatically opened when the user closes
* the info dialog. If (for any reason) the dialog is not shown,
* open the menu after a short delay.
*/
mActivityHandler.postDelayed(new Runnable() {
@Override
public void run() {
mDrawerLayout.openDrawer(mNavigationView);
}
}, 500);
}
mNavigator.reloadPreferences();
}
/* Set up the action bar */
prepareActionBar();
mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.string.drawer_open, R.string.drawer_close);
mDrawerLayout.addDrawerListener(mDrawerToggle);
mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START);
/* Reload the latest preferences */
mScanNeeded = savedInstanceState == null && mSettings.getBoolean("auto_rescan", true);
mExtensionsManager = ExtensionsManager.getInstance();
mMediaLibrary = VLCApplication.getMLInstance();
}
Aggregations