Android - The constructor ActionBarDrawerToggle is undefined

后端 未结 2 1794
星月不相逢
星月不相逢 2021-01-16 13:08

I used this code in my oncreate function to open the navigation drawer by pressing the app icon.

ActionBarDrawerToggle mDrawerToggle = new ActionBarDrawerTog         


        
2条回答
  •  梦谈多话
    2021-01-16 13:26

    The constructor is not ActionBarDrawerToggle(AddActivity, DrawerLayout, Drawable, String, String). It is ActionBarDrawerToggle(Activity, DrawerLayout, int, int, int). Change your last three parameters to be the resource IDs, not the results of referencing the resource IDs.

提交回复
热议问题