如何实现像Android Lollipop应用程序的第一个启动教程:像Sheets,Slides应用程序?

The*_*bhi 51 android android-5.0-lollipop

我的Nexus 5中安装了Android 5.0最终版本.我注意到它在第一次启动时显示教程非常漂亮,干净和优雅."Sheets","Slides"等应用

我们如何在Android L兼容应用程序中实现这一点?

此外,该应用程序淡出第一个启动屏幕,然后显示教程.

教程屏幕1 初始屏幕淡出并显示教程

Ada*_*dam 35

有一个很好的库可以模拟这些首次运行的教程:https: //github.com/PaoloRotolo/AppIntro

AppIntro示例截图

点击查看大图


Mat*_*ree 15

首先,没有秘密.插图的质量是获得这个漂亮结果的关键.因此,除非你自己是一名设计师,否则你必须为他们找到一位优秀的设计师.

从那里公寓,我可以看到几种方法来接近这一点.

  1. 首先,对插图有一个非常微妙的视差效果.您可以使用此ParallaxTransformPage要点来实现它.我用它并且效果很好.

  2. 此外,这是一个lib,可让您在切换页面时平滑地更改屏幕的背景颜色.

  3. 对于splashscreen淡出动画,您可以执行以下操作:

    final ImageView launchScreen = (ImageView) context.findViewById(R.id.launch_screen_view);
    new Handler().postDelayed(new Runnable()
    {
        @Override
        public void run()
        {
            Animation animation = AnimationUtils.loadAnimation(context, android.R.anim.fade_out);
            animation.setAnimationListener(new Animation.AnimationListener()
            {
                // ...
    
                @Override
                public void onAnimationEnd(Animation animation)
                {
                    launchScreen.setVisibility(View.GONE);
                }
            });
            launchScreen.startAnimation(animation);
        }
    }, 2000);
    
    Run Code Online (Sandbox Code Playgroud)
  4. 请关注linkas的答案ViewPagerIndicator,了解如何在用户首次启动应用程序时使用a 以及如何启动教程.


Dav*_*vid 8

这个git应该可以帮助你实现你想要的:https: //github.com/spongebobrf/MaterialIntroTutorial,

正如你所提到的,这个安卓库展示了一个与Google表格相似的材料介绍教程.

另外,这个库为每个页面设置了背景颜色,当在两个页面之间滚动时,这两种颜色会相互淡化.

以下是一些可以帮助您的简介:

  1. https://github.com/HeinrichReimer/material-intro
  2. https://github.com/PaoloRotolo/AppIntro


yan*_*ver 5

我在这里找到了这个库:

CircleIndicator图书馆

它创建了一个类似Lollipop的ViewPager与这些圈子.只需格式化布局,使其适合您的应用程序,然后您就可以了.它不包含动画,但我认为这是一个开始.