1

How to include back arrow icon with the navigation icon on some particular fragments of NavigationDrawer..? Is it possible to have both NavigationDrawer icon and back arrow icon ??

getSupportActionBar().setDisplayHomeAsUpEnabled(true);

this line is for back arrow inside activity..

I want the the back arrow to be placed in certain fragments alone not in all fragments..

AskNilesh
  • 67,701
  • 16
  • 123
  • 163
  • then you need to make custom toolbar in your fragment – Abdul Waheed Dec 05 '17 at 07:13
  • 4
    Possible duplicate of [Android - Switch ActionBar Back Button to Navigation Button](https://stackoverflow.com/questions/36579799/android-switch-actionbar-back-button-to-navigation-button) – AskNilesh Dec 05 '17 at 07:14
  • i have not tested it just try once , in fragment where you don't want back arrow call `getActivity().getActionBar().setDisplayHomeAsUpEnabled(false);` – Manohar Dec 05 '17 at 07:15
  • getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayShowHomeEnabled(true); if you have used ActionBarDrawerToggle then add this line toggle.setDrawerIndicatorEnabled(false); – Vivek Barai Dec 05 '17 at 07:21
  • is it possible to have both back arrow and nav icon ?? – Bhargavi Abhirami Dec 06 '17 at 10:46

0 Answers0