该应用程序已退出

时间:2019-07-13 16:32:54

标签: android

当我按下商店(侧栏上的按钮)时,我检出该应用程序。

public boolean onNavigationItemSelected(MenuItem item) {

    int id = item.getItemId();

    FragmentManager fragmentManager = getSupportFragmentManager();

    switch (id) {
        case R.id.nav_home:
            break;
        case R.id.nav_instagram:
            break;
        case R.id.nav_facebook:
            break;
        case R.id.nav_twitter:
            break;
        case R.id.nav_merch:
            fragmentManager.beginTransaction().replace(R.id.contenedor, new Shop()).commit();
            break;
        default:
            break;
    }

    DrawerLayout drawer = findViewById(R.id.drawer_layout);
    drawer.closeDrawer(GravityCompat.START);
    return true;
}

商店片段包含一个webview

0 个答案:

没有答案