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

  • 相关阅读:
    ADO.NET 中的数据并发
    net中前台javascript与后台c#函数相互调用
    js正则函数match、exec、test、search、replace、split使用介绍集合
    jQuery遍历Table tr td td中包含标签
    SQL你必须知道的-查询聚合分组排序
    haut-1280 诡异的迷宫
    int、long long等的取值范围
    codeforce 855B
    nyoj-2357
    codeforces 858A
  • 原文地址:https://www.cnblogs.com/xgjblog/p/4228625.html
Copyright © 2011-2022 走看看