Search code examples
androidandroid-actionbar-compatshowcaseview

Showcaseview not displaying action bar items


So in my project I am using a showcaseview to create a tutorial for the user. When I point the ShowcaseView to any action bar id, the result is this: enter image description here

My question is is it possible to have the showcaseview target the specific items in the action bar rather than just a general overview like the one shown above. The code is being run in the overridden onCreateOptionsMenu method and is in the context of an activity. Here is the code that I am currently using:

actionBarViews = new ShowcaseViews(activity);
    ShowcaseView.ConfigOptions co = new ShowcaseView.ConfigOptions();
    co.hideOnClickOutside = true;
actionBarViews.addView(new ItemViewProperties(R.id.sendmessage,
            R.string.send_title, R.string.send_tutorial,
            ShowcaseView.ITEM_ACTION_ITEM, 0, co));
actionBarViews.addView(new ItemViewProperties(R.id.tutorial_menu,
            R.string.tutorial_title, R.string.tutorial_tutorial,
            ShowcaseView.ITEM_ACTION_OVERFLOW, 0, co));

    actionBarViews.show();

If it is impossible to currently target actionbaritems, is there another way to go about implementing a tutorial.


Solution

  • have you tried to use ActionBarSherlock? It supports old compatibility and has quite a lot of available examples.