首页>代码>一个三国电子日志版的android app程序>/java/com/example/administrator/project/WelcomeActivity.java
package com.example.administrator.project;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;

/**
 * Created by Administrator on 2017/11/22.
 */

public class WelcomeActivity extends AppCompatActivity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        final View view = View.inflate(this, R.layout.welcome, null);
        setContentView(view);

        //渐变展示启动屏
        AlphaAnimation aa = new AlphaAnimation(0.3f,1.0f);
        aa.setDuration(2000);
        view.startAnimation(aa);
        aa.setAnimationListener(new Animation.AnimationListener()
        {
            @Override
            public void onAnimationEnd(Animation arg0) {
                redirectTo();
            }
            @Override
            public void onAnimationRepeat(Animation animation) {}
            @Override
            public void onAnimationStart(Animation animation) {}

        });


    }

    /**
     * 跳转到...
     */
    private void redirectTo(){
        Intent intent = new Intent(this, MainActivity.class);
        startActivity(intent);
        overridePendingTransition(R.anim.out_alpha, R.anim.enter_alpha);
        finish();
    }
}
最近下载更多
阿九11111  LV4 2024年5月21日
求学的熊猫  LV11 2024年5月20日
121514713  LV2 2023年5月26日
dglin20001030  LV1 2023年5月18日
watsonChen  LV1 2023年2月9日
1532593037  LV8 2023年1月7日
yzhszz  LV3 2022年12月27日
SQ2930501923  LV14 2022年12月12日
Highlighz  LV4 2022年6月29日
g010112g  LV6 2022年5月22日
最近浏览更多
5460545 2024年12月24日
暂无贡献等级
chenranr  LV10 2024年12月20日
2636804923  LV6 2024年6月20日
AIWU1234  LV2 2024年6月9日
lilitu  LV6 2024年5月29日
今晚都别睡啦  LV9 2024年5月29日
happySuperman  LV2 2024年5月29日
阿九11111  LV4 2024年5月21日
Aban-beautiful 2024年5月13日
暂无贡献等级
求学的熊猫  LV11 2024年5月6日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友