This commit is contained in:
Kyle Spearrin 2019-04-26 10:07:42 -04:00
parent baf77eb3a3
commit 9cb141ef62
3 changed files with 41 additions and 1 deletions

View file

@ -66,6 +66,7 @@
<PackageReference Include="Xamarin.Android.Support.v7.MediaRouter" Version="28.0.0.1" /> <PackageReference Include="Xamarin.Android.Support.v7.MediaRouter" Version="28.0.0.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="SplashActivity.cs" />
<Compile Include="Renderers\BoxedView\BoxedViewRecyclerAdapter.cs" /> <Compile Include="Renderers\BoxedView\BoxedViewRecyclerAdapter.cs" />
<Compile Include="Renderers\BoxedView\BoxedViewRenderer.cs" /> <Compile Include="Renderers\BoxedView\BoxedViewRenderer.cs" />
<Compile Include="Renderers\BoxedView\BoxedViewSimpleCallback.cs" /> <Compile Include="Renderers\BoxedView\BoxedViewSimpleCallback.cs" />

View file

@ -7,9 +7,9 @@ namespace Bit.Droid
{ {
[Activity( [Activity(
Label = "Bitwarden", Label = "Bitwarden",
MainLauncher = true,
Icon = "@mipmap/ic_launcher", Icon = "@mipmap/ic_launcher",
Theme = "@style/MainTheme", Theme = "@style/MainTheme",
Exported = false,
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
[Register("com.x8bit.bitwarden.MainActivity")] [Register("com.x8bit.bitwarden.MainActivity")]
public class MainActivity : Xamarin.Forms.Platform.Android.FormsAppCompatActivity public class MainActivity : Xamarin.Forms.Platform.Android.FormsAppCompatActivity

View file

@ -0,0 +1,39 @@
using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.OS;
using Android.Support.V7.App;
using System.Threading.Tasks;
using Android.Content;
namespace Bit.Droid
{
[Activity(
Label = "Bitwarden",
MainLauncher = true,
NoHistory = true,
Icon = "@mipmap/ic_launcher",
Theme = "@style/MainTheme.Splash",
WindowSoftInputMode = Android.Views.SoftInput.StateHidden,
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
[Register("com.x8bit.bitwarden.SplashActivity")]
public class SplashActivity : AppCompatActivity
{
public override void OnCreate(Bundle savedInstanceState, PersistableBundle persistentState)
{
base.OnCreate(savedInstanceState, persistentState);
}
protected override void OnResume()
{
base.OnResume();
var startupWork = new Task(() =>
{
var mainIntent = new Intent(Application.Context, typeof(MainActivity));
mainIntent.PutExtra("myVaultTile", Intent.GetBooleanExtra("myVaultTile", false));
StartActivity(mainIntent);
});
startupWork.Start();
}
}
}