1

I create a sliding menu and i want to open it using ( ... ) but i try alot to change the icon which is(<-). this my code .

 mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout,
                    R.drawable.ic_drawer1, //nav menu toggle icon
                    R.string.app_name, // nav drawer open - description for accessibility
                    R.string.app_name // nav drawer close - description for accessibility
            ) {
                public void onDrawerClosed(View view) {
                    getActionBar().setTitle("hello");
                    // calling onPrepareOptionsMenu() to show action bar icons
                    invalidateOptionsMenu();
                }

                public void onDrawerOpened(View drawerView) {
                    getActionBar().setTitle("ohhh");
                    // calling onPrepareOptionsMenu() to hide action bar icons
                    invalidateOptionsMenu();
                }
            };

         //   getSupportActionBar().setDisplayShowHomeEnabled(true);

       //     getActionBar().setHomeButtonEnabled(true);
            //getSupportActionBar().setIcon(R.drawable.ic_drawer1);

          getSupportActionBar().setIcon(R.drawable.ic_drawer1);
            getSupportActionBar().setDisplayUseLogoEnabled(true);
            getSupportActionBar().setDisplayHomeAsUpEnabled(true);

1 Answers1

0

It has been asked already. Try to change in manifest file to change your app logo or if it doesn't work then try this link. Android: How to change the ActionBar "Home" Icon to be something other than the app icon?. This might help.

Community
  • 1
  • 1
Randyson
  • 59
  • 5