Navigation Tiroir Icône (ic_drawer) ne se présente pas

Je me suis mise en œuvre d'un tiroir de navigation pour mon application. Maintenant, il fonctionne parfaitement sauf pour un petit glitch. Lorsque j'ai mis le Tiroir de Navigation Icône (ic_drawer) pour remplacer le HomeAsUp" caret icône, j'obtiens toujours la flèche. La valeur liquidative de Tiroir icône ne s'affiche pas. J'ai mis en œuvre chaque méthode qui a été sur le site des développeurs android. Mais il ne semble pas fonctionner.

Ci-dessous mon code:

DrawerLayout mDrawerLayout;
FrameLayout leftDrawer, rightDrawer, contentFrame;
ActionBarDrawerToggle mDrawerToggle;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
initializeViews();
}
private void initializeViews() {
//TODO Auto-generated method stub
mDrawerLayout = (DrawerLayout) findViewById(R.id.mDrawerLayout);
mDrawerToggle = new ActionBarDrawerToggle(this,
mDrawerLayout, R.drawable.ic_drawer,
R.string.drawer_open_content_desc,
R.string.drawer_close_content_desc);
getActionBar().setHomeButtonEnabled(true);
getActionBar().setDisplayHomeAsUpEnabled(true);
mDrawerLayout.setDrawerListener(mDrawerToggle);
leftDrawer = (FrameLayout) findViewById(R.id.drawerLeft_frame);
rightDrawer = (FrameLayout) findViewById(R.id.drawerRight_frame);
contentFrame = (FrameLayout) findViewById(R.id.content_frame);
}
@Override
protected void onPostCreate(Bundle savedInstanceState) {
//TODO Auto-generated method stub
super.onPostCreate(savedInstanceState);
mDrawerToggle.syncState();
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
//TODO Auto-generated method stub
super.onConfigurationChanged(newConfig);
mDrawerToggle.onConfigurationChanged(newConfig);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
//Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.home, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
//TODO Auto-generated method stub
if (mDrawerToggle.onOptionsItemSelected(item)) {
return true;
}
return super.onOptionsItemSelected(item);
}
InformationsquelleAutor Adifyr | 2013-12-04