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

Compose toggleable view for TV and Mobile #259

Closed
7 tasks done
StaehliJ opened this issue Oct 2, 2023 · 1 comment · Fixed by #262
Closed
7 tasks done

Compose toggleable view for TV and Mobile #259

StaehliJ opened this issue Oct 2, 2023 · 1 comment · Fixed by #262
Assignees
Milestone

Comments

@StaehliJ
Copy link
Contributor

StaehliJ commented Oct 2, 2023

As a user / integrator I want a composable like AnimatedVisibility that hide automatically after a delay.

Acceptance criteria

  • Toggleable view is working on Android TV and Mobile devices.
  • View can be toggled from a click or a key event.
  • A public api to set the delay and the visibility state is provided.

Tasks

  • Create a state object
  • ToggleView using state object
  • Preview composable
  • Implements on android tv and mobile demo player
  • Android TV controls
  • Mobile controls are usable with keyboard too
  • Check accessibility
@StaehliJ StaehliJ converted this from a draft issue Oct 2, 2023
@StaehliJ StaehliJ added this to the TV milestone Oct 2, 2023
@StaehliJ StaehliJ moved this from 📋 Backlog to 🚧 In Progress in Pillarbox Oct 4, 2023
@StaehliJ StaehliJ self-assigned this Oct 4, 2023
@StaehliJ StaehliJ linked a pull request Oct 5, 2023 that will close this issue
6 tasks
@StaehliJ
Copy link
Contributor Author

StaehliJ commented Oct 5, 2023

Accessibility

In compose we can get LocalAccessibilityManager that have a method to compute ideal timeout. After some experimentation, it make duration 3 times greater.

val manager = LocalAccessibilityManager.current
    val durationWithAccessibility = manager?.let {
        it.calculateRecommendedTimeoutMillis(
            duration.inWholeMilliseconds,
            containsIcons = true,
            containsText = true,
            containsControls = true
        ).milliseconds

The maintainVisibleOnFocus seems to not working with TalkBack.

Choice

When accessibility is enabled rememberDelayedVisibilityState force to disable auto hide mechanism.

@StaehliJ StaehliJ moved this from 🚧 In Progress to 🍿 Code Review in Pillarbox Oct 6, 2023
@github-project-automation github-project-automation bot moved this from 🍿 Code Review to ✅ Done in Pillarbox Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant