private void PagesAdapterOnItemClick(object sender, UserPagesAdapterClickEventArgs e) { try { var position = e.Position; switch (position) { case < 0: return; } var item = PagesAdapter.GetItem(position); switch (item) { case null: return; default: MainApplication.GetInstance()?.NavigateTo(ActivityContext, typeof(PageProfileActivity), item); break; } } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
// Event User Manage Pages => Using Get_User_Data_Object.Liked_Pages => Open Page_ProfileActivity private void ManagePagesAdapter_OnItemClick(object sender, UserPagesAdapterClickEventArgs adapterClickEvents) { try { var position = adapterClickEvents.Position; if (position >= 0) { var item = ManagePagesAdapter.GetItem(position); if (item != null) { var Int = new Intent(this, typeof(Page_ProfileActivity)); Int.PutExtra("UserPages", JsonConvert.SerializeObject(item)); Int.PutExtra("PagesType", "Liked_UserPages"); StartActivity(Int); } } } catch (Exception e) { Crashes.TrackError(e); } }