移动开发---背景渐变色(由蓝色变成红色),以及数字变化
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                移动开发---背景渐变色(由蓝色变成红色),以及数字变化
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                
                            
                            
                            //從藍色到紅色的背景變化private void toggleBackgroundColor(int BLUE, int ORANGE,int RED, long duration) {ValueAnimator colorAnim = ObjectAnimator.ofInt(findViewById(R.id.root), "backgroundColor", BLUE,ORANGE, RED);colorAnim.setDuration(duration);colorAnim.setEvaluator(new ArgbEvaluator());colorAnim.setRepeatCount(0);colorAnim.setRepeatMode(ValueAnimator.RESTART);colorAnim.start();mColorAnim = colorAnim.clone();}
 
//從0到最大值的變化private void changeText(int size) {ValueAnimator valueAnimator = ValueAnimator.ofInt(0, size);valueAnimator.setDuration(ANIMATION_DURATION_MILLIS);valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {@Overridepublic void onAnimationUpdate(ValueAnimator animation) {int progress = (int) animation.getAnimatedValue();mTvPhoneScore.setText(progress + "MB");}});valueAnimator.start();} 
                        
                        
                        ?
總結
以上是生活随笔為你收集整理的移动开发---背景渐变色(由蓝色变成红色),以及数字变化的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: django的通过set_passwor
- 下一篇: 攻防世界 re insanity
