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下载 下载后 ...
随机推荐
- Codeforces 450D Jzzhu and Cities [heap优化dij]
#include<bits/stdc++.h> #define MAXN 100050 #define MAXM 900000 using namespace std; struct st ...
- NYOJ 52-无聊的小明
点击打开链接 无聊的小明 时间限制:3000 ms | 内存限制:65535 KB 难度:3 描述 这天小明十分无聊,没有事做,但不甘于无聊的小明聪明的想到一个解决无聊的办法,因为他突 ...
- iOS 数据存储 - 归档和解归档
这里的归档主要是用于自定义类的归档和解档.我们这里使用NSKeyedArchiver和NSKeyedUnarchiver来归档和解档. 注意:自己定义的类需要实现<NSCoding>,如: ...
- SQL执行的原理以及一些常见的关键字
sql语句在面试里面问道的问题: sql的解析的顺序 1.where里面的条件是从右向左扫描解析 2.from里面的大表在前,小表在后,解析的顺序是从右向左解析. 3.left/right/inner ...
- android 多级下拉菜单实现教程
原创,如转载请标明链接:http://blog.csdn.net/q610098308/article/details/50333387 很多App,都有二级菜单出现,但android 本身实现的菜单 ...
- 关于AIR新浪登录测试
/** *由于在应用申请中,我设置的域名属于新浪云,因此在本地测试的话肯定不能成功的,有个办法就是直接在新浪云那边授权成功后,将token的值直接使用post或者get方法传递过来,直接在本地 *lo ...
- C#如何在事件中获得GridView里面TextBox的值
GridView设置如下: <asp:GridView ID="GridViewlb" runat="server" AutoGenerateColumn ...
- 图形设备接口(GDI)
图形设备接口(GDI,Graphics Device Interface)负责在显示器和打印机上显示图形.GDI 是由几百个函数和一些相关的数据类型.宏和结构构成的.Windows 98/NT 中的图 ...
- c语言将2进制数转化为10进制数(栈的初始化,进栈,出栈)
//c语言描述 将2进制转化为10进制 #include <stdio.h> #include <stdlib.h> #include <math.h> #defi ...
- TCP/IP详解学习笔记(4)-- ARP 和 RARP
1.ARP 地址解析协议(Address Resolution Protocol,ARP)是在仅知道主机的IP地址时确地址解析协议定其物理地址的一种协议. 在TCP/IP协议中,A ...