zoukankan      html  css  js  c++  java
  • TextView上的文字逐渐变淡直到消失

    给TextView加个动画效果,完了在个动画加个监听,里面有个动画执行完调用的方法在方法里面把TextView设置为gone,我觉得你直接加这个动画效果之后他就会不显示了,其实他还在那占有位置呢。想不占有位置就用我上面说的那个方法。

    TextView addTitle = (TextView)findViewById(R.id.addTitle);
                            addTitle.setText("[标题]AngelaBaby日本民族风");
                            AlphaAnimation alp = new AlphaAnimation(1.0f,0.0f);
                            alp.setDuration(3000);
                            addTitle.setAnimation(alp);
                            
                            alp.setAnimationListener(new AnimationListener(){
                        
                        public void onAnimationStart(Animation animation)
                        {
                                
                        }
                        
                        public void onAnimationRepeat(Animation animation)
                        {
                                
                        }
                        
                        public void onAnimationEnd(Animation animation)
                        {
                                addTitle.setVisibility(View.INVISIBLE);
                        }
                });

  • 相关阅读:
    详解go语言的array和slice 【一】
    node.js 事件循环
    搭建Docker私有仓库--自签名方式
    详解JavaScript闭包
    [个人翻译]Redis 集群教程(下)
    转:CMake 使用方法
    转: Ogre实现无缝地图要改的地方 记下来 用的时候可以看
    转:ogre的编译及安装
    转:Ogre TerrainGroup地形赏析
    转:如何编译delta3d
  • 原文地址:https://www.cnblogs.com/xgjblog/p/4228625.html
Copyright © 2011-2022 走看看