Search in sources :

Example 6 with ChangeLog

use of de.cketti.library.changelog.ChangeLog in project Gadgetbridge by Freeyourgadget.

the class ControlCenterv2 method onNavigationItemSelected.

@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
    DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    drawer.closeDrawer(GravityCompat.START);
    switch(item.getItemId()) {
        case R.id.action_settings:
            Intent settingsIntent = new Intent(this, SettingsActivity.class);
            startActivity(settingsIntent);
            return true;
        case R.id.action_debug:
            Intent debugIntent = new Intent(this, DebugActivity.class);
            startActivity(debugIntent);
            return true;
        case R.id.action_db_management:
            Intent dbIntent = new Intent(this, DbManagementActivity.class);
            startActivity(dbIntent);
            return true;
        case R.id.action_quit:
            GBApplication.quit();
            return true;
        case R.id.external_changelog:
            ChangeLog cl = new ChangeLog(this);
            cl.getFullLogDialog().show();
            return true;
    }
    return true;
}
Also used : Intent(android.content.Intent) ChangeLog(de.cketti.library.changelog.ChangeLog) DrawerLayout(android.support.v4.widget.DrawerLayout)

Aggregations

ChangeLog (de.cketti.library.changelog.ChangeLog)6 Intent (android.content.Intent)3 DrawerLayout (android.support.v4.widget.DrawerLayout)2 View (android.view.View)2 ListView (android.widget.ListView)2 SuppressLint (android.annotation.SuppressLint)1 AlertDialog (android.app.AlertDialog)1 DialogInterface (android.content.DialogInterface)1 IntentFilter (android.content.IntentFilter)1 Canvas (android.graphics.Canvas)1 FloatingActionButton (android.support.design.widget.FloatingActionButton)1 NavigationView (android.support.design.widget.NavigationView)1 ActionBarDrawerToggle (android.support.v7.app.ActionBarDrawerToggle)1 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 RecyclerView (android.support.v7.widget.RecyclerView)1 Toolbar (android.support.v7.widget.Toolbar)1 ItemTouchHelper (android.support.v7.widget.helper.ItemTouchHelper)1 OnClickListener (android.view.View.OnClickListener)1 WebView (android.webkit.WebView)1 AdapterView (android.widget.AdapterView)1