android:如何在我的应用程序中实现像 Go Launcher 这样的首次教程?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11805890/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 08:55:11  来源:igfitidea点击:

android: How can I implement first time tutorial like Go Launcher in my app?

androidandroid-layout

提问by moallemi

Go Launcher have a nice first-time tutorial. it is very similar to Stock ICS first time run. I want to learn how to make the similar tutorial display at the first launch of my app. How can I implement this Transparent view (which interacts with screen objects) in my android app?

Go Launcher 有一个很好的初次使用教程。它与 Stock ICS 第一次运行非常相似。我想学习如何在我的应用程序第一次启动时显示类似的教程。如何在我的 android 应用程序中实现这个透明视图(它与屏幕对象交互)?

First ImageSecond Image

第一张图片第二张图片

采纳答案by Gautam

I was trying to do something similarusing a transparent activity with a viewpager inside it. I wanted static 'tutorial' images that users could swipe through.

我试图使用一个透明的活动来做类似的事情,里面有一个viewpager。我想要用户可以滑动的静态“教程”图像。

One of the answers to my question mentioned an interesting library (called ShowcaseView). It seems like it may be a good fit for your requirements as well.

我的问题的一个答案提到了一个有趣的库(称为 ShowcaseView)。它似乎也很适合您的要求。

https://github.com/Espiandev/ShowcaseView

https://github.com/Espiandev/ShowcaseView

回答by Leaudro

You can either use a FrameLayout or RelativeLayout as root of your Activity/Fragment, and put your "first time" View upon content with a (almost) transparent background, or use another Activity/Fragment themed with a transluscent window. (like this)

您可以使用 FrameLayout 或 RelativeLayout 作为 Activity/Fragment 的根,并将“第一次”视图放在具有(几乎)透明背景的内容上,或者使用另一个以半透明窗口为主题的 Activity/Fragment。(像这样

I'd rather use an Activity/Fragment, but this is up to you!

我宁愿使用活动/片段,但这取决于您!

回答by dnocode

I wrote little library That contains a simple component for making ??a app tour. It`s very restricted to my case but maybe could be your case . Single LessonCardView Showed onstartactivity for the first time or on button click Any criticism ,help or advice will be appreciated. thanks https://github.com/dnocode/DnoLib

我写了一个小库,它包含一个用于制作应用程序的简单组件。它非常限于我的情况,但也许可能是你的情况。单个 LessonCardView 首次在开始活动或按钮单击时显示任何批评、帮助或建议,我们将不胜感激。感谢https://github.com/dnocode/DnoLib