Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DrawerLayout and ActionBarDrawerToggle cannot be resolved to a type

I am trying to implement ActionBarSherlock Side Menu Navigation Drawer in my app, but always getting :

DrawerLayout cannot be resolved to a type ActionBarDrawerToggle cannot be resolved to a type

My imports are:

import android.content.res.Configuration;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;

import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.actionbarsherlock.view.MenuItem;
like image 755
Sun Avatar asked Sep 21 '13 10:09

Sun


1 Answers

Import these from the support library

import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.widget.DrawerLayout;

Check this

http://developer.android.com/tools/support-library/index.html

For more info on NaigationDrawer

http://developer.android.com/training/implementing-navigation/nav-drawer.html

like image 79
Raghunandan Avatar answered Nov 15 '22 12:11

Raghunandan