本文介绍了如何使用ShowCaseView V5建设者片段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我发现示例,旧版本,而不是为新生成器模式。有谁知道如何做到这一点?
I found examples for the legacy version, but not for the new builder pattern. Does anyone know how to do this?
推荐答案
该生成器的构造函数只需要一个活动公共生成器(活动活动)
这样:
The Builder constructor only needs an activity public Builder(Activity activity)
so:
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment, container, false);
showcaseView = new ShowcaseView.Builder(getActivity())
.setTarget(new ViewTarget(view.findViewById(R.id.textView)))
.setOnClickListener(listener)
.build();
....
这篇关于如何使用ShowCaseView V5建设者片段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!