Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
T

TextSurface

> 编程语言
Open source

A little animation framework which could help you to show message in a nice looking way

2.4K stars0 likes0 views
WebsiteGitHub

About

A little animation framework which could help you to show message in a nice looking way

# TextSurface A little animation framework which could help you to show message in a nice looking way.

### Usage 1. Create [`TextSurface`](library/src/main/java/su/levenetc/android/textsurface/TextSurface.java) instance or add it in your layout. 2. Create [`Text`](library/src/main/java/su/levenetc/android/textsurface/Text.java) instancies with [`TextBuilder`](library/src/main/java/su/levenetc/android/textsurface/TextBuilder.java) defining appearance of text and position: ```Java Text textDaai = TextBuilder .create("Daai") .setSize(64) .setAlpha(0) .setColor(Color.WHITE) .setPosition(Align.SURFACE_CENTER).build(); ``` 3. Create animations and pass them to the [`TextSurface`](library/src/main/java/su/levenetc/android/textsurface/TextSurface.java) instance: ```Java textSurface.play( new Sequential( Slide.showFrom(Side.TOP, textDaai, 500), Delay.duration(500), Alpha.hide(textDaai, 1500) ) ); ``` See full sample [`here`](app/src/main/java/su/levenetc/android/textsurface/sample/checks/CookieThumperSample.java). ### Adjusting animations - To play animations sequentially use [`Sequential.java`](library/src/main/java/su/levenetc/android/textsurface/animations/Sequential.java) - To play animations simultaneously use [`Parallel.java`](library/src/main/java/su/levenetc/android/textsurface/animations/Parallel.java) - Animations/effects could be combined like this: ```Java new Parallel(Alpha.show(textA, 500), ChangeColor.to(textA, 500, Color.RED)) ``` i.e. alpha and color of text will be changed simultaneously in 500ms ### Adding your own animations/effects There're two basic classes which you could extend to add custom animation: - [`AbstractSurfaceAnimation.java`](library/src/main/java/su/levenetc/android/textsurface/animations/AbstractSurfaceAnimation.java) to animate basic parameters like `alpha`, `translation`, `scale` and others. (See [`Alpha.java`](library/src/main/java/su/levenetc/android/textsurface/animations/Alpha.java) or [`ChangeColor.java`](library/src/main/java/su/levenetc/android/textsurface/animations/ChangeColor.java)) - [`ITextEffect.java`](library/src/main/java/su/levenetc/android/textsurface/interfaces/ITextEffect.java) interface which could be used for more complex animations. (See [`Rotate3D.java`](library/src/main/java/su/levenetc/android/textsurface/animations/Rotate3D.java) or [`ShapeReveal.java`](library/src/main/java/su/levenetc/android/textsurface/animations/ShapeReveal.java)) ### Proguard configuration The framework is based on standard android animation classes which uses `reflection` extensively. To avoid obfuscation you need to exclude classes of the framework: ``` -keep class su.levenetc.android.textsurface.** { *; } ``` ### Download ```Groovy repositories { maven { url "https://jitpack.io" } } //... dependencies { //... compile 'com.github.elevenetc:textsurface:0.9.1' } ``` ### Licence http://www.apache.org/licenses/LICENSE-2.0

GitHub Issues· 0 open

View all on GitHub

No open issues yet, or sync has not completed.

Highlights

  • •To play animations sequentially use Sequential.java
  • •To play animations simultaneously use Parallel.java
  • •Animations/effects could be combined like this:
  • •AbstractSurfaceAnimation.java to animate basic parameters like alpha, translation, scale and others. (See Alpha.java or ChangeColor.java)
  • •ITextEffect.java interface which could be used for more complex animations. (See Rotate3D.java or ShapeReveal.java)

> Tags

Javaandroidandroid-libraryandroid-uianimation

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言