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

  • 相关阅读:
    在Html中使用echarts图表
    html+css模拟微信对话
    解决React 的<img >src使用require的方式图片显示不出来,展示的是[object Module]的问题
    easygui入门
    python安装easygui
    关于gcc、make和CMake的区别
    FreeRTOS使用心得。
    C/C++整数输出位不足前补0方法
    AngularJS前端分页 + PageHelper后端分页
    AngularJS常见指令
  • 原文地址:https://www.cnblogs.com/xgjblog/p/4228625.html
Copyright © 2011-2022 走看看