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

FloatingText

> 编程语言
Open source

[DEPRECATED] FloatingText is a text widget that can floating above view with animation

699 stars0 likes0 views
WebsiteGitHub

About

[DEPRECATED] FloatingText is a text widget that can floating above view with animation

DEPRECATED

I have developed the FloatingView ,FloatingView can make the target view floating above the anchor view with cool animation.FloatingText do the same thing, FloatingView can do, and FloatingView more convenient and powerful.so you can use FloatingView instead of FloatingText.

FloatingText

[ ](https://bintray.com/ufreedom/maven/FloatingTextLibrary/_latestVersion)

FloatingText is a text widget that can floating above view with animation .

Now we have 'Scale Floating','Scale Floating','Curve Floating',and you can also design custom a animation.

中文说明

Compatibility

  • Library - Android Honeycomb 3.0+
  • Sample - Android Honeycomb 3.0+

Usage:

1.Add Snapshot repository and add to dependencies:

groovy
dependencies {

     compile 'com.ufreedom.uikit:FloatingTextLibrary:0.2.0'
}
  1. Use FloatingText.FloatingTextBuilder to create a FloatingText:
…

3.Start floating

java
floatingText.startFloating(View); // FloatingText do floating animation relate to the view

Customisation:

1.Coordinates

2.Floating Animation

Implements FloatingAnimator interface and do animation in the applyFloatingAnimation method:

java
public interface FloatingAnimator {
     public void applyFloatingAnimation(FloatingTextView view);
}

ReboundFloatingAnimator

ReboundFloatingAnimator implements FloatingAnimator and support rebound animation.The rebound animation is Facebook's library Rebound。

There are three help methods;

  • createSpringByBouncinessAndSpeed : config rebound width bounciness and speed
  • createSpringByTensionAndFriction : config rebound width tension and friction
  • transition(float progress, float startValue, float endValue): use the method to get animated value .

progress : the progress of current animation startValue : the start value of your animation endValue : the end value of your animation

In this library : ScaleFloatingAnimator ,TranslateFloatingAnimator,BaseFloatingPathAnimator all implements ReboundFloatingAnimator interface。

For example : ScaleFloatingAnimator

…

3.Floating Path

Implements FloatingPathEffect and FloatingPathAnimator interface can custom you own floating path animation.

  • FloatingPath is the floating path
java
public interface FloatingPathEffect {

    abstract FloatingPath getFloatingPath(FloatingTextView floatingTextView);

}

create a path and then use FloatingPath.create(Path path, boolean forceClose) to create FloatingPath. if the forceClose's value is true,the path will be forced to close .

For example:CurveFloatingPathEffect :

java
public class CurveFloatingPathEffect implements FloatingPathEffect {

  @Override
     public FloatingPath getFloatingPath(FloatingTextView floatingTextView) {
         Path path = new Path();
         path.moveTo(0, 0);
         path.quadTo(-100, -200, 0, -300);
         path.quadTo(200, -400, 0, -500);
         return FloatingPath.create(path, false);
     }
}

4.Floating Path Animation

After use FloatingPathEffect to define the path,Then you should implements the BaseFloatingPathAnimator interface and do path animation.

For example: CurvePathFloatingAnimator :

…
  • applyFloatingPathAnimation(final FloatingTextView view, float start, float end) :

The param 'start' is the start value of the path,and the param 'end' is the end value of the path.

  • getFloatingPosition(float progress) :

    get the current animated path value ,[0] is x,[1] is y.

Changelog

Version: 0.2.0

  • Fix the position bug - Thanks MarsVard contribution

Version: 0.1.0

  • Initial Build

License

Copyright 2015 UFreedom

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Java

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 推出的简洁高效系统语言