• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

gayanvoice/android-animations-kotlin: Awesome library in Kotlin using the view a ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

gayanvoice/android-animations-kotlin

开源软件地址(OpenSource Url):

https://github.com/gayanvoice/android-animations-kotlin

开源编程语言(OpenSource Language):

Kotlin 100.0%

开源软件介绍(OpenSource Introduction):

Android View Animations in Kotlin

Build Status API GitHub code size in bytes

Android View Animations in Java Android View Animations in Java

Get

Gradle

  1. Add this to build.gradle of project gradle dependency
allprojects {
	repositories {
		...
 		maven { url 'https://jitpack.io' }
	}
}
  1. Add this to build.gradle of app gradle dependency
dependencies {
	implementation 'com.github.gayanvoice:android-animations-kotlin:1.0.1'
}

Or

Maven

  1. Add this to build.gradle of project gradle dependency
<repositories>
	<repository>
		<id>jitpack.io</id>
	    	<url>https://jitpack.io</url>
	</repository>
</repositories>
  1. Add this to build.gradle of module gradle dependency
<dependency>
	<groupId>com.github.gayanvoice</groupId>
	<artifactId>android-animations-kotlin</artifactId>
	<version>1.0.1</version>
</dependency>

Usage

Java

Import render animations

import render.animations.*;

Start animation

// Declare TextView
TextView AppleText = findViewById(R.id.TextView);

// Create Render Class
Render render = new Render(MainActivity.this);

// Set Animation
render.setAnimation(Attention.Wobble(AppleText));
render.start();

Kotlin

Import render animations

import render.animations.*

Start animation

// Declare TextView
val textView: TextView = findViewById(R.id.TextView)

// Create Render Class
 val render = Render(this)

// Set Animation
render.setAnimation(Bounce().InDown(textView))
render.start()

Animations

To animate the view, add the class name and specific animation method namesetAnimation to an view. You can include the method setDuration to specify duration of animation. Default value for duration is 1000 Milliseconds. Finally you need to add one of the following classes to the view:

Class Name
Attention Bounce Fade Flip Rotate Slide Zoom

Attention

Attention
Bounce portfolio_view Flash portfolio_view
Pulse portfolio_view Ruberband portfolio_view
Shake portfolio_view Standup portfolio_view
Swing portfolio_view Tada portfolio_view
Wave portfolio_view Wobble portfolio_view

Bounce

Bounce
InDown portfolio_view InUp portfolio_view
InLeft portfolio_view InRight portfolio_view
In portfolio_view

Fade

Fade
InDown portfolio_view InUp portfolio_view
InLeft portfolio_view InRight portfolio_view
OutDown portfolio_view OutUp portfolio_view
OutLeft portfolio_view OutRight portfolio_view
In portfolio_view Out portfolio_view

Flip

Flip
InX portfolio_view InY portfolio_view
OutX portfolio_view OutY portfolio_view

Rotate

Rotate
InDownLeft portfolio_view InDownRight portfolio_view
InUpLeft portfolio_view InUpRight portfolio_view
OutDownLeft portfolio_view OutDownRight portfolio_view
OutUpLeft portfolio_view OutUpRight portfolio_view
In portfolio_view Out portfolio_view

Slide

Slide
InDown portfolio_view InUp portfolio_view
InLeft portfolio_view InRight portfolio_view
OutDown portfolio_view OutUp portfolio_view
OutLeft portfolio_view OutRight portfolio_view

Zoom

Zoom
InDown

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

上一篇:
CheckBoxStudio/BUAAThesis: 北航研究生学位论文模板(Word+LaTeX).发布时间:2022-07-09
下一篇:
niklabh/LatexResume: My Resume in Latex发布时间:2022-07-09
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap