java #Splash Screen.java
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java #Splash Screen.java相关的知识,希望对你有一定的参考价值。
public class splash extends Activity{
protected int _splashTime = 1500;
public void onAttachedToWindow() {
super.onAttachedToWindow();
Window window = getWindow();
window.setFormat(PixelFormat.RGBA_8888);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
StartAnimations();
new Handler().postDelayed(new Runnable(){
@Override
public void run() {
try {
synchronized (this) {
}
}
} finally {
finish();
}
}
}, _splashTime);
}
private void StartAnimations() {
Animation anim = AnimationUtils.loadAnimation(this, R.anim.alpha);
anim.reset();
LinearLayout l=(LinearLayout) findViewById(R.id.lin_lay);
l.clearAnimation();
l.startAnimation(anim);
anim = AnimationUtils.loadAnimation(this, R.anim.translate);
anim.reset();
ImageView iv = (ImageView) findViewById(R.id.logo);
iv.clearAnimation();
iv.startAnimation(anim);
TextView aciklama = (TextView)findViewById(R.id.aciklama);
anim.reset();
aciklama.clearAnimation();
aciklama.startAnimation(anim);
TextView web = (TextView)findViewById(R.id.web);
anim.reset();
web.clearAnimation();
web.startAnimation(anim);
}
}
以上是关于java #Splash Screen.java的主要内容,如果未能解决你的问题,请参考以下文章
Delphi问题
Task :rn-splash-screen:verifyReleaseResources FAILED
JDK6 Splash Screen怎么在eclipse中使用?
Android简易音乐重构MVVM Java版-新增启动动画
Splash对接Scrapy
Splash 简介与安装