Giter Club home page Giter Club logo

guidelayout's Introduction

新手引导库

思路

灵感来源于PS的图层概念。

  1. 每个新手引导画面为一个图层
  2. 容器显示图层以及背景色
  3. 通过设置锚点确定图层的位置(相当于PS中的可整体拖动图层)

效果演示

API

XML属性

Name Type Default Description
closest boolean false 图层最靠近锚点控件
to_anchor [left_to_left|left_to_right|right_to_left|right_to_right|center_horizontal]|
[top_to_top|top_to_bottom|bottom_to_top|bottom_to_bottom|center_vertical]
left_to_left|top_to_top 靠近锚点的位置
to_anchor_x dimension 0 和锚点x偏移量
to_anchor_y dimension 0 和锚点y偏移量

GuideLayout

Method description
addFrame(int layoutId) 新增图层
addFrame(GuideFrame view) 新增图层
toFrame(int i) 显示图层
getFrame(int index) 获取图层
getFrameIndex() 获取当前图层索引
dismiss() 移除新手引导

GuideFrame

Method description
setAnchorView(View view) 设置锚点
setAnchorRect(Rect rect) 设置锚点
setDrawDecor(Decor drawDecor) 设置Decor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.