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

[Pager] HorizontalPagerIndicator displays indicator even if pager is empty #1319

Closed
koral-- opened this issue Sep 2, 2022 · 3 comments · Fixed by #1329
Closed

[Pager] HorizontalPagerIndicator displays indicator even if pager is empty #1319

koral-- opened this issue Sep 2, 2022 · 3 comments · Fixed by #1329
Assignees
Labels
stale Stale issues which are marked for closure

Comments

@koral--
Copy link
Contributor

koral-- commented Sep 2, 2022

Description

I'm not sure if it is a bug or an intended behavior/simplification.
If there are no pages then I would expect that HorizontalPagerIndicator displays nothing rather than a single dot.

Steps to reproduce
Use the following code snippet:

val pagerState = rememberPagerState()
    HorizontalPager(
        count = 0,
        state = pagerState,
    ) { }

    HorizontalPagerIndicator(pagerState = pagerState)

Expected behavior

HorizontalPagerIndicator displays a single dot.

Additional context

Nothing is displayed.

Environment

    composeCompiler          version 1.3.0
    compose                   version 1.2.1
    accompanist              version 0.25.1
@andkulikov
Copy link
Collaborator

Yes, I think displaying nothing will be more correct. Feel free to contribute the fix!

koral-- added a commit to DroidsOnRoids/accompanist that referenced this issue Sep 9, 2022
koral-- added a commit to DroidsOnRoids/accompanist that referenced this issue Oct 5, 2022
@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale Stale issues which are marked for closure label Oct 10, 2022
@koral--
Copy link
Contributor Author

koral-- commented Oct 10, 2022

There is an activity in linked PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale issues which are marked for closure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants