1 Star 17 Fork 4

Jenly / GuidePage

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

GuidePage

Image

Download JCenter JitPack CI CircleCI API License Blog QQGroup

GuidePage for Android 是一个App欢迎引导页。一般用于首次打开App时场景,通过引导页指南,概述App特色等相关信息

功能介绍

  • 链式调用,简单易用
  • 自定义配置,满足各种需求

Gif 展示

Image

引入

Maven:

<dependency>
  <groupId>com.king.guide</groupId>
  <artifactId>guidepage</artifactId>
  <version>1.0.0</version>
  <type>pom</type>
</dependency>

Gradle:

//AndroidX
implementation 'com.king.guide:guidepage:1.0.0'

Lvy:

<dependency org='com.king.guide' name='guidepage' rev='1.0.0'>
  <artifact name='$AID' ext='pom'></artifact>
</dependency>
如果Gradle出现compile失败的情况,可以在Project的build.gradle里面添加如下:(也可以使用上面的GitPack来complie)
allprojects {
    repositories {
        //...
        maven { url 'https://dl.bintray.com/jenly/maven' }
    }
}

示例

代码示例

    //简单调用示例
    GuidePage.load(intArrayOf(R.drawable.guide_page_1,R.drawable.guide_page_2,R.drawable.guide_page_3,R.drawable.guide_page_4))
            .pageDoneDrawableResource(R.drawable.btn_done)
            .start(this)//Activity or Fragment
      //Demo中的调用示例
      GuidePage.load(intArrayOf(R.drawable.guide_page_1,R.drawable.guide_page_2,R.drawable.guide_page_3,R.drawable.guide_page_4))
            .pageDoneDrawableResource(R.drawable.btn_done)
//            .indicatorDrawableResource(R.drawable.indicator_radius)
//            .indicatorSize(this,6f)//默认5dp
            .showSkip(v.id == R.id.btn1)//是否显示“跳过”
            .lastPageHideSkip(true)//最后一页是否隐藏“跳过”
            .onGuidePageChangeCallback(object : GuidePage.OnGuidePageChangeCallback{//引导页改变回调接口

                override fun onPageDone(skip: Boolean) {
                    //TODO 当点击完成(立即体验)或者右上角的跳过时,触发此回调方法
                    //这里可以执行您的逻辑,比如跳转到APP首页或者登陆页
                    if(skip){
                        Toast.makeText(this@MainActivity,"跳过",Toast.LENGTH_SHORT).show()
                    }else{
                        Toast.makeText(this@MainActivity,"立即体验",Toast.LENGTH_SHORT).show()
                    }
                }

            })
            .start(this)//Activity or Fragment

相关说明

  • 通过GuidePage链式调用,可以满足一些基本需求场景。
  • GuidePage中提供的配置无法满足需求时,可通过资源命名相同方式去自定义配置,即:资源覆盖方式。如dimensstyles等对应的资源。

更多使用详情,请查看app中的源码使用示例

版本记录

v1.0.0:2019-12-24

  • GuidePage初始版本

赞赏

如果您喜欢GuidePage,或感觉GuidePage帮助到了您,可以点右上角“Star”支持一下,您的支持就是我的动力,谢谢 :smiley:

您也可以扫描下面的二维码,请作者喝杯咖啡 :coffee:

关于我

Name: Jenly

Email: jenly1314#gmail.com / jenly1314#vip.qq.com

CSDN: jenly121

CNBlog: jenly

Github: jenly1314

加入QQ群: 20867961

The MIT License (MIT) Copyright (c) 2019 Jenly Yu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

:page_facing_up: GuidePage是一个App欢迎引导页库。一般应用于首次打开App时的场景,通过引导页指南,概述App特色等相关信息。(链式调用,一行代码搞定) 展开 收起
Kotlin
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Kotlin
1
https://gitee.com/jenly1314/GuidePage.git
git@gitee.com:jenly1314/GuidePage.git
jenly1314
GuidePage
GuidePage
master

搜索帮助