Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when made to to auto play only images are changing not indicators at the bottom #159

Closed
vikasacharya16 opened this issue Jan 7, 2020 · 0 comments
Labels

Comments

@vikasacharya16
Copy link

vikasacharya16 commented Jan 7, 2020

When i tried to auto play the images by below code

const carousel = args.object.getViewById("myCarousel");
    setInterval(() => {
        if (carousel.selectedIndex == carousel.items.length - 1)
            carousel.selectedIndex = 0;
        else
            ++carousel.selectedIndex;
    }, 3000);
}

only the images will auto play. but not indicators at the bottom.

but when i manually scroll it, the indicators will change and no problem.

this is my xml

<pager:Pager items="{{ image_array }}" row="0" id="myCarousel" loaded="carouselLoaded" unloaded="carouselUnloaded" spacing="0%" peaking="0%"  showIndicator="true" backgroundColor="lightsteelblue">
                <pager:Pager.itemTemplate>
                    <GridLayout>
                        <Image src="{{ image }}" stretch="aspectFill" />
                    </GridLayout>
                </pager:Pager.itemTemplate>
            </pager:Pager>
@triniwiz triniwiz added the bug label Jan 30, 2020
@triniwiz triniwiz mentioned this issue Feb 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants