开机动画,渐变

logo.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@android:color/white"
android:orientation="vertical"
android:gravity="center"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ImageView
android:id="@+id/logo_bg"
android:src="@drawable/index"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</LinearLayout>

public class LogoActivity extends BaseActivity {


/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.logo);
//3秒钟的渐变动画
AlphaAnimation aa=new AlphaAnimation(0.1f,1.0f);
aa.setDuration(3000);
View v=this.findViewById(R.id.logo_bg);
v.startAnimation(aa);
aa.setAnimationListener(new AnimationListener()
{

@Override
public void onAnimationEnd(Animation animation) {
// TODO Auto-generated method stub
finish();
Intent it=new Intent(LogoActivity.this,LoginAct.class);
LogoActivity.this.startActivity(it);
}

@Override
public void onAnimationRepeat(Animation animation) {
// TODO Auto-generated method stub

}

@Override
public void onAnimationStart(Animation animation) {
// TODO Auto-generated method stub

}
}
);

}

}

更多相关文章

  1. Activity切换动画无效(android:windowIsTranslucent)影响(androi
  2. Android 动画旋转效果
  3. Android 麦克风录音动画
  4. Android 动画小知识点
  5. android 逐帧动画
  6. Android动画效果生动有趣的通知NiftyNotification(Android Toast
  7. Android中的动画详解系列【4】——Activity之间切换动画

随机推荐

  1. 当侧面物品具有不同宽度时,保持中间物品居
  2. HTML5中Canvas画线技巧大全
  3. ie下不支持placeholder 用jquery来完成兼
  4. 控制Kendo UI Grid中的组顺序
  5. 如何在Javascript中插入HTML表体中的行?
  6. Chrome扩展程序开发:使用jQuery修改DOM
  7. html 页面内锚点定位及跳转方法总结
  8. jquery 触发a标签点击事件,弹出页面
  9. 如何防止滚动体内容,并在打开时允许在非画
  10. 如何在jQuery Datatables分页中返回特定