dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.23k stars 1.76k forks source link

IndicatorTemplate not showing indicator 'pills' when CarouselView is in header of a CollectionView - and the items are added dynamically to the CarouselView #14898

Open gregmercer opened 1 year ago

gregmercer commented 1 year ago

Description

I've built the following app that shows the issue. https://github.com/gregmercer/MauiAppCarouselView https://github.com/gregmercer/MauiAppCarouselView/issues/1

Build and run this app for Android and use the following three buttons on the main page.

The IndicatorTemplate displays correctly for 'Add Carousel' and 'Static' but doesn't show the indicator position 'pills' for the 'Add Dynamic' case.

The 'Add Carousel' case is the CarouselView by itself on a ContentPage with items added to the carousel dynamically each time the button is clicked. Results: This displays the indicator pills correctly.

The 'Static' case is the CarouselView displayed in the header of a CollectionView - and the items have all been added to the carousel on the initial creation of the page. Results: This displays the indicator pills correctly.

The 'Add Dynamic' case is the CarouselView displayed in the header of a CollectionView - and the items are added one by one as you click each time on the 'Add Dynamic' button. Results: This does not displays the indicator pills correctly. You can see the green area where the indicator pills show be displayed, but they don't seem to render on Android.

The App displays the indicator correctly on the iPhone - for all three of the above cases.

Steps to Reproduce

  1. Build and run this app for Android and use the following three buttons on the main page.
  2. Use the three buttons on the main page: 'Add Carousel', 'Add Dynamic' and 'Static'
  3. Observe the indicator pills displaying for the 'Add Carousel' and 'Static' cases.
  4. Observe the indicator pills -not- displaying for the 'Add Dynamic' case.
  5. Run the same steps using iPhone. All three cases display correctly.

Link to public reproduction project repository

https://github.com/gregmercer/MauiAppCarouselView

Version with bug

6.0.312

Last version that worked well

6.0.312

Affected platforms

Android

Affected platform versions

Android API 33

Did you find any workaround?

Not as yet.

Relevant log output

No response

ghost commented 1 year ago

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

Zhanglirong-Winnie commented 10 months ago

Verified this issue with Visual Studio Enterprise 17.9.0 Preview 2. Can repro on android platform with sample project. https://github.com/gregmercer/MauiAppCarouselView