android实现Splash闪屏效果示例
本文实例讲述了android实现Splash闪屏效果的方法。分享给大家供大家参考,具体如下:
Java代码:
public class Splash extends Activity{
private final int SPLASH_DISPLAY_LENGHT = 1000;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
new Handler().postDelayed(new Runnable(){
@Override
public void run() {
// TODO Auto-generated method stub
Intent mainIntent = new Intent(Splash.this, Application.class);
Splash.this.startActivity(mainIntent);
Splash.this.finish();
}
}, SPLASH_DISPLAY_LENGHT);
}
}
AndroidManifest.xml
Xml代码:
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".Application" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.DEFAULT" />
<category android:name="ndroid.intent.category.VIEW" />
</intent-filter>
</activity>
<activity android:name="Splash" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
PS:这里再为大家提供一个关于AndroidManifest.xml权限控制的在线查询工具:
Android Manifest功能与权限描述大全:
http://tools.jb51.net/table/AndroidManifest
更多关于Android相关内容感兴趣的读者可查看本站专题:《Android编程之activity操作技巧总结》、《Android视图View技巧总结》、《Android操作SQLite数据库技巧总结》、《Android操作json格式数据技巧总结》、《Android数据库操作技巧总结》、《Android文件操作技巧汇总》、《Android编程开发之SD卡操作方法汇总》、《Android开发入门与进阶教程》、《Android资源操作技巧汇总》及《Android控件用法总结》
希望本文所述对大家Android程序设计有所帮助。
相关文章
详解Android权限管理之Android 6.0运行时权限及解决办法
本篇文章主要介绍Android权限管理之Android 6.0运行时权限及解决办法,具有一定的参考价值,有兴趣的可以了解一下。2016-11-11
Android中HorizontalScrollView使用方法详解
这篇文章主要为大家详细介绍了Android中HorizontalScrollView使用方法,感兴趣的小伙伴们可以参考一下2016-05-05
Android为Tiny4412设备驱动在proc目录下添加一个可读版本信息的文件
今天小编就为大家分享一篇关于Android为Tiny4412设备驱动在proc目录下添加一个可读版本信息的文件,小编觉得内容挺不错的,现在分享给大家,具有很好的参考价值,需要的朋友一起跟随小编来看看吧2018-12-12
详谈OnTouchListener与OnGestureListener的区别
下面小编就为大家带来一篇详谈OnTouchListener与OnGestureListener的区别。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧2017-04-04


最新评论