Closed AhmedAdelGadElkareeem closed 5 years ago
To help clarify for @AhmedAdelGadElkareeem, the CarouselViewControl
loads correctly on ContentPage
appearing. However if the page is removed, added again, and "reappeared" - the CarouselViewControl
disappears. Tried ensuring Opacity
, InputTransparent
, IsEnabled
are all true, and they are. ItemsSource
shows it is working as well.
Problem originates, for me at least, in using a CarouselPage
on Android and implementing page switching via only having one Child added at a time (to remove swipe gesture between pages).
Essentially if the page with the carouselViewControl
is removed, if it is added back again the control disappears and cannot be interacted with.
I have a similar problem,
I have a tabbed page with 5 pages. Tab 1 contains the carouselview. Initially it works just fine.
when i add the carouselview to tab 3 it stays fine all the way
Only happends on Android.
Related to #481 #465 #388 Which should be fixed?
Hi Alex, it's Xamarin 4.0 now, and I this issue still exists. Not sure what the possible solution is. So I headed over to this issue tab and tried reporting but it seems that there are already reports regarding this issue.
Basically, the problem is, I have a Shell, and one of the pages is using your control. CarouselView shows on first launch without a problem, going to other tab and then going back to the page where the CarouselView is. The control doesn't show up anymore. I added a background color to CarouselView just to know what could be the issue, so I set the CarouselView's background to Red, run the app, now the app has a red background with the Carousel view pages, and then navigated to another page, and then going back. So this time, the pages where gone, but the red background is still there.
So I think the carousel view pages were removed and was not able to add them back .
I am back! Releasing new version in the next 2 weeks. This issue will be corrected.
@alexrainman > I am using Xamarin 4.0 Shell and the CarouselView version is 5.2.0. When I downgraded to 5.0.2, the bug is gone. I can just go back and forth to different pages with CarouselView in it, without any issues
While waiting for the update of this great control (I still wonder why it is not part of the Xamarin core yet) and also struggling with the ViewPageIndicator reference error, I found a quick and dirty workaround by clearing the content of the page before changing the main page.
public static void OpenPage(Page page)
{
// Workaround for Carousel Bug
var oldPage = Application.Current.MainPage;
if (oldPage is NavigationPage navPage)
{
if (navPage.RootPage is ContentPage contentPage)
{
contentPage.Content = null;
}
}
Application.Current.MainPage = page;
}
This leaves the current page blank for a moment, while the new page is being initialized, but at least the exception is gone... ;-)
Community, i have been working hard to release a new version. I am close to that point.
This issue and #481 #465 #388 which are related, will be corrected in the next release.
@alexrainman > I am using Xamarin 4.0 Shell and the CarouselView version is 5.2.0. When I downgraded to 5.0.2, the bug is gone. I can just go back and forth to different pages with CarouselView in it, without any issues
You saved my life. I still hope this will be fixed soon!
@alexrainman > I am using Xamarin 4.0 Shell and the CarouselView version is 5.2.0. When I downgraded to 5.0.2, the bug is gone. I can just go back and forth to different pages with CarouselView in it, without any issues
You saved my life. I still hope this will be fixed soon!
5.0.2 is the "Stable" version
i have same probleme i using '' xamarin form 5.0.0.2196 '' and '' CarouselView version is 5.2.0'' when i open page 1 as start page the CarouselView it works countaine items but when i switch to Page 2 and go back to page 1 it be null (Empty)
I still have this same problem and I noticed that when I change the size of the carousel after changing the page the view came back, so I put the carousel inside a stacklayout and gave it a name. So every time there is a page change it will change the size making the carousel appear again on android.
protected async override void OnAppearing()
{
base.OnAppearing();
if (StackDados.HeightRequest == 140)
{
StackDados.HeightRequest += 1;
}
else StackDados.HeightRequest -= 1;
}
the CarouselView appear for the first time i call the page and if go to another page and return to the page containing CarouselView , the CarouselView not appear -- Calling CarouselViewRenderer.Init() in MinActivity.cs