4

I have 3 tabs in my application using actionbarSherlock and achartengine library in the app too: Its like when i start my application and move from the home tab to the 2nd tab or even if i move to 3rd tab the my onCreateOptionsMenu() is called twice due to which onOptionItem Selected is never called and its called when i go to 3rd tab and come back to the 2nd tab then onCreateOptions menu is called only once and then onOptionItemSelected is called.

Total of 3 tabs in an application using action bar sherlock and achartengine library

case 1: moving from 1st Tab ---->>>> 2nd tab : onCreateOptionsMenu() is called twice and onOptionItemSelected() is not called

case 2: moving from 1st Tab ---->>>> 3rd tab : onCreateOptionsMenu() is called twice and onOptionItemSelected() is not called

case 3: moving from 1st Tab ---->>>> 3rd tab --->>>2nd Tab : onCreateOptionsMenu() is called once and onOptionItemSelected() is also called

case 4: moving from 1st Tab ---->>>> 2nd tab --->>> 3rd Tab : onCreateOptionsMenu() is called once and onOptionItemSelected() is also called

Please suggest me a solution to this problem. Its been 4-5 days since the issue is troubling me.

Renjith
  • 5,783
  • 9
  • 31
  • 42
Varun
  • 87
  • 1
  • 10

1 Answers1

-1

I have finally found a solution to it and its Still an open issue and not yet have been fixed by the inventors and developers. :-))

Varun
  • 87
  • 1
  • 10
  • Which solution did you find? Can you post it? – Mike Mitterer Oct 20 '12 at 17:30
  • 1
    Yeah, this is not an answer, it's a comment, please provide your solution – clauziere Oct 23 '12 at 16:24
  • its still one of the open issues while using pager and there are still fixes available but all the fixes either end up affecting the app adversely or the app crashes......say while in tabs while using the pager....the issue cann be resolved but if we do so then either the tabs outline wont be visible enough to differentiate between the various mentioned tabs......for example we have 3 tabs in an activity if we apply the fix then instead of 3 different tabs we will see one main strip with three different texts or icons on it,though clicking on these texts or icons shall work just like tabs. – Varun Oct 25 '12 at 06:34
  • so instead of using the pager, switch to simple tab activity and once the developers of pager or sherlock fix the known issues of the library we can refracter the code with the pager functionality – Varun Oct 25 '12 at 06:36