Toolbar toolbar = (Toolbar) getView().findViewById((R.id.app_bar));
((BaseActivity) getActivity()).setSupportActionBar(toolbar);
((BaseActivity) getActivity()).getSupportActionBar().setDisplayShowTitleEnabled(false);
toolbar.setNavigationIcon(R.drawable.ic_menu);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
((MainActivity) getActivity()).openDrawer();
}
});
Here is my code segment. After adding Aviary SDK, image set on 'toolbar.setNavigationIcon(...)' not working & no icon is visible there. My drawer is sliding/working smoothly. I want to use this SDK & want the navigation icon too. How to do this?
Toolbar toolbar = (Toolbar) getView().findViewById((R.id.app_bar));
toolbar.setNavigationIcon(R.drawable.ic_menu);
((BaseActivity) getActivity()).setSupportActionBar(toolbar);
((BaseActivity) getActivity()).getSupportActionBar().setDisplayShowTitleEnabled(false);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
((MainActivity) getActivity()).openDrawer();
}
});
Just changing the order solved my problem.