title: DrawerItemClickListener cannot be resolved to a type - Android app
body: <p>I already checked around if my issue has been solved but I can't find it out.</p>
  
  <p>I want to do a drawer menu, using DrawerItemClickListener.</p>
  
  <p>I'm using API 19 to Android 4.4.2
  Here's my import :</p>
  
  <pre><code>import android.app.Activity;
  import android.app.Fragment;
  import android.content.Intent;
  import android.os.Bundle;
  import android.support.v4.app.ActionBarDrawerToggle;
  import android.support.v4.view.GravityCompat;
  import android.support.v4.widget.DrawerLayout;
  import android.view.LayoutInflater;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.ArrayAdapter;
  import android.widget.Button;
  import android.widget.EditText;
  import android.widget.ListView;
  import android.widget.RelativeLayout;
  import android.widget.TextView;
  import android.app.SearchManager;
  import android.content.res.Configuration;
  import android.view.MenuInflater;
  import android.widget.AdapterView;
  import android.widget.Toast;
  </code></pre>
  
  <p>It's kinda weird because I downloaded a sample from android developers website which work well with Drawer.
  At first I thougth I didn't have the good library but I replaced mine with my sample, nothing change!</p>
  
  <p>I don't know how to solve that problem...</p>
  
  <pre><code>public class MainActivity extends Activity {
  
  final String TEST = "user_password";
  private DrawerLayout mDrawerLayout;
  private ListView mDrawerList;
  private ActionBarDrawerToggle mDrawerToggle;
  
  private CharSequence mDrawerTitle;
  private CharSequence mTitle;
  private String[] mPlanetTitles;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      RelativeLayout layout = (RelativeLayout) RelativeLayout.inflate(this, R.layout.fragment_main, null);
      setContentView(layout);
      TextView text = (TextView) layout.findViewById(R.id.textView1);
      text.setText("Calculez votre IMC !");
  
      Button b = (Button) layout.findViewById(R.id.button1);
      final TextView text2 = (TextView) layout.findViewById(R.id.textView2);
  
      final EditText poids = (EditText) layout.findViewById(R.id.editText1);
      final EditText taille = (EditText) layout.findViewById(R.id.editText2);
  
      b.setText("Calculez");
      b.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              String rawSize = taille.getText().toString();
  
              Float p = Float.parseFloat(poids.getText().toString());
              if (rawSize.indexOf(',') == -1 &amp;&amp; rawSize.indexOf('.') == -1 &amp;&amp; rawSize.length() == 3)
              {
                  StringBuilder tmp = new StringBuilder();
                  tmp.append(rawSize.charAt(0));
                  tmp.append('.');
                  tmp.append(rawSize.charAt(1));
                  tmp.append(rawSize.charAt(2));
                  rawSize = tmp.toString();
              }
  
              if (rawSize.indexOf(',') != -1)
                  rawSize = rawSize.replace(',', '.');
  
              Float t = Float.parseFloat(rawSize);
              int res = (int) (p / Math.pow(t, 2));
              text2.setText("Votre IMC est de : "+res);
          }
      });
  
      final Button loginButton = (Button) findViewById(R.id.button2);
      loginButton.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View v) {
              Intent intent = new Intent(MainActivity.this, SecondActivity.class);
              intent.putExtra(TEST, poids.getText().toString());
              startActivity(intent);
          }
      });
  
      mTitle = mDrawerTitle = getTitle();
      mPlanetTitles = getResources().getStringArray(R.array.planets_array);
      mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
      mDrawerList = (ListView) findViewById(R.id.left_drawer);
  
      // set a custom shadow that overlays the main content when the drawer opens
      //mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START);
      // set up the drawer's list view with items and click listener
      mDrawerList.setAdapter(new ArrayAdapter&lt;String&gt;(this,
              R.layout.drawer_list_item, mPlanetTitles));
      mDrawerList.setOnItemClickListener(new DrawerItemClickListener());
  
      // enable ActionBar app icon to behave as action to toggle nav drawer
      getActionBar().setDisplayHomeAsUpEnabled(true);
      getActionBar().setHomeButtonEnabled(true);
  
      // ActionBarDrawerToggle ties together the the proper interactions
      // between the sliding drawer and the action bar app icon
      mDrawerToggle = new ActionBarDrawerToggle(
              this,                  /* host Activity */
              mDrawerLayout,         /* DrawerLayout object */
              R.drawable.ic_drawer,  /* nav drawer image to replace 'Up' caret */
              R.string.drawer_open,  /* "open drawer" description for accessibility */
              R.string.drawer_close  /* "close drawer" description for accessibility */
              ) {
          public void onDrawerClosed(View view) {
              getActionBar().setTitle(mTitle);
              invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()
          }
  
          public void onDrawerOpened(View drawerView) {
              getActionBar().setTitle(mDrawerTitle);
              invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()
          }
      };
      mDrawerLayout.setDrawerListener(mDrawerToggle);
  }
  </code></pre>
  
  <p>I have a relative layout instead of a frame one (like the sample I downloaded) but I don't thing it is the problem.</p>