Advertisement
Guest User

Untitled

a guest
Jul 5th, 2015
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. public class SplashActivity extends Activity {
  2.  
  3. @Override
  4. protected void onCreate(Bundle savedInstanceState) {
  5. super.onCreate(savedInstanceState);
  6. //app_welcome_page
  7. LinearLayout view = (LinearLayout) getLayoutInflater()
  8. .inflate(R.layout.app_welcome_page, null);
  9. setContentView(view);
  10.  
  11. //渐变展示启动屏
  12. AlphaAnimation aa = new AlphaAnimation(0.3f,1.0f);
  13. aa.setDuration(3000);
  14. view.startAnimation(aa);
  15. aa.setAnimationListener(new AnimationListener()
  16. {
  17. @Override
  18. public void onAnimationEnd(Animation arg0) {
  19. finish();
  20. UIHelper.goMainActivity(WelcomePage.this);
  21. }
  22. @Override
  23. public void onAnimationRepeat(Animation animation) {}
  24. @Override
  25. public void onAnimationStart(Animation animation) {}
  26.  
  27. });
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement