-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
4,269 additions
and
2,831 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
using System; | ||
|
||
using Android.App; | ||
using Android.OS; | ||
using Android.Runtime; | ||
using Plugin.CurrentActivity; | ||
|
||
namespace CryptoNews.Droid | ||
{ | ||
//You can specify additional application information in this attribute | ||
[Application] | ||
public class MainApplication : Application, Application.IActivityLifecycleCallbacks | ||
{ | ||
public MainApplication(IntPtr handle, JniHandleOwnership transer) | ||
:base(handle, transer) | ||
{ | ||
} | ||
|
||
public override void OnCreate() | ||
{ | ||
base.OnCreate(); | ||
RegisterActivityLifecycleCallbacks(this); | ||
//A great place to initialize Xamarin.Insights and Dependency Services! | ||
} | ||
|
||
public override void OnTerminate() | ||
{ | ||
base.OnTerminate(); | ||
UnregisterActivityLifecycleCallbacks(this); | ||
} | ||
|
||
public void OnActivityCreated(Activity activity, Bundle savedInstanceState) | ||
{ | ||
CrossCurrentActivity.Current.Activity = activity; | ||
} | ||
|
||
public void OnActivityDestroyed(Activity activity) | ||
{ | ||
} | ||
|
||
public void OnActivityPaused(Activity activity) | ||
{ | ||
} | ||
|
||
public void OnActivityResumed(Activity activity) | ||
{ | ||
CrossCurrentActivity.Current.Activity = activity; | ||
} | ||
|
||
public void OnActivitySaveInstanceState(Activity activity, Bundle outState) | ||
{ | ||
} | ||
|
||
public void OnActivityStarted(Activity activity) | ||
{ | ||
CrossCurrentActivity.Current.Activity = activity; | ||
} | ||
|
||
public void OnActivityStopped(Activity activity) | ||
{ | ||
} | ||
} | ||
} |
Oops, something went wrong.