-
Notifications
You must be signed in to change notification settings - Fork 144
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
[Enhancement] Enabling floating Info bar #390
[Enhancement] Enabling floating Info bar #390
Conversation
@Composable | ||
private fun ZePagesLazyList( | ||
paddingValues: PaddingValues, | ||
lazyListState: LazyListState, | ||
slots: Map<ZeSlot, ZeConfiguration>, | ||
sendPageToBadgeAndDisplay: (ZeSlot) -> Unit, | ||
slotToBitmap: (ZeSlot) -> Bitmap, | ||
customizeSponsorSlot: (ZeSlot) -> Unit, | ||
customizeSlot: (ZeSlot) -> Unit, | ||
resetSlot: (ZeSlot) -> Unit, | ||
modifier: Modifier = Modifier, | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extracting the list in a separate method, this will allow us to enable the preview functionality in the future without depending on the VM
|
||
if (message.isNotEmpty()) { | ||
InfoBar( | ||
modifier = Modifier.align(Alignment.BottomCenter), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To change the InfoBar position, just change the Alignment on this line. e.g. if you want to put it at the top the aligment would be Aligment.TopCenter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks.
Summary
Enabling floating Info bar to avoid list auto scrolling to the top
Solves #391
How It Was Tested
Manually tested according to the videos.
Screenshot/Gif
TEST_WEATHER.webm
FLOATING.INFOBAR.mp4
Screenshot Name