标签:
public
class
AppStart
extends
Activity {
@Override
public
void
onCreate(Bundle savedInstanceState) {
super
.onCreate(savedInstanceState);
final
View view = View.inflate(
this
, R.layout.start,
null
);
setContentView(view);
AlphaAnimation aa =
new
AlphaAnimation(
0
.3f,
1
.0f);
aa.setDuration(
2000
);
view.startAnimation(aa);
aa.setAnimationListener(
new
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
, Main.
class
);
startActivity(intent);
finish();
}
}
aa.setDuration(
2000
);就是设置持续时间,就是这个
标签:
原文地址:http://www.cnblogs.com/qq429314399/p/5336840.html