1

How can I target the action bar menu items with ShowCaseView.

I have tried using the following code located here and I am getting ITEM_ACTION_ITEM cannot be resolved or is not a field

How can I target specific ActionBar menu items using ShowCaseView? thanks

        ShowcaseView sv = ShowcaseView.insertShowcaseViewWithType(ShowcaseView.ITEM_ACTION_ITEM,
            R.id.answers, FragmentViewNovice.this,"Edit", 
           "Click here to edit image.");    
Community
  • 1
  • 1
Jack
  • 2,043
  • 7
  • 40
  • 69

1 Answers1

4

For future Googlers, I have found the answer.

new ShowcaseView.Builder(getActivity())
    .setTarget(new ActionItemTarget(getActivity(), R.id.answers)) //Here is where you supply the id of the action bar item you want to display
    .setContentTitle("Title")
    .setContentText("Description")
    .hideOnTouchOutside()
    .build();
Jack
  • 2,043
  • 7
  • 40
  • 69