TextView字符串波浪式跳动--第三方开源---JumpingBeans
在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的更多相关文章
- 开源框架】Android之史上最全最简单最有用的第三方开源库收集整理,有助于快速开发
[原][开源框架]Android之史上最全最简单最有用的第三方开源库收集整理,有助于快速开发,欢迎各位... 时间 2015-01-05 10:08:18 我是程序猿,我为自己代言 原文 http: ...
- 粉笔网iPhone端使用的第三方开源库
粉笔网iPhone端使用的第三方开源库 前言 最近有朋友问我粉笔网 iPhone 端使用了哪些第三方的开源库.我在这儿整理了一下,分享给大家. ASIHttpRequest ASIHttpReques ...
- Android 第三方开源下拉框:NiceSpinner
Android原生的下拉框Spinner基本上可以满足Android开发对于下拉选项的设计需求,但现在越来越流行的下拉框不满足于Android原生提供的下拉框Spinner所提供的设计样式,而改用自定 ...
- Android 第三方开源库收集整理(转)
原文地址:http://blog.csdn.net/caoyouxing/article/details/42418591 Android开源库 自己一直很喜欢Android开发,就如博客签名一样, ...
- 45.Android 第三方开源库收集整理(转)
原文地址:http://blog.csdn.net/caoyouxing/article/details/42418591 Android开源库 自己一直很喜欢Android开发,就如博客签名一样, ...
- Android第三方开源对话消息提示框:SweetAlertDialog(sweet-alert-dialog)
Android第三方开源对话消息提示框:SweetAlertDialog(sweet-alert-dialog) Android第三方开源对话消息提示框:SweetAlertDialog(sweet- ...
- Android的SwipeToDismiss第三方开源框架模拟QQ对话列表侧滑删除,置顶,将头像图片圆形化处理。
<Android SwipeToDismiss:左右滑动删除ListView条目Item> Android的SwipeToDismiss是github上一个第三方开源框架(github ...
- 第三方开源框架的下拉刷新列表(QQ比较常用的)。
PullToRefreshListView是第三方开源框架下拉刷新列表,比较流行的QQ 微信等上面都在用. 下载地址(此开源框架于2013年后不再更新) 点此下载 package com.lixu.k ...
- 强大的网络通信框架(实现缓存)--第三方开源--volley
Android Volley是Android平台上很好用的第三方开源网络通信框架.使用简答,功能强大. Android Volley的库jar包Volley.ja下载连接地址:Volley下载 下载后 ...
随机推荐
- HDU 4405 【概率dp】
题意: 飞行棋,从0出发要求到n或者大于n的步数的期望.每一步可以投一下筛子,前进相应的步数,筛子是常见的6面筛子. 但是有些地方可以从a飞到大于a的b,并且保证每个a只能对应一个b,而且可以连续飞, ...
- hbase1.1.2安装
环境:hadoop2.6.1,zk3.4.6 1.配置环境变量 sudo vi /etc/profile.d/hbase-env.sh export HBASE_HOME=/usr/local/hba ...
- (转)log4net的配置详解
原文地址:http://blog.csdn.net/pfe_nova/article/details/12225349 log4net是一款优秀的第三方日志框架,可以很容易的加载到开发项目中(引用lo ...
- Library Cache: Lock, Pin and Load Lock
What is "Library cache lock" ? This event controls the concurrency between clients of the ...
- strtol函数
今天做啦一个进制转换的题,改来改去最终倒是过啦,本来挺开心的,然后去翻啦一下题解,瞬间就有小情绪啦,哎,人家的代码辣么辣么短,实在是不开心,不过谁让咱是小渣渣呢,在此总结一下strtol 函数. 先来 ...
- Bug管理工具的使用介绍(Bugger 2016)
1. Bugger 2016 介绍 Bugger 2016 is the version of Bugger adding support fot Team Foundation Server bug ...
- Android7.0 Phone应用源码分析(一) phone拨号流程分析
1.1 dialer拨号 拨号盘点击拨号DialpadFragment的onClick方法会被调用 public void onClick(View view) { int resId = view. ...
- Flex 中文字体终极解决方案
一直以来Flash对中文的支持就不是很好,很多人都发现很多汉字在Flex中无法设置粗体,就是其中一个表现,经过一晚上的折腾,终于突破了这个难题,其实,答案就在Adobe的官方教程里,只能怪自己英文水平 ...
- 在git 服务器挂载新的项目
1.cmd 到新创建的文件夹位置,然后 执行该命令git init --bare 2.在客户端克隆项目到文件夹(空),将项目复制到该空文件夹下,然后打开git extent,提交并推送
- eclipse 弹出智能提示、代码自动换行
在eclipse 中编写java 程序时,为了快速查找变量或搜索方法调用,在智能窗口的帮助下,程序的编写速度会更快,但eclipse 默认下并不弹出智能窗口,这就需要自己进行配置,设置的步骤如下: 打 ...