Android 引导页面
来源:互联网 发布:网络维护人员 编辑:程序博客网 时间:2024/05/17 07:19
Loading.java
package com.tax;import android.app.Activity;import android.content.Intent;import android.os.Bundle;import android.view.Window;import android.view.animation.AlphaAnimation;import android.view.animation.Animation;import android.view.animation.Animation.AnimationListener;import android.widget.ImageView;public class Loading extends Activity {ImageView loading_img;public static Loading loading_instance = null;protected void onCreate(Bundle savedInstanceState) {requestWindowFeature(Window.FEATURE_NO_TITLE);super.onCreate(savedInstanceState);loading_instance = this;setContentView(R.layout.loading);loading_img = (ImageView) findViewById(R.id.loading_new);/* * An animation listener receives notifications from an animation. * Notifications indicate animation related events, such as the end or * the repetition of the animation. */AlphaAnimation animation = new AlphaAnimation(1.0f, 1.0f);// 设置透明度(0.0f,// 1.0f)渐变效果animation.setDuration(2000);// 设置动画时间毫秒loading_img.setAnimation(animation);animation.setAnimationListener(new AnimationListener() {@Overridepublic void onAnimationStart(Animation animation) {}@Overridepublic void onAnimationRepeat(Animation animation) {}@Overridepublic void onAnimationEnd(Animation animation) {//跳转到主界面Intent intent = new Intent(Loading.this, MainFragment.class);startActivity(intent);}});}}
Android 引导页面 ,启动应用后在引导页面停留指定时间后跳转到主界面。
比较简单不多说了!
loading.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" > <ImageView android:id="@+id/loading_new" android:layout_width="match_parent" android:layout_height="match_parent" android:adjustViewBounds="true" android:scaleType="fitXY" android:src="@drawable/loading" /></RelativeLayout>
0 0
- android仿微信引导页面
- android引导页面
- Android引导页面
- Android 引导页面
- Android引导页面
- android视频引导页面
- Android中的页面引导
- Android引导页面
- Android 引导页面 欢迎页面
- android 程序 页面引导图
- Android界面之引导页面
- Android引导页面的设计
- Android引导页面的实现
- Android屏蔽开机引导页面
- Android 欢迎页面 引导页
- Android之ViewPager实现欢迎引导页面
- Android比较大众的引导页面
- Android利用viewpage建立引导页面
- iOS快速集成支付宝(完善版)
- 2008数值统计
- cookie 和session 的区别详解
- BroadcaseReceiver刷新页面
- usemap做一个图片识别
- Android 引导页面
- 关于anysee系统论文
- 支付宝
- C语言的字符串
- android studio sdk 开发
- net.sf.json.JSONException: java.lang.reflect.InvocationTargetException
- 关于学习的一点想法
- Android 从系统媒体库中选择视频
- IJKMediaFramework最新打包的静态库