{"action":"created","issue":{"url":"https://api.github.com/repos/mikepenz/MaterialDrawer/issues/997","repository_url":"https://api.github.com/repos/mikepenz/MaterialDrawer","labels_url":"https://api.github.com/repos/mikepenz/MaterialDrawer/issues/997/labels{/name}","comments_url":"https://api.github.com/repos/mikepenz/MaterialDrawer/issues/997/comments","events_url":"https://api.github.com/repos/mikepenz/MaterialDrawer/issues/997/events","html_url":"https://github.com/mikepenz/MaterialDrawer/issues/997","id":132818049,"number":997,"title":"BackArrow onClick opens Drawer","user":{"login":"PIBODIBU","id":12379908,"avatar_url":"https://avatars.githubusercontent.com/u/12379908?v=3","gravatar_id":"","url":"https://api.github.com/users/PIBODIBU","html_url":"https://github.com/PIBODIBU","followers_url":"https://api.github.com/users/PIBODIBU/followers","following_url":"https://api.github.com/users/PIBODIBU/following{/other_user}","gists_url":"https://api.github.com/users/PIBODIBU/gists{/gist_id}","starred_url":"https://api.github.com/users/PIBODIBU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PIBODIBU/subscriptions","organizations_url":"https://api.github.com/users/PIBODIBU/orgs","repos_url":"https://api.github.com/users/PIBODIBU/repos","events_url":"https://api.github.com/users/PIBODIBU/events{/privacy}","received_events_url":"https://api.github.com/users/PIBODIBU/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mikepenz/MaterialDrawer/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"mikepenz","id":1476232,"avatar_url":"https://avatars.githubusercontent.com/u/1476232?v=3","gravatar_id":"","url":"https://api.github.com/users/mikepenz","html_url":"https://github.com/mikepenz","followers_url":"https://api.github.com/users/mikepenz/followers","following_url":"https://api.github.com/users/mikepenz/following{/other_user}","gists_url":"https://api.github.com/users/mikepenz/gists{/gist_id}","starred_url":"https://api.github.com/users/mikepenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikepenz/subscriptions","organizations_url":"https://api.github.com/users/mikepenz/orgs","repos_url":"https://api.github.com/users/mikepenz/repos","events_url":"https://api.github.com/users/mikepenz/events{/privacy}","received_events_url":"https://api.github.com/users/mikepenz/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2016-02-10T21:08:40Z","updated_at":"2016-02-12T10:45:16Z","closed_at":null,"body":"The issue is when I extends from MyDrawerActivity with method getDrawerWithBackArrow calling and then press BackArrow, NavigationDrawer only opens again. Here is my Drawer:\r\n\r\n```java\r\npublic void getDrawerWithBackArrow(String ACCOUNT_NAME, String ACCOUNT_EMAIL) {\r\n        setUpDrawerBuilder(ACCOUNT_NAME, ACCOUNT_EMAIL);\r\n\r\n        drawerBuilder\r\n                .withActionBarDrawerToggle(false);\r\n\r\n        Log.i(\"Drawer\", \"getDrawerWithBackArrow\");\r\n\r\n        setUpDrawer();\r\n        getCurrentSelection();\r\n    }\r\n\r\n\r\n```\r\n\r\n```java\r\npublic void setUpDrawerBuilder(String ACCOUNT_NAME, String ACCOUNT_EMAIL) {\r\n        // Инициализируем Toolbar\r\n        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\r\n        setSupportActionBar(toolbar);\r\n        getSupportActionBar().setDisplayHomeAsUpEnabled(true);\r\n        setToolbarTitle(toolbar);\r\n\r\n        final PrimaryDrawerItem home = new PrimaryDrawerItem()\r\n                .withName(R.string.drawer_item_home)\r\n                .withIcon(GoogleMaterial.Icon.gmd_domain)\r\n                .withIdentifier(Activities.MainActivity.ordinal());\r\n\r\n        final PrimaryDrawerItem posts = new PrimaryDrawerItem()\r\n                .withName(R.string.drawer_item_posts)\r\n                .withIcon(GoogleMaterial.Icon.gmd_reorder)\r\n                .withIdentifier(Activities.NewsActivity.ordinal());\r\n\r\n        final PrimaryDrawerItem map = new PrimaryDrawerItem()\r\n                .withName(R.string.drawer_item_map)\r\n                .withIcon(GoogleMaterial.Icon.gmd_map)\r\n                .withIdentifier(Activities.MapsActivity.ordinal());\r\n\r\n        final PrimaryDrawerItem lectors = new PrimaryDrawerItem()\r\n                .withName(R.string.drawer_item_lectors)\r\n                .withIcon(GoogleMaterial.Icon.gmd_perm_identity)\r\n                .withIdentifier(Activities.LectorsListActivity.ordinal());\r\n\r\n        final PrimaryDrawerItem download = new PrimaryDrawerItem()\r\n                .withName(R.string.drawer_item_download)\r\n                .withIcon(GoogleMaterial.Icon.gmd_file_download)\r\n                .withIdentifier(Activities.DownloadActivity.ordinal());\r\n\r\n        final PrimaryDrawerItem settings = new PrimaryDrawerItem()\r\n                .withName(R.string.drawer_item_settings)\r\n                .withIcon(GoogleMaterial.Icon.gmd_settings)\r\n                .withIdentifier(Activities.SettingsActivity.ordinal())\r\n                .withEnabled(false);\r\n\r\n        final PrimaryDrawerItem search = new PrimaryDrawerItem()\r\n                .withName(R.string.drawer_item_search)\r\n                .withIcon(GoogleMaterial.Icon.gmd_search)\r\n                .withIdentifier(Activities.SearchActivity.ordinal());\r\n\r\n        final PrimaryDrawerItem exit = new PrimaryDrawerItem()\r\n                .withName(R.string.drawer_item_exit)\r\n                .withIcon(GoogleMaterial.Icon.gmd_close)\r\n                .withIdentifier(Activities.Exit.ordinal());\r\n\r\n// Create the AccountHeader;\r\n        ProfileDrawerItem profileMain;\r\n        profilePhotoLocation = sharedPrefs.getString(PROFILE_PHOTO_LOCATION_KEY, \"\");\r\n\r\n        if (sharedPrefs.getBoolean(SIGNED_IN_KEY, false)) {\r\n            profileMain = new ProfileDrawerItem().withName(ACCOUNT_NAME).withEmail(ACCOUNT_EMAIL).withIcon(profilePhotoLocation);\r\n        } else {\r\n            profileMain = new ProfileDrawerItem().withIcon(R.drawable.ic_account_circle_white_48dp);\r\n        }\r\n\r\n// Create AccountHeader\r\n        AccountHeader accountHeader = new AccountHeaderBuilder()\r\n                .withActivity(this)\r\n                .addProfiles(\r\n                        profileMain\r\n                )\r\n                .withOnAccountHeaderListener(new AccountHeader.OnAccountHeaderListener() {\r\n                    @Override\r\n                    public boolean onProfileChanged(View view, IProfile iProfile, boolean b) {\r\n                        if (!BaseNavigationDrawerActivity.this.sharedPrefs.getBoolean(SIGNED_IN_KEY, false)) {\r\n                            startActivity(new Intent(BaseNavigationDrawerActivity.this, LoginActivity.class)\r\n                                    .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));\r\n                        } else {\r\n                            if (!sharedPrefs.getString(sharedPrefUtils.TOKEN_KEY, \"\").equals(\"\")) {\r\n                                startActivity(new Intent(BaseNavigationDrawerActivity.this, UserProfileActivity.class)\r\n                                        .putExtra(\"action\", \"getMyPage\")\r\n                                        .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));\r\n                                finish();\r\n                            }\r\n                        }\r\n                        return false;\r\n                    }\r\n                })\r\n                .withProfileImagesClickable(true)\r\n                .withSelectionListEnabled(false)\r\n                .build();\r\n        // Set up AccountHeader Background using Picasso\r\n        ImageView accountHeaderBackground = accountHeader.getHeaderBackgroundView();\r\n        Picasso.with(BaseNavigationDrawerActivity.this).load(R.drawable.header_png).into(accountHeaderBackground);\r\n\r\n// Инициализируем Navigation Drawer\r\n        drawerBuilder = new DrawerBuilder()\r\n                .withActivity(this)\r\n                .withToolbar(toolbar)\r\n                .withAccountHeader(accountHeader)\r\n                .withHeaderDivider(false)\r\n                .addDrawerItems(\r\n                        home,\r\n                        posts,\r\n                        map,\r\n                        lectors,\r\n                        download,\r\n                        new DividerDrawerItem(),\r\n                        settings,\r\n                        search,\r\n                        new DividerDrawerItem(),\r\n                        exit\r\n                )\r\n                .withOnDrawerListener(new Drawer.OnDrawerListener() {\r\n                    @Override\r\n                    public void onDrawerOpened(View drawerView) {\r\n                        // Скрываем клавиатуру при открытии Navigation Drawer\r\n                        if (MethodManager.isAcceptingText()) {\r\n                            MethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);\r\n                            wasInputActive = true;\r\n                        } else {\r\n                            wasInputActive = false;\r\n                        }\r\n                    }\r\n\r\n                    @Override\r\n                    public void onDrawerClosed(View drawerView) {\r\n                        // Показать клавиатуру при закрытии Navigation Drawer, если она была открыта\r\n                        if (wasInputActive)\r\n                            MethodManager.showSoftInput(getCurrentFocus(), 0);\r\n                    }\r\n\r\n                    @Override\r\n                    public void onDrawerSlide(View view, float v) {\r\n\r\n                    }\r\n                })\r\n                .withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener() {\r\n                    @Override\r\n                    // Обработка клика\r\n                    public boolean onItemClick(View view, int position, IDrawerItem drawerItem) {\r\n                        try {\r\n                            String CURRENT_CLASS = BaseNavigationDrawerActivity.this.getClass().getSimpleName();\r\n                            String MAIN_CLASS = \"MainActivity\";\r\n                            String SEARCH_CLASS = \"SearchActivity\";\r\n                            String MAP_CLASS = \"MapsActivity\";\r\n                            String LECTORS_CLASS = \"LectorsListActivity\";\r\n                            String USER_CLASS = \"UserProfileActivity\";\r\n                            String POSTS_CLASS = \"NewsActivity\";\r\n\r\n                            Activities activities = Activities.values()[drawerItem.getIdentifier()];\r\n\r\n                            switch (activities) {\r\n                                case MainActivity: {\r\n                                    if (CURRENT_CLASS.equals(MAIN_CLASS)) {\r\n                                        break;\r\n                                    } else {\r\n                                        startActivity(new Intent(BaseNavigationDrawerActivity.this, MainActivity.class)\r\n                                                .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));\r\n                                        finish();\r\n                                        break;\r\n                                    }\r\n                                }\r\n                                case MapsActivity: {\r\n                                    if (CURRENT_CLASS.equals(MAP_CLASS)) {\r\n                                        break;\r\n                                    } else {\r\n                                        startActivity(new Intent(BaseNavigationDrawerActivity.this, MapsActivity.class)\r\n                                                .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));\r\n                                        finish();\r\n                                        break;\r\n                                    }\r\n                                }\r\n                                case LectorsListActivity: {\r\n                                    if (CURRENT_CLASS.equals(LECTORS_CLASS)) {\r\n                                        break;\r\n                                    } else {\r\n                                        startActivity(new Intent(BaseNavigationDrawerActivity.this, LectorsListActivity.class)\r\n                                                .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));\r\n                                        finish();\r\n                                        break;\r\n                                    }\r\n                                }\r\n                                case UserProfileActivity: {\r\n                                    if (CURRENT_CLASS.equals(USER_CLASS)) {\r\n                                        break;\r\n                                    } else {\r\n                                        startActivity(new Intent(BaseNavigationDrawerActivity.this, UserProfileActivity.class)\r\n                                                .putExtra(\"action\", \"getMyPage\")\r\n                                                .putExtra(\"uniqueId\", sharedPrefUtils.getUniqueId())\r\n                                        .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));\r\n                                        finish();\r\n                                        break;\r\n                                    }\r\n                                }\r\n                                case NewsActivity: {\r\n                                    if (CURRENT_CLASS.equals(POSTS_CLASS)) {\r\n                                        break;\r\n                                    } else {\r\n                                        startActivity(new Intent(BaseNavigationDrawerActivity.this, NewsActivity.class)\r\n                                                .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));\r\n                                        finish();\r\n                                        break;\r\n                                    }\r\n                                }\r\n                                case SettingsActivity: {\r\n                                    break;\r\n                                }\r\n                                case SearchActivity: {\r\n                                    if (CURRENT_CLASS.equals(SEARCH_CLASS)) {\r\n                                        break;\r\n                                    } else {\r\n                                        startActivity(new Intent(BaseNavigationDrawerActivity.this, SearchActivity.class));\r\n                                    }\r\n                                    break;\r\n                                }\r\n                                case Exit: {\r\n                                    startActivity(new Intent(getApplicationContext(), MainActivity.class)\r\n                                            .putExtra(EXIT_KEY, true)\r\n                                            .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));\r\n                                    break;\r\n                                }\r\n                                default: {\r\n                                    break;\r\n                                }\r\n                            }\r\n                        } catch (Exception e) {\r\n                            e.printStackTrace();\r\n                        }\r\n\r\n                        return false;\r\n                    }\r\n                });\r\n    }\r\n```"},"comment":{"url":"https://api.github.com/repos/mikepenz/MaterialDrawer/issues/comments/183268227","html_url":"https://github.com/mikepenz/MaterialDrawer/issues/997#issuecomment-183268227","issue_url":"https://api.github.com/repos/mikepenz/MaterialDrawer/issues/997","id":183268227,"user":{"login":"mikepenz","id":1476232,"avatar_url":"https://avatars.githubusercontent.com/u/1476232?v=3","gravatar_id":"","url":"https://api.github.com/users/mikepenz","html_url":"https://github.com/mikepenz","followers_url":"https://api.github.com/users/mikepenz/followers","following_url":"https://api.github.com/users/mikepenz/following{/other_user}","gists_url":"https://api.github.com/users/mikepenz/gists{/gist_id}","starred_url":"https://api.github.com/users/mikepenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikepenz/subscriptions","organizations_url":"https://api.github.com/users/mikepenz/orgs","repos_url":"https://api.github.com/users/mikepenz/repos","events_url":"https://api.github.com/users/mikepenz/events{/privacy}","received_events_url":"https://api.github.com/users/mikepenz/received_events","type":"User","site_admin":false},"created_at":"2016-02-12T10:45:16Z","updated_at":"2016-02-12T10:45:16Z","body":"@PIBODIBU even with the above code? You can try it in the sample, there it will trigger correctly"}}