Questions tagged [jetpack-compose-accompanist]

Accompanist is a group of libraries that aim to supplement Jetpack Compose with features that are commonly required by developers but not yet available.

https://github.com/google/accompanist

128 questions
5
votes
2 answers

Coil image caching not working with Jetpack Compose

I am using coil(version 2.1.0) to load images from URL. When there is network connection, the images are loading fine. However, when there is no network connection, the images are not being pulled from the cache as I expected them. Here's a block of…
5
votes
3 answers

In android jetpack compose when using accompanist permission how to detect if user revoked permission i.e. denied permission twice

I want to know how to detect when the user has revoked permission(denied permission twice) in the accompanist permission library, I also checked the library's GitHub repository and samples are old. I am using, compose_version =…
5
votes
1 answer

animateScrollToPage with slow sliding animation in Accompanist Pager

Is there a way to slow down the sliding interval when auto-scrolling to next page in Accompanist Pager? In the latest version, support for the same has been removed. The animationSpec, initialVelocity and skipPages parameters on…
Ali_Waris
  • 1,944
  • 2
  • 28
  • 46
5
votes
0 answers

Jetpack Compose Pager - lazy page loading

I have a HorizontalPager (com.google.accompanist:accompanist-pager:0.20.0) with two pages, each one containing a list of items. Each item has an enter animation that triggers on first composition. Upon composing the pager, both pages are also…
5
votes
1 answer

Accompanist systemUiController darkIcons doesn't work on Android 11

I'm using the Accompanist systemUiController library and I'm setting darkIcons=false while in Light Theme but the effect doesn't apply on devices with android 11. It seems to work on devices with android 10 for example. This is the code with which…
5
votes
2 answers

Jetpack Compose - HorizontalPager item spacing/padding for items with max width

Using Jetpack Compose and the accompanist pager, I'm trying to create a HorizontalPager where: Edges of items to the left and right of current item are shown There is a max width to the Pager items As an example, I wrote the following code (for…
4
votes
0 answers

Jetpack Compose Navigation: Showing multipled bottomsheets on top of each other

I'm trying to find a solution for displaying multiple bottom sheets on top of each other to accomodate our UX/Design. Currently been trying with Accompanist and Compose Navigation Reimagined, but to no avail. Seems like the built inner workings of…
4
votes
2 answers

Unresolved reference: pagerTabIndicatorOffset

I'm pretty new to jetpack and am following this guide. When trying to create my tabs I'm hitting an UnresolvedReference and I'm not sure why @ExperimentalPagerApi @ExperimentalMaterialApi @Composable fun Tabs(tabs: List, pagerState:…
4
votes
2 answers

How to implement transparent status bar in Jetpack Compose Android

I want to implement transparent status bar in jetpack compose. I have integrated the Accompanist library for this but it has no transparent effect on status bar. implementation "com.google.accompanist:accompanist-systemuicontroller:0.18.0" //…
4
votes
4 answers

Accompanist Pager animateScrollToPage doesn't scroll to next page correctly

Using accompanist-pager version 0.25.1, animateScrollToPage() doesn't seem to scroll all the way to make the next page fully visible, the previous page is still shown. The non animated version scrollToPage() seems to work fine however. Am I missing…
4
votes
3 answers

How to optimize AndroidView composable with a lazy list layout in compose

I have got two problems, scrolling through LazyColumn or VerticalPager with AndroidView filling the whole screen as a child item lags the screen and the scrolling behavior for a couple of milliseconds as well as overlapping items. In my code the…
4
votes
1 answer

Unexpected anchor value, expected a negative anchor in Compose app release builds

I'm using Kotlin 1.6.21, compose 1.2.0-alpha08 and accompanist 0.24.7-alpha in my project. When building a project with release build (both using and not using R8), my app crashes immediately on start, and I've been unable to find a workaround for…
4
votes
1 answer

Jetpack compose Accompanist HorizontalPager doesn't detect swipes

I have a HorizontalPager() in my screen and it doesn't detect swipes. Just for test i created default HorizontalPager() via docs Just pasted in my screen HorizontalPager(count = 10) { page -> Text( text = "Page: $page", modifier…
4
votes
1 answer

How to scroll view pager (accompanist library) on button click in jetpack compose Android

i want to scroll the view pager horizontally on button click in jetpack compose.Anyone have any idea about this ? Here i am using Accompanist library.
4
votes
1 answer

Is there any way to make two horizontal pager of accompanist library to work synchronously?

What I am trying to achieve is if there are two horizontal pagers, then on swiping top one to left then the bottom horizontal pager should swipe to right and vice-versa, have tried using pagerState scrollBy method but not getting desired output
1
2
3
8 9