Closed rahat14 closed 9 months ago
Hey 👋
Thx for trying ProgramGuide
!
I guess you are referring to the issue, when the program guide is not scrolled automatically on the focused item. In this case I would recommend to add an onFocusChanged
modifier to your composables for program cell / channel / timeline, and use an appropriate ProgramGuideState::animateTo*
method for each.
For example for cell item it would be:
ProgramCell(
program = program,
onClick = {
...
},
modifier = Modifier
.onFocusChanged { focusState ->
if (focusState.hasFocus) {
val index = programs.indexOf(program)
scope.launch { state.animateToProgram(index) }
}
}
)
This way the focused item will always be visible, see the video below:
https://github.com/oleksandrbalan/programguide/assets/80771513/5b07a03c-7639-4133-b818-d00f620feaf8
i will definitely try and give feed back to u
Item does not scroll with dpad