I use ActionBarSherlok and DrawerLayout, all works fine, but in Android 2.3 ActionBar drawer icon not displays. Insted it displays back icon. In Android 4 displays drawer icon.
How can I change back icon in Android 2 to drawer icon like in Android 4?
I use next code to initialize drawer:
drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START);
drawerToggle = new ActionBarDrawerToggle(this, drawer,
R.drawable.ic_drawer, R.string.main_01, R.string.main_02) {
public void onDrawerClosed(View view) {
getSupportActionBar().setTitle(title);
invalidateOptionsMenu();
}
public void onDrawerOpened(View drawerView) {
getSupportActionBar().setTitle(drawerTitle);
invalidateOptionsMenu();
}
};
drawer.setDrawerListener(drawerToggle);
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);