Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SplashActivity extends Activity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- //app_welcome_page
- LinearLayout view = (LinearLayout) getLayoutInflater()
- .inflate(R.layout.app_welcome_page, null);
- setContentView(view);
- //渐变展示启动屏
- AlphaAnimation aa = new AlphaAnimation(0.3f,1.0f);
- aa.setDuration(3000);
- view.startAnimation(aa);
- aa.setAnimationListener(new AnimationListener()
- {
- @Override
- public void onAnimationEnd(Animation arg0) {
- finish();
- UIHelper.goMainActivity(WelcomePage.this);
- }
- @Override
- public void onAnimationRepeat(Animation animation) {}
- @Override
- public void onAnimationStart(Animation animation) {}
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement