Reputation: 2604
I have installed the CurrentActivityPlugin in my Xamarin.Form's Android project to gain access of the top current activity.
I have DashboardPage.xaml
& from this, I am navigating to another page MyProfilePage.xaml
. At this level, If I try to get the current activity using CrossCurrentActivity.Current.Activity
, it still gives me MainActivity
only. Is there any way to know which Activity is associated with MyProfilePage.xaml
?
Even, on Android's PageRenderer, it gives me MainActivity
as Context, regardless of any page I navigate through.
Is this how Xamarin.Forms behaves with Page's underlying activity?
Please refer to the Android's PageRenderer screenshot.
Upvotes: 0
Views: 873
Reputation: 7199
This is how Xamarin works. All the navigations are done within a single Activity, MainActivity.
Upvotes: 1