42 questions
3
votes
1
answer
186
views
Fatal Exception: java.lang.IllegalArgumentException Cannot coerce value to an empty range: maximum 0 is less than minimum 7
I’m using Jetpack Compose’s HorizontalPager with a dynamic list of items in my app. Occasionally, my crash reporting service logs the following crash, but I have never been able to reproduce it ...
0
votes
2
answers
147
views
Can't nest a LazyColumn inside a HorizontalPager
I need to nest a lazycolumn inside a horizontalpager, and I need the lazycolumn to have a verticalScroll(scrollState) to remember the current scroll between screen/orientation changes.
I created this ...
0
votes
1
answer
154
views
I'm using HorizontalPager in Jetpack Compose to move between stories, how to allow two behaviors like in WhatsApp or Instagram
I want to be able to move between a user's stories when touching on the right/left. And when swiping, move to the next/prev users' stories. How's this implemented?
Now, swiping moves between a single ...
1
vote
0
answers
201
views
Customize Accessibility on Horizontal Pager Jetpack Compose
I'm trying to customize the accessibility for the horizontal pager.
This is how the pager looks. The previous and next view are partially visible. But I don't want these partially visible views to ...
0
votes
0
answers
48
views
How to handle backward and forward pagination with HorizontalPager?
I am just trying to make a simple Pager which shows a text with the page number while scrolling. It should scroll forward and back wards infinitely. But for some reason it keeps increasing the page ...
0
votes
1
answer
146
views
Infinite HorizontalPager inside nested HorizontalPager cannot be scrolled
I have a HorizontalPager for my main pages and inside one of them also nests another HorizontalPager. For implementing the infinite scrolling, I make
val pagerState = rememberPagerState(30) { Int....
0
votes
1
answer
132
views
how to handle Back Navigation Logic for Horizontal View Pager with Nested Sub-Screens in Jetpack Compose?
How to write a logic for Horizontal view pager screens I have 4 main screen and in this 4 screen each screen has multiple screen or view depends how logic fits because there is a also back button in ...
3
votes
0
answers
175
views
HorizontalPager IndexOutOfBoundException
I haven't been able to actually get this to reliably reproduce, but I'm trying to set up a HorizontalPager which is an image carousel, but it paginates. It seems to run into an ...
1
vote
1
answer
74
views
How to navigate to specific page without intermediate pages?
I have the pages of my App in a horizontalPager for example if i navigate to page 2, and i'm currently at page 0, page 1 does show, how i prevent it from showing.
I want only to navigate from current ...
1
vote
0
answers
40
views
How to hide AlertDialog after leaving the Screen?
i have a SignUp page to store user data, i'm using HorizontalPager to view TextFields. At the last page when user click Submit if user didn't provide correct password and email, the AlertDialog pop up....
1
vote
1
answer
279
views
How to solve FocusRequester is not initialized?
I'm working on three pages: StartPage, LoginPage, and SignupPage, and I'm integrating them into a HorizontalPager.
In the SignupPage, i'm using requestFocus on textField.
The navigation flow is Start -...
2
votes
1
answer
721
views
DetectDragGestures on HorizontalPager
I have HorizontalPager with Images inside of swipeable card.
Here's how it looks
And you can swipe those cards like this.
The issue is when I'm pressing down on horizontal pager it intercepts all ...
1
vote
1
answer
94
views
Level difference in HorizontalPager Compose
I have two composable functions "ImageAndDescription"and "PageButtonsAndIndicator" implemented in a third composable file named "FullPage". I am using HorizontalPager in ...
1
vote
1
answer
361
views
how to add swipe detection to a HorizontalPager?
I am still new to coding in kotlin for android and I am having trouble with a function for my child Naming Application. This particular function is meant to allow users to swipe left and right on ...
5
votes
1
answer
739
views
Resolving scroll conflict: PullToRefresh (vertical) vs. Horizontal Pager in Jetpack Compose
I'm developing a screen in Jetpack Compose that combines two scrolling components: a PullToRefresh for vertical scrolling and an ImageSlider implemented using HorizontalPager for horizontal scrolling. ...
0
votes
1
answer
341
views
Zoom image outside bounders of JetpackCompose HorizontalPager
I'm trying to implement zooming an image using PointerEvent (2 fingers) and it's working perfectly (Zooming out of column bounders which is 0.4% of the screen height) when wrapped in a Column but it's ...
3
votes
1
answer
806
views
How to detect an attempt to swipe past the bounds of a HorizontalPager?
I'd like to detect when a user attempts to swipe past the last page of a HorizontalPager. At that point, I'd like it to scroll back to the first page. I don't want an infinite pager, I simply want it ...
1
vote
2
answers
168
views
Horizonal Pager offset is not coming to center after scrolling
I wrote a logic to scroll an image every 5 seconds. I also set the pageoffset to 0 while animating. But the currentPageOffset is not coming as expected as 0. It is automatically deviated to negative ...
1
vote
0
answers
635
views
Nested HorizontalPager in Jetpack Compose
I have a top level HorizontalPager, its pages can be just a single page composable or they can be another HorizontalPager. When the inner HorizontalPager can swipe pages in the direction of the user ...
0
votes
1
answer
249
views
App Crashing when swipping the HorizontalPagerIndicator in Jetpack Compose
I am using HorizontalPagerIndicator as below:
item {
Box {
HorizontalPager(
modifier = Modifier
....
1
vote
1
answer
918
views
How can I make the TabRow indicator scroll in sync with the HorizontalPager?
I'm trying to achieve a simple thing: I have a ScrollableTabRow and a HorizontalPager and I want to make the indicator of the ScrollableTabRow to move when I drag the HorizontalPager left or right.
...
0
votes
0
answers
283
views
HorizontalPager in LazyColumn. Jetpack Compose
The problem is that the pager is inside LazyColumn, and inside the pager is the list. When changing pages, if the dimensions of one do not match the other, then a white screen is visible for a long ...
0
votes
1
answer
865
views
Swiping don't work properly in Horizontal pager with scrollable tab row in compose
My horizontal pager doesn't work properly when adding some content to any screen.
Here, my first screen contains a simple card with four PNG logos and some text headers. But it has a lag and a ...
2
votes
0
answers
413
views
JetPack Compose HorizontalPager in LazyColumn does not retain focus when using TalkBack
We have a JetPack Compose HorizontalPager as one of many elements in a LazyColumn. The HorizontalPager has left and right pointing arrow buttons on each side to move to the previous or next item using ...
1
vote
0
answers
308
views
How to combine swipable bottom bar and Compose navigation?
I have a Compose app with bottom navigation. In total, the navigation works fine. But I need to integrate horizontal swipe so that the bottom tab can switch when I swipe screens. But I have problems ...
3
votes
1
answer
545
views
How to focus the currently selected intem in a horizontalPager?
I am working on an wearOS app with a HorizonalPager, which has a ScalingLazyColumn in each of its pages. For all who aren't so familiar with wearOS design elements: A ScalingLazyColumn is basicly just ...
0
votes
0
answers
911
views
HorizontalPager goes for infinite recomposition
I have issue with HorizontalPager.
My pseudo code looks like this:
Column {
TabsRow {
ScrollableTabsRow{}
}
Horizontal Pager {
Column {
SubCategories { ...
1
vote
1
answer
1k
views
LazyColumn Scroll Delay in HorizontalPager - Jetpack Compose
I'm encountering an issue while using Jetpack Compose. Specifically, when I have a LazyColumn inside a HorizontalPager, there is a noticeable scroll delay in the LazyColumn after the page changes. I'...
1
vote
0
answers
406
views
How to implement epub reader with Compose
Is that possible to create epub Reader on Android using HorizontalPager. If not tell me how should i aproach this. I want to do it with Jetpack Compose. And how should I implement text overflow? ...
2
votes
1
answer
522
views
LazyColumn inside HorizontalPager becomes scrollable with a delay after page changed
I am working on a an android jetpack compose screen. Simply, the page has a TabRow with 3 tabs. Every tab has LazyColumn which shows some ui components in a scrollable manner. Also, there is one ...
1
vote
0
answers
586
views
Android Jetpack Compose Nested ViewPager Scrolling issues
We are writing an android application using compose where we have been dictated that the UX needs to have nested tab rows with a nested viewpager (not a great ux, but I'm just a lowly dev, what do i ...
0
votes
1
answer
797
views
IllegalArgumentException when using Int.MAX_VALUE as page size in Jetpack compose HorizontalPager
I have implemented a infinite scrolling HorizontalPager in Jetpack compose. Intially it worked ok but recently i am getting (java.lang.IllegalArgumentException: Cannot coerce value to an empty range: ...
-1
votes
2
answers
2k
views
Jetpack Compose HorizontalPager offer by current page
I wanna implement this design: I have 2 pages, the second page's left side part visible on the first page, and the first page's right side on the second.
I played with contentPadding, pageSpacing, ...
5
votes
0
answers
750
views
Android : Jetpack Compose - How to remove a page from HorizontalPager?
So here's my HorizontalPager declaration
HorizontalPager(state = pagerState, beyondBoundsPageCount = 3)
My pagerSate is
var pagerState = rememberPagerState(
initialPage = currentArticleIndex, ...
2
votes
1
answer
2k
views
How to save HorizontalPager state when switching UI states in Jetpack Compose
I have two UI states: FIRST and SECOND. In the FIRST state, I have a HorizontalPager and other widgets. In the SECOND state, I have a simple Text widget. I am switching between the UI states with a ...
1
vote
0
answers
888
views
Jetpack Compose - Swipe interaction on HorizontalPager not working after BoM update
I recently updated my compose-BoM version from 2023.06.01 to 2023.08.00 (and later 2023.10.00) and also updated the navigation-compose dependency (which is not included in the BoM) from 2.6.* to 2.7.1 ...
0
votes
1
answer
363
views
How to sync TabRow indicator with HorizontalPager scroll offset?
Accompanist has https://google.github.io/accompanist/api/pager-indicators/com.google.accompanist.pager/pager-tab-indicator-offset.html
Without it, the indicator just jumps to end positions, doesn't ...
3
votes
1
answer
3k
views
JetpackCompose - Horizontal Pager Indicator click functionality
I am working on sample where I want to display items using HorizontalPager. I am able to display pages horizontally scrollable without issues. Also able to place indicators using ...
0
votes
1
answer
318
views
Can't provide graphicLayer{ translationZ = 1 } to pages in HorizontalPager, neither zIndex() would make any effect
I want to be able to arrange the HorizontalPager pages so I end up with the shown effect. The problem is that I can't find a way to make the next pages go behind the currentPage. I've tried zIndex() ...
3
votes
0
answers
2k
views
Why does HorizontalPager not remember PagerState when it is stored in a ViewModel or a global?
Whenever I try to move the pager state from the composable to my viewmodels the pager state stops remembering and the currently selected page is reset to zero on screen rotation changes. Here, I'm ...
3
votes
2
answers
1k
views
Horizontal pager misbehaving after the last item scroll
I'm using the pageSize attribute with a fixed width of 282.dp but when scrolling after the last item the scroll takes while after returning to the normal position and if another vertical scroll ...
6
votes
0
answers
2k
views
Pages beyond the bounds of HorizontalPager never call onDispose | Jetpack Compose
I've found strange behavior in HorizontalPager.
Pages beyond the bounds never call onDispose inside DisposableEffect. In other words, what kind of key DisposableEffect must consume in order to trigger ...