今天已经是看Ivan老师视频好几天了。。感觉最近有点跟不上。。所以写写笔记。
开始动画界面:
技术要点:
(1)全屏设置:
1. 代码:
//取消标题
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
// 取消状态栏
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
2.xml样式:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- name 是Style的名称,parent 继承那个父类样式 -->
<style name="theme_fullSreen" parent="@android:style/Theme.Black">
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">?android:windowNoTitle</item>
</style>
</resources>
(2)设置动画:
/**
* 设置Alpha动画
* 0~1
* time:3s
*/
animation = new AlphaAnimation(0.0f, 1.0f);
animation.setDuration(3000);//时间3s
imageLogo.setAnimation(animation);
animation.setAnimationListener(new AnimationListener() {
//动画结束时启动登陆界面
public void onAnimationEnd(Animation animation) {
Intent intent = new Intent(LogoActivity.this,
LogoInActivity.class);
startActivity(intent);
}