针对与ShowCaseView操作栏菜单项 [英] Targeting action bar menu items with ShowCaseView

查看:310
本文介绍了针对与ShowCaseView操作栏菜单项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样可以针对与 ShowCaseView。

操作栏菜单项

我在这里使用以下code位于 尝试和我得到 ITEM_ACTION_ITEM不能解决或无法在现场

我如何使用针对特定ShowCaseView动作条的菜单项?谢谢

  ShowcaseView SV = ShowcaseView.insertShowcaseViewWithType(ShowcaseView.ITEM_ACTION_ITEM,
            R.id.answers,FragmentViewNovice.this,编辑,
           点击这里编辑图像。);


解决方案

有关未来的Google,我已经找到了答案。

 新ShowcaseView.Builder(getActivity())
    .setTarget(新ActionItemTarget(getActivity(),R.id.answers))//这里是你提供你想要显示的动作栏项目的id
    .setContentTitle(标题)
    .setContentText(描述)
    .hideOnTouchOutside()
    。建立();

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.");    

解决方案

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();

这篇关于针对与ShowCaseView操作栏菜单项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆