gpt4 book ai didi

android - 使用 ShowCaseView 定位操作栏菜单项

转载 作者:行者123 更新时间:2023-11-29 15:55:35 25 4
gpt4 key购买 nike

如何使用 ShowCaseView. 定位操作栏菜单项?

我尝试使用位于 here 的以下代码我得到 ITEM_ACTION_ITEM cannot be resolved or is not a field

如何使用 ShowCaseView 定位特定的 ActionBar 菜单项?谢谢

        ShowcaseView sv = ShowcaseView.insertShowcaseViewWithType(ShowcaseView.ITEM_ACTION_ITEM,
R.id.answers, FragmentViewNovice.this,"Edit",
"Click here to edit image.");

最佳答案

对于 future 的 Google 员工,我找到了答案。

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

关于android - 使用 ShowCaseView 定位操作栏菜单项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28224301/

25 4 0