1、将启动图片保存到Drawable文件夹下
2、在Drawable文件夹下创建splashscreen.xml
<?xml version="1.0" encoding="utf-8" ?>
3、在android项目的 Resources 文件夹下添加“Values”文件夹,创建 Styles.xml,设置其创建内容如下:
[Activity(MainLauncher = true, NoHistory = true, Theme = “@style/Theme.Splash”,
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class SplashScreen : Activity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
var intent = new Intent(this, typeof(MainActivity));
StartActivity(intent);
Finish();
}
}