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

  • 相关阅读:
    LVDS汇总
    smtp模块+Gmail搭建邮件发送功能
    网站建立(杂)
    xampp部署elgg
    转xampp 访问出现New XAMPP security concept
    FPGA参考电源
    android开发环境搭建问题
    cadence仿真前电路板设置(转)
    cadence串扰仿真 (转)
    cadence约束管理器总体设置 (转)
  • 原文地址:https://www.cnblogs.com/xgjblog/p/4228625.html
Copyright © 2011-2022 走看看