android – 如何一个接一个地显示Show Case视图

android – 如何一个接一个地显示Show Case视图,第1张

概述I have 4 buttons.I need to give showcase views for each button.But the problem is that when creating show case views for each button on Oncreate,all showcase view display simultaneously.How can i disp

I have 4 buttons.I need to give showcase vIEws for each button.But the
problem is that when creating show case vIEws for each button on
Oncreate,all showcase vIEw display simultaneously.How can i display it
one after the other?.

Oncreate Code

target = new VIEwTarget(R.ID.shutdown,this);show_showcase(target,"Tutorial","Click this button...");   target = new VIEwTarget(R.ID.track,"Click this button to...");   target = new VIEwTarget(R.ID.lock,"Click this button to...");   target = new VIEwTarget(R.ID.unlock,"Click this to ...");

function show_showcase

voID show_showcase(final VIEwTarget target,final String Title,final String content) {   Selection.this.runOnUiThread(new Runnable() {       public voID run() {                   new ShowcaseVIEw.Builder(Selection.this,true)                   .setTarget(target)                   .setContentTitle(Title)                   .setContentText(content)                   .setStyle(R.style.CustomShowcasetheme)                   .build();       }   });

}

解决方法 我找到了.我使用的是展示视图版本5,它没有展示视图类.降级并将版本4添加到我的AndroID Studio项目中并修复了它.

>选择展示视图的旧版本
>下载showcasevIEw库
>将其添加到应用程序
>使用showcasevIEws类

该类的示例在展示视图库中的示例应用程序中给出

总结

以上是内存溢出为你收集整理的android – 如何一个接一个地显示Show Case视图全部内容,希望文章能够帮你解决android – 如何一个接一个地显示Show Case视图所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1125428.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-30
下一篇2022-05-30

发表评论

登录后才能评论

评论列表(0条)

    保存