Giter Site home page Giter Site logo

lukesplash's Introduction

What's LukeSplash ?

It's a cool animation which can use in splash or anywhere else. 这是一个很酷的动画闪屏效果

Demo

Markdown

Article

[Luke哥教你用Canvas实现简单粒子动画]

Attributes

name format description 中文解释
pv_host_text string set left host text 设置左边主文案
pv_host_text_size dimension set host text size 设置主文案的大小
pv_particle_text string set right particle text 设置右边粒子上的文案
pv_particle_text_size dimension set particle text size 设置粒子上文案的大小
pv_text_color color set host text color 设置左边主文案颜色
pv_background_color color set background color 设置背景颜色
pv_text_anim_time integer set particle text duration 设置粒子上文案的运动时间
pv_spread_anim_time integer set particle text spread duration 设置粒子上文案的伸展时间
pv_host_text_anim_time integer set host text displacement duration 设置左边主文案的位移时间

Usage

Define your banner under your xml :

<com.lukebiubiubiu.splashview.SplashView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    pv:pv_background_color="#2E2E2E"
    pv:pv_host_text="github"
    pv:pv_host_text_size="14sp"
    pv:pv_particle_text=".com"
    pv:pv_particle_text_size="14sp"
    pv:pv_text_color="#FFF"
    pv:pv_text_anim_time="3000"
    pv:pv_spread_anim_time="2000"
    pv:pv_host_text_anim_time="3000" />

Start animation :

mSplashView.startAnim();

Add animation listener to listen the end callback :

mSplashView.setOnParticleAnimListener(new SplashView.ParticleAnimListener() {
    @Override
    public void onAnimationEnd() {
        Toast.makeText(MainActivity.this, "Animation is End", Toast.LENGTH_SHORT).show();
    }
});

Import

Step 1. Add it in your project's build.gradle at the end of repositories:

如何使用 帅比luke哥教你

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Step 2. Add the dependency:

	dependencies {
	       compile 'com.github.lukebiubiubiu:LukeSplash:v1.0.0'
	}

wechat 欢迎讨论

979433196

##License

lukesplash's People

Contributors

victorliuboom avatar

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.