在github上有一个开源项目:JumpingBeans,其项目主页是:https://github.com/frakbot/JumpingBeans 
JumpingBeans将一个普通的Android TextView中显示的字符串可以做到波浪式跳动。JumpingBeans使用起来简单,

仅仅在Android的Java代码中将一个普通Android TextView加载即可:

注意:需要jdk1.7

 package zzw.demo;

 import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import net.frakbot.jumpingbeans.JumpingBeans; public class MainActivity extends Activity { @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main); // 增加跳动的点
final TextView textView1 = (TextView) findViewById(R.id.textView1);
JumpingBeans jumpingBeans1 = JumpingBeans.with(textView1)
.appendJumpingDots()
.build(); // 从第一个字符串到最后一个字符串波浪式循环跳动, textView2.getText().length()不能为0
final TextView textView2 = (TextView) findViewById(R.id.textView2);
JumpingBeans jumpingBeans2 = JumpingBeans.with(textView2)
.makeTextJump(0, textView2.getText().length())
.setIsWave(true)
.setLoopDuration(3000)
.build();
}
}

xml:

 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.zzw.testjumpingbeans.MainActivity" > <TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:text="http://www.cnblogs.com/zzw1994"
android:textColor="@android:color/holo_blue_light"
android:textSize="20sp" /> <TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="http://www.cnblogs.com/zzw1994"
android:textColor="@android:color/holo_red_light"
android:textSize="20sp" /> </RelativeLayout>

TextView字符串波浪式跳动--第三方开源---JumpingBeans的更多相关文章

  1. 开源框架】Android之史上最全最简单最有用的第三方开源库收集整理,有助于快速开发

    [原][开源框架]Android之史上最全最简单最有用的第三方开源库收集整理,有助于快速开发,欢迎各位... 时间 2015-01-05 10:08:18 我是程序猿,我为自己代言 原文  http: ...

  2. 粉笔网iPhone端使用的第三方开源库

    粉笔网iPhone端使用的第三方开源库 前言 最近有朋友问我粉笔网 iPhone 端使用了哪些第三方的开源库.我在这儿整理了一下,分享给大家. ASIHttpRequest ASIHttpReques ...

  3. Android 第三方开源下拉框:NiceSpinner

    Android原生的下拉框Spinner基本上可以满足Android开发对于下拉选项的设计需求,但现在越来越流行的下拉框不满足于Android原生提供的下拉框Spinner所提供的设计样式,而改用自定 ...

  4. Android 第三方开源库收集整理(转)

    原文地址:http://blog.csdn.net/caoyouxing/article/details/42418591 Android开源库 自己一直很喜欢Android开发,就如博客签名一样,  ...

  5. 45.Android 第三方开源库收集整理(转)

    原文地址:http://blog.csdn.net/caoyouxing/article/details/42418591 Android开源库 自己一直很喜欢Android开发,就如博客签名一样,  ...

  6. Android第三方开源对话消息提示框:SweetAlertDialog(sweet-alert-dialog)

    Android第三方开源对话消息提示框:SweetAlertDialog(sweet-alert-dialog) Android第三方开源对话消息提示框:SweetAlertDialog(sweet- ...

  7. Android的SwipeToDismiss第三方开源框架模拟QQ对话列表侧滑删除,置顶,将头像图片圆形化处理。

      <Android SwipeToDismiss:左右滑动删除ListView条目Item> Android的SwipeToDismiss是github上一个第三方开源框架(github ...

  8. 第三方开源框架的下拉刷新列表(QQ比较常用的)。

    PullToRefreshListView是第三方开源框架下拉刷新列表,比较流行的QQ 微信等上面都在用. 下载地址(此开源框架于2013年后不再更新) 点此下载 package com.lixu.k ...

  9. 强大的网络通信框架(实现缓存)--第三方开源--volley

    Android Volley是Android平台上很好用的第三方开源网络通信框架.使用简答,功能强大. Android Volley的库jar包Volley.ja下载连接地址:Volley下载 下载后 ...

随机推荐

  1. Eclispe 安装PropertiesEditor插件

    一个不错的编写properties文件的Eclipse插件(plugin),有了它我们在编辑一些简体中文.繁体中文等Unicode文本时,就不必再使用native2ascii编码了.您可以通过Ecli ...

  2. NYOJ 52-无聊的小明

    点击打开链接 无聊的小明 时间限制:3000 ms  |  内存限制:65535 KB 难度:3 描述       这天小明十分无聊,没有事做,但不甘于无聊的小明聪明的想到一个解决无聊的办法,因为他突 ...

  3. mac下的几个命令-黑苹果之路

    涉及一些文件操作的命令: 1.去掉/加上windows下文件的系统.只读.隐藏等属性,用chflags,nounchg/unchg,nohidden/hidden 2.去掉文件的@属性(这个属性经常导 ...

  4. Sqoop2常用命令介绍

    命令行操作之Create Command 1.Create Connection Function create connection --cid 1  说明:Create new connectio ...

  5. windows Phone 浏览器窗口的尺寸

    移动设备的屏幕一般都比PC小很多,移动设备的浏览器会将一个较大的  “虚拟”  窗口映射到移动设备的屏幕上,然后按一定的比例(3:1或2:1)进行缩放.也就是说当我们加载一个普通网页的时候,移动浏览器 ...

  6. [原创] IIS7下顶级域名301跳转到WWW域名

    百度搜索了众多方法,居然没有一个全面的IIS7下301域名跳转能用的教程,最终自己研究出了个可以用的供大家参考.1.绑定域名01ruodian.cn www.01ruodian.cn到空间: 2.在I ...

  7. 【CImg】简单的畸变矩形矫正

    三个角点确定一个平面,畸变的平面可以看成是不同基底下同一图像的表示 ============================我是分割线============================= 1. ...

  8. Android开发-API指南-<data>

    <data> 英文原文:http://developer.android.com/guide/topics/manifest/data-element.html 采集(更新)日期:2014 ...

  9. Flex AdvancedDatagrid使用

    首先我先来看下利用Advanced Datagrid做出的效果,然后我们再对其中所利用的知识进行讲解,效果图如下: 我们来看下这个效果我们所用到的关于Advanced Datagrid的相关知识: 一 ...

  10. AX2012全新的批处理方式

    AX2009 的批处理操作我们是通过RunBaseBatch framework,我们所要做的事情就是继承RunBaseBatch class,实现里面该实现的方法来执行批处理. AX2012 的批处 ...