0
actionBar = getActionBar();
        actionBar.setDisplayShowTitleEnabled(false);
        actionBar.setDisplayHomeAsUpEnabled(false);
        actionBar.setHomeButtonEnabled(true);

i have this code to hide title and up button in my code and show only the icon but my problem is when i click on the icon it doesnt work anymore meaning it does not bring me to home activity anymore but when i set actionBar.setDisplayHomeAsUpEnabled(false); to true it works ok any idea on how to make this work the way i want it to work

Giant
  • 1,619
  • 7
  • 33
  • 67
  • [implementing-navigation/ancestral.html](http://developer.android.com/training/implementing-navigation/ancestral.html) – M D Jun 25 '14 at 07:33
  • @SimplePlan sir i was able to make it run properly with the icon and "<" what im trying to achieve here is to hide the "<" and still make the icon a link to home i was able to hide the "<" in my code but icon does not work or does not link to home i have read your link it is not stated there how to achieve what i want any idea you have is appreciated..thanks – Giant Jun 25 '14 at 07:47
  • I don't think so that it's worked, you can do 2 thing, 1- change image of "<" to one empty image (see http://stackoverflow.com/questions/18816418/how-do-i-change-the-color-of-actionbars-up-arrow) 2- create your layout and put that on top of your layout and hide default `ActionBar` – Shayan Pourvatan Jun 25 '14 at 07:53
  • i tried your first solution what i did is to put this code on style @null unfortunately it didnt work any idea on how to change that image to an empty image? – Giant Jun 25 '14 at 08:01
  • have you tried with other image? if it's worked with other image create one transparent image and set that as image. – Shayan Pourvatan Jun 25 '14 at 08:11
  • @drawable/note unfortunately it gives error so maybe we cant change that icon the only way is to remove it permanently but how – Giant Jun 25 '14 at 08:30

0 Answers0