Android中有四种动画效果:
AlphaAnimation:透明度动画效果
ScaleAnimation:缩放动画效果
TranslateAnimation:位移动画效果
RotateAnimation:旋转动画效果
 
1.透明动画效果
 
 
 
public class MainActivity extends Activity {
	private Alp...
                            
                            
                                分类:
移动开发   时间:
2015-08-08 12:07:23   
                                阅读次数:
163
                             
                    
                        
                            
                            
                                _loadingView = [[UIImageView
alloc]initWithFrame:CGRectMake(150,
300, 
50, 50)];
   
_loadingView.image = [UIImage
imageNamed:@"22"];
    [self.view
addSubview:_loadingView];
   
CABasicAn...
                            
                            
                                分类:
其他好文   时间:
2015-08-06 18:25:53   
                                阅读次数:
118
                             
                    
                        
                            
                            
                                1、直接继承ViewGroup类,onMeasure测量子控件,onLayout第一个子控件放在边角,其他的子控件根据弧度计算其位置来进行layout。2、动画效果:第一个按钮的旋转动画 RotateAnimation,其他的控件TranslateAnimation和RotateAnimation两...
                            
                            
                                分类:
移动开发   时间:
2015-08-04 18:35:40   
                                阅读次数:
168
                             
                    
                        
                            
                            
                                1、设置旋转动画final RotateAnimation animation =new RotateAnimation(0f,360f,Animation.RELATIVE_TO_SELF, 0.5f,Animation.RELATIVE_TO_SELF,0.5f); animation.setI...
                            
                            
                                分类:
移动开发   时间:
2015-08-03 20:38:37   
                                阅读次数:
187
                             
                    
                        
                            
                            
                                android中提供了4中动画: AlphaAnimation 透明度动画效果 ScaleAnimation 缩放动画效果 TranslateAnimation 位移动画效果 RotateAnimation 旋转动画效果 本节讲解RotateAnimation 动画, RotateAnimation...
                            
                            
                                分类:
移动开发   时间:
2015-07-29 15:26:02   
                                阅读次数:
143
                             
                    
                        
                            
                            
                                demo地址效果图在别人网站上看到一个立体旋转的例子,然后突然想到自己前几天学习的css3旋转,就试着做了一个例子,看起来有一些粗糙。html结构很简单: 1 2 3 4 5 6 核心是一个ul,li列表,其中6个li...
                            
                            
                                分类:
Web程序   时间:
2015-07-28 00:22:05   
                                阅读次数:
245
                             
                    
                        
                            
                            
                                Android旋转动画核心方法public void startAnimation(Animation animation)
执行动画,参数可以是各种动画的对象,Animation的多态,也可以是组合动画,后面会有。
2个参数的构造方法/**
 * Constructor to use when building a RotateAnimation from code.
 * Default piv...
                            
                            
                                分类:
移动开发   时间:
2015-07-27 16:28:02   
                                阅读次数:
158
                             
                    
                        
                            
                            
                                项目有时会遇到用UIView 添加动画的情况,这里我觉得在layer上添加动画比较好,因为可以详细地设定动画属性,方便理解下面是一个旋转动画:-(void)roundBtnAction:(id)sender { UIButton * button = (UIButton *)sender; /...
                            
                            
                                分类:
其他好文   时间:
2015-07-27 10:46:22   
                                阅读次数:
100
                             
                    
                        
                            
                            
                                当我们需要做旋转动画时,默认情况都是以视图的中点作为轴进行旋转的,但有时我们需要改变旋转的轴,这个时候需要通过改变视图layer的anchorPoint属性来满足需求。 ????anchorPoint是一个CGPoint类型...
                            
                            
                                分类:
其他好文   时间:
2015-07-26 19:24:35   
                                阅读次数:
290
                             
                    
                        
                            
                            
                                最近有点时间想整理一下,自己做过的一些小的动画,分享出来。先看一下效果从整体上来看,效果还是蛮不错的,刻度也还是挺准确的。然后说一下思路:其实这种动画是一个蛮简单的小动画,整个效果只用了一个RotateAnimation的旋转动画。主要是要区分出旋转多少个刻度和每个刻度和刻度之间要旋转多少。因为我的...
                            
                            
                                分类:
移动开发   时间:
2015-07-21 01:18:44   
                                阅读次数:
167