关于像第一次进qq一样的那个渐变企鹅图的制作 渐变动画package com.moonweather.app.activity;import com.moonweather.app.R;import android.app.Activity;import android.cont ...
关于像第一次进qq一样的那个渐变企鹅图的制作 渐变动画
package com.moonweather.app.activity;import com.moonweather.app.R;import android.app.Activity;import android.content.Intent;import android.os.Bundle;import android.view.View;import android.view.animation.AlphaAnimation;import android.view.animation.Animation;import android.widget.ImageView;public class ShouyeActivity extends Activity { private ImageView ima;; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.shouye); ima=(ImageView) findViewById(R.id.ima); AlphaAnimation alphaAnimation = new AlphaAnimation(0.3f, 1.0f); alphaAnimation.setDuration(3*1000); alphaAnimation.setRepeatCount(0); ima.startAnimation(alphaAnimation); alphaAnimation.setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { } @Override public void onAnimationRepeat(Animation animation) { } @Override public void onAnimationEnd(Animation animation) {//这里可以写动画结束后的事件,比如说跳转 Intent intent=new Intent(ShouyeActivity.this,ChooseAreaActivity.class); startActivity(intent); ShouyeActivity.this.finish(); } }); }}
原标题:我的android学习经历39
关键词:Android
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。