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);
                        }
                });

  • 相关阅读:
    网站视频播放器JCPlayer
    常用Linux命令操作
    对词法分析器的了解
    实验二简化版C语言中文理解程序文法
    词法分析
    实验三有穷自动机的构造和识别
    组合数据类型练习,综合练习
    零基础初学者学习编译原理
    用python画五星红旗
    Android环境搭建和编写helloworld
  • 原文地址:https://www.cnblogs.com/xgjblog/p/4228625.html
Copyright © 2011-2022 走看看