Android: el constructor ActionBarDrawerToggle no está definido
Utilicé este código en mi función oncreate para abrir el cajón de navegación presionando el icono de la aplicación.
ActionBarDrawerToggle mDrawerToggle = new ActionBarDrawerToggle(
this, /* host Activity */
(DrawerLayout) findViewById(R.id.left_drawer), /* DrawerLayout object */
getResources().getDrawable(R.drawable.ic_drawer), /* nav drawer icon to replace 'Up' caret */
getString(R.string.drawer_open), /* "open drawer" description */
getString(R.string.drawer_close) /* "close drawer" description */
) {
/** Called when a drawer has settled in a completely closed state. */
public void onDrawerClosed(View view) {
getActionBar().setTitle(R.string.title_activity_add);
}
/** Called when a drawer has settled in a completely open state. */
public void onDrawerOpened(View drawerView) {
getActionBar().setTitle(R.string.drawer_title);
}
};
Ahora dice "El constructor ActionBarDrawerToggle (AddActivity, DrawerLayout, Drawable, String, String) no está definido". He importado android.support.v4.app.ActionBarDrawerToggle. ¿Dónde está el problema?