Accompanist is a group of libraries that aim to supplement Jetpack Compose with features that are commonly required by developers but not yet available.
Questions tagged [jetpack-compose-accompanist]
128 questions
2
votes
0 answers
Android, Compose. How to correctly test animated scroll in compose?
I'm trying to test accompanist PagerState.
The author has already added tests (https://github.com/google/accompanist/blob/main/pager/src/sharedTest/kotlin/com/google/accompanist/pager/PagerStateUnitTest.kt), however he uses scrollToPage, but I need…

testivanivan
- 967
- 13
- 36
2
votes
1 answer
Bluetooth Permission not working correctly in jetpack compose
I am using com.google.accompanist:accompanist-permissions:0.25.1 in my project. I am trying to request bluetooth permission in runtime which is requesting. I want to know how user know that permission is disable permanently.
Manifest.xml

Kotlin Learner
- 3,995
- 6
- 47
- 127
2
votes
1 answer
Problem with LaunchedEffect in composables of HorizontalPager
I'm creating a project with Compose, but I ran into a situation that I couldn't solve.
View Model:
data class OneState(
val name: String = "",
val city: String = ""
)
sealed class OneChannel {
object FirstStepToSecondStep :…

Maki
- 23
- 4
2
votes
3 answers
Get user's current location in Jetpack Compose Android
Intention:
I am trying to get user's current location after user grants (coarse/fine)location permission. I am using jetpack compose accompanist lib to manager permission.
So when user grants the permission, am using getCurrentLocation of…

Ankush
- 175
- 1
- 12
2
votes
0 answers
Poor performance HorizontalPager Jetpack Compose
My apps performance is pretty good overall, the only part where the FPS drops is when swiping through the HorizontalPager by accompanist.
Each Page has a simple LazyVerticalGrid with 3 fixed columns but the performance is way worse compared to…

HavanaSun
- 446
- 3
- 12
- 39
2
votes
0 answers
Remove extra bottom padding when using Accompanist Insets library in Compose
I have a column, containing TextFields, and a button at the bottom of the screen.
I'm trying to make the Column scrollable so that I can scroll down to see the button that hides behind the keyboard when that opens.
My Column looks like this.
…

Saul
- 91
- 2
- 14
2
votes
1 answer
Is there a way to disable right horizontal scrolling on jetpack-compose accompanist horizontal pager?
I have a basic exam in my app which is user should give some answer. After user answered the question than I want to allow swipe to right of horizontal pager. My pager is like down below.
pagerState = rememberPagerState()
HorizontalPager(
…

I.Yilmaz
- 49
- 8
2
votes
0 answers
OffscreenPageLimit behaviour for ViewPager from Accompanist
I am using HorizontalViewPager from Accompanist to show an image in each page of the viewpager. I am loading images with Coil. Here's the code:
val pagerState = rememberPagerState()
HorizontalPager(count = photos.size, state = pagerState) {
idx…

SpiralDev
- 7,011
- 5
- 28
- 42
2
votes
1 answer
Is there a way for lazy loading with FlowRow?
I use FlowRow in the accompanist project to auto wrap my text items to next line. It works as intended. However, when I have a large dataset (which I already load with paging), I don't find an api like LazyColumn to load and build the items as…

LXJ
- 1,180
- 6
- 18
2
votes
1 answer
Irregular Bottom Sheet Padding and Shadow with ModalBottomSheetLayout and Column
I Have a Root Level Composable with following structure.
ModalBottomSheetLayout(
bottomSheetNavigator = bottomSheetNavigator,
scrimColor = MaterialTheme.colors.surface.copy(alpha = 0.5f),
sheetContentColor = Color.Transparent,
…

Jugal Mistry
- 160
- 1
- 9
2
votes
2 answers
How to add Swipe refresh from bottom of screen in compose?
I need to create a reader screen for a book reader app in android and I need to have a a composable like swipe refresh that comes from the bottoms of page so the users go to next page.
I tried a google Accompanist vertical pager and swipe refresh…

Kazem Moridi
- 25
- 2
- 7
2
votes
1 answer
Android Jetpack Compose (Composable) How to properly implement Swipe Refresh
I use the SwipeRefresh composable from the accompanist library, I checked the examples, but I could not find sample that matches my needs. I want to implement element that is hidden above the main UI, so when the user starts swiping the box is…

slaviboy
- 1,407
- 17
- 27
2
votes
1 answer
swipe to refresh using accompanist
I'm using accompanist library for swipe to refresh.
And I adopt it sample code for testing, however, it didn't work.
I search for adopt it, but I couldn't find.
Is there anything wrong in my code?
I want to swipe when user needs to refresh
class…

Kyu-Ho Hwang
- 143
- 11
2
votes
4 answers
Loading local drawables with Coil Compose
I recently migrated from Accompanist's ImagePainter to Coil's, below is the pertinent code after my updates.
val painter = rememberImagePainter(DRAWABLE_RESOURCE_ID)
when (painter.state) {
is ImagePainter.State.Empty -> Timber.w("Empty")
is…

es0329
- 1,366
- 1
- 18
- 35
1
vote
2 answers
Android Compose,focusRequester.requestFocus() causing Fatal Exception: Expected BringIntoViewRequester to not be used before parents are placed
I am new to Android Compose and am working on a maintenance project.
The following block of code is where the error is…

Nitinraj Vallyedath
- 11
- 2