I'm deploying an app which displays a splash screen.It deploys successfully but there is two apk being deployed at same time. If I try to delete one app both are getting deleted.It is quite strange.This is the code of my app.
MainActivity.cs
[Activity(Label = "abcTest", Icon = "@drawable/ic_logo_abc", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle bundle)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(bundle);
global::Xamarin.Forms.Forms.Init(this, bundle);
LoadApplication(new App());
}
}
Another activity created for splash screen
[Activity(Theme = "@style/Theme.Splash",
MainLauncher = true,
NoHistory = true)]
//[Activity(Label = "Vent_SplashActivity")]
public class Vent_SplashActivity : Activity
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
System.Threading.Thread.Sleep(3000);
StartActivity(typeof(MainActivity));
// Create your application here
}
}
splashscreen.xml
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@android:color/white" />
</shape>
</item>
<item>
<bitmap android:gravity="center" android:src="@drawable/splashnew" />
</item>
</layer-list>
** style.xml**
<style name="Theme.Splash" parent="android:Theme">
<item name="android:windowBackground">@drawable/splash_screen</item>
<item name="android:windowNoTitle">true</item>
</style>....
Please help me with this.