- 浏览: 5783197 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (890)
- WindowsPhone (0)
- android (88)
- android快速迭代 (17)
- android基础 (34)
- android进阶 (172)
- android高级 (0)
- android拾遗 (85)
- android动画&效果 (68)
- Material Design (13)
- LUA (5)
- j2me (32)
- jQuery (39)
- spring (26)
- hibernate (20)
- struts (26)
- tomcat (9)
- javascript+css+html (62)
- jsp+servlet+javabean (14)
- java (37)
- velocity+FCKeditor (13)
- linux+批处理 (9)
- mysql (19)
- MyEclipse (9)
- ajax (7)
- wap (8)
- j2ee+apache (24)
- 其他 (13)
- phonegap (35)
最新评论
-
Memories_NC:
本地lua脚本终于执行成功了,虽然不是通过redis
java中调用lua脚本语言1 -
ZHOU452840622:
大神://处理返回的接收状态 这个好像没有监听到 遇 ...
android 发送短信的两种方式 -
PXY:
拦截部分地址,怎么写的for(int i=0;i<lis ...
判断是否登录的拦截器SessionFilter -
maotou1988:
Android控件之带清空按钮(功能)的AutoComplet ...
自定义AutoCompleteTextView -
yangmaolinpl:
希望有表例子更好。。。,不过也看明白了。
浅谈onInterceptTouchEvent、onTouchEvent与onTouch
已不再推荐补间动画,请使用属性动画;
http://blog.csdn.net/guolin_blog/article/details/43536355
http://blog.csdn.net/guolin_blog/article/details/43816093
动画中的View的点击判断
http://blog.csdn.net/seker_xinjian/article/details/7236945
Android 动画框架详解
http://www.ibm.com/developerworks/cn/opensource/os-cn-android-anmt1/index.html
每次点击往前100或往后100.
android 自定义Animation
http://lipeng88213.iteye.com/blog/1199120
http://www.ophonesdn.com/article/show/185
简单循环动画的实现:
使用:
http://blog.csdn.net/guolin_blog/article/details/43536355
http://blog.csdn.net/guolin_blog/article/details/43816093
动画中的View的点击判断
http://blog.csdn.net/seker_xinjian/article/details/7236945
Android 动画框架详解
http://www.ibm.com/developerworks/cn/opensource/os-cn-android-anmt1/index.html
每次点击往前100或往后100.
package com.ql.app; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.view.animation.LinearInterpolator; import android.view.animation.TranslateAnimation; import android.widget.Button; import android.widget.ImageView; public class App extends Activity { private Button btn_0,btn_1; private ImageView iv; private int count; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); iv = (ImageView)findViewById(R.id.iv); iv.bringToFront(); btn_0=(Button)findViewById(R.id.btn_0); btn_0.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub TranslateAnimation animation = new TranslateAnimation(count*100, 100+count*100, 0, 0); animation.setInterpolator(new LinearInterpolator()); animation.setDuration(400); animation.setFillAfter(true); iv.startAnimation(animation); count++; } }); btn_1=(Button)findViewById(R.id.btn_1); btn_1.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub TranslateAnimation animation = new TranslateAnimation(count*100, -100+count*100, 0, 0); animation.setInterpolator(new LinearInterpolator()); animation.setDuration(400); animation.setFillAfter(true); iv.startAnimation(animation); count--; } }); } }
android 自定义Animation
http://lipeng88213.iteye.com/blog/1199120
http://www.ophonesdn.com/article/show/185
简单循环动画的实现:
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" > <alpha android:interpolator="@android:anim/linear_interpolator" android:fromAlpha="1.0" android:toAlpha="0.1" android:duration="2000" android:repeatCount="infinite" android:repeatMode="reverse" /> </set> <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/linear_interpolator"> <translate android:fromXDelta="0" android:toXDelta="100%" android:duration="2000" android:repeatCount="infinite" android:repeatMode="reverse" /> </set> <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android"> <scale android:fromXScale="1.0" android:toXScale="2.0" android:fromYScale="1.0" android:toYScale="2.0" android:pivotX="50%" android:pivotY="50%" android:duration="2000" android:repeatCount="infinite" android:repeatMode="reverse" android:interpolator="@android:anim/linear_interpolator" /> </set>
使用:
import android.app.Activity; import android.os.Bundle; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.ImageView; import android.widget.TextView; public class App extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Animation alpha = AnimationUtils.loadAnimation(this, R.anim.anim_alpha); Animation translate = AnimationUtils.loadAnimation(this, R.anim.anim_translate); Animation scale = AnimationUtils.loadAnimation(this, R.anim.anim_scale); TextView tv=(TextView)findViewById(R.id.tv); tv.startAnimation(alpha); ImageView iv0=(ImageView)findViewById(R.id.iv0); ImageView iv1=(ImageView)findViewById(R.id.iv1); ImageView iv2=(ImageView)findViewById(R.id.iv2); iv0.startAnimation(alpha); iv1.startAnimation(translate); iv2.startAnimation(scale); } }
- Test_movement.rar (382 KB)
- 下载次数: 656
- TestAnimation.zip (185.7 KB)
- 描述: 简单循环动画
- 下载次数: 255
评论
4 楼
hualikejava
2013-05-07
如果有能介绍下AnimationSet TranslateAnimation更好,
3 楼
hubenshan
2012-11-29
kankan
2 楼
wangpeifeng669
2012-08-01
多谢。。前辈的文章都不错
1 楼
进阶兄
2011-09-06
多谢,但凡觉得有用的,都支持一下
发表评论
-
ViewPager引导页根据滑动渐变背景色
2017-03-31 09:38 28231、主要依赖: compile'com.android.su ... -
Android 新推出基于物理的动画库SpringAnimation,完全诠释什么叫做弹簧效果
2017-03-30 10:38 2579Android 最近推出一个新的基于物理学的动画支持库,命名为 ... -
一个比较强大的提供各种形状的ImageView
2016-12-26 09:54 2936github上比较老的项目了,但是还是比较好用的。 各种形状总 ... -
PhotoView点击放大图片效果
2016-12-21 10:13 6057使用的PhotoView是这个版本的,比较小巧,很好用,比gi ... -
仿微信页面切换图标颜色渐变效果
2015-11-23 14:54 4426主要是提供一种思路,一般来书,类似效果无非就是在Canvas, ... -
把任意Drawable转换成基于progress填充的drawable
2015-11-11 16:29 2758把任意Drawable转换成基于progress填充的draw ... -
一个用来设置警示View 的呼吸式背景颜色的工具类BreathingViewHelper
2015-10-10 14:03 3042一个简单的小工具类,用来设置警示 View 的呼吸式背景颜色 ... -
单手操作图片控件 镜像、置顶、缩放、移动:StickerView
2015-10-08 11:21 3174单手操作图片控件 镜像、置顶、缩放、移动 impo ... -
图片浏览zoom效果
2015-10-08 11:05 1800不仅实现了Lollipop中打开新的activity 的zoo ... -
Android App状态栏变色:ColorfulStatusBar
2015-09-24 12:38 9917适用于版本大于等于19以上。 import android ... -
PathView实现炫酷SVG动画
2015-08-25 09:23 4408解析SVG,需要将一个androidsvg.jar包含进lib ... -
LinearLayout增加divider分割线
2015-08-13 14:58 11058在android3.0及后面的版本在LinearLayout里 ... -
Android换肤白天/夜间模式的框架
2015-07-29 15:36 2936Android换肤/夜间模式的Android框架,配合them ... -
使用ActivityOptions做Activity切换动画
2015-04-10 11:02 6577不知道大家有没有注意到startActivity(Intent ... -
一个不错的ArcMenu
2015-01-23 10:34 3908ArcMenu这种效果现在很多人都实现了 而且代码质量也 ... -
使用ScheduledExecutorService延时关闭一个全屏的对话框
2014-12-29 16:38 4374自定义style,设置全屏属性 <resources ... -
让View只显示下边框
2014-10-23 17:13 3968下面的代码是实现一个带边框的xml,很常见 <?xm ... -
让一张图片从模糊慢慢变清晰动画过程
2014-01-27 16:38 9255import java.io.IOExcepti ... -
ListView,GridView之LayoutAnimation特殊动画的实现
2013-05-24 11:23 34374LayoutAnimation干嘛用的?不知道的话网上搜一下。 ... -
食神摇摇中图片的晃动效果
2013-04-27 11:45 5455可以是这样子实现滴: btn_shake=(Image ...
相关推荐
android中提供了4中动画: AlphaAnimation 透明度动画效果 ScaleAnimation 缩放动画效果 TranslateAnimation 位移动画效果 RotateAnimation 旋转动画效果 本节讲解TranslateAnimation动画,TranslateAnimation比较...
详情请见博客:https://blog.csdn.net/qq_20785431/article/details/101199524
本文讲述了Android补间动画基本使用(位移、缩放、旋转、透明)。...//创建为位移动画对象,设置动画的初始位置和结束位置 TranslateAnimation ta = new TranslateAnimation(10, 150, 20, 140); 1. x坐标的起点位
android动画 AlphaAnimation(透明度动画效果 );RotateAnimation(旋转动画效果);ScaleAnimation(缩放动画效果 ); TranslateAnimation(位移动画效果 )
Android系统提供了4种动画效果,分别是: AlphaAnimation(透明度动画效果 );RotateAnimation(旋转动画效果);ScaleAnimation(缩放动画效果 ); TranslateAnimation(位移动画效果 )
本文目录补间动画概述和分类各类补间动画实现xml实现补间动画透明度动画-AlphaAnimation缩放动画-ScaleAnimation位移动画-TranslateAnimation旋转动画-RotateAnimation动画组合-AnimationSet代码实现补间动画透明度...
包含AlphaAnimation渐变效果... TranslateAnimation:位移渐变 ScaleAnimation:缩放渐变 RotateAnimation:旋转渐变 AnimationSet:组合渐变 frameAnimation:帧动画的xml和代码实现方式,非常适合新手朋友参考。
viewpager的下横线指示器,使用translateAnimation位移动画实现被选中页卡的下横线的移动
android中提供了4中动画: AlphaAnimation 透明度动画效果 ScaleAnimation 缩放动画效果 TranslateAnimation 位移动画效果 RotateAnimation 旋转动画效果 本节讲解ScaleAnimation 动画, ScaleAnimation(float fromX...
android中提供了4中动画: AlphaAnimation 透明度动画效果 ScaleAnimation 缩放动画效果 TranslateAnimation 位移动画效果 RotateAnimation 旋转动画效果 本节讲解AlphaAnimation 动画,窗口的动画效果,淡入淡出...
主要类: Animation 动画 AlphaAnimation 渐变透明度 RotateAnimation 画面旋转 ScaleAnimation 渐变尺寸缩放 TranslateAnimation 位置移动 AnimationSet 动画集 一.AlphaAnimation 其中AlphaAnimation类第一个参数...
新特点是使用translateAnimation位移动画实现被选中的点的移动。而不是用以往的方法实现点的切换。之所以说是点的移动而不是点的切换是因为,运行代码滑动页面时真的可以看到像在Flash中绿点的移动效果。以往的方法...
//单个水平动画位移 private int two; private int three; private FragmentManager fragmentManager; private int displayWidth, displayHeight; @Override public void onCreate(Bundle savedInstanceState...
//执行位移动画 sayit_lines.startAnimation(animation); viewPager.setCurrentItem(checkedId); //ViewPager 跟随一起 切换 //记录当前 下标的距最左侧的 距离 tageDistance = (...