accompanist | A collection of extension libraries for Jetpack Compose | Android library

 by   google Kotlin Version: v0.31.3-beta License: Apache-2.0

kandi X-RAY | accompanist Summary

kandi X-RAY | accompanist Summary

accompanist is a Kotlin library typically used in Mobile, Android applications. accompanist has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

Accompanist is a group of libraries that aim to supplement Jetpack Compose with features that are commonly required by developers but not yet available. Accompanist is a labs like environment for new Compose APIs. We use it to help fill known gaps in the Compose toolkit, experiment with new APIs and to gather insight into the development experience of developing a Compose library. The goal of these libraries is to upstream them into the official toolkit, at which point they will be deprecated and removed from Accompanist.

            kandi-support Support

              accompanist has a medium active ecosystem.
              It has 6531 star(s) with 515 fork(s). There are 90 watchers for this library.
              There were 9 major release(s) in the last 12 months.
              There are 37 open issues and 792 have been closed. On average issues are closed in 36 days. There are 8 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of accompanist is v0.31.3-beta

            kandi-Quality Quality

              accompanist has 0 bugs and 0 code smells.

            kandi-Security Security

              accompanist has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              accompanist code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              accompanist is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              accompanist releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              It has 19238 lines of code, 685 functions and 203 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of accompanist
            Get all kandi verified functions for this library.

            accompanist Key Features

            No Key Features are available at this moment for accompanist.

            accompanist Examples and Code Snippets

            No Code Snippets are available at this moment for accompanist.

            Community Discussions


            LazyColumn animateScrollBy does nothing?
            Asked 2022-Apr-05 at 07:41

            Update: original question followed by updated sample code that triggers it as requested.

            I have a list of times broken down by half hour in a lazy list

            E.g 12:00, 12:30

            The list is attached to a horizontal pager from the accompanist-pager library

            When a user is swiping between pages, I need to update the selected time, and I want the selected time to always be in the center of the screen, if it's not near the top/bottom where that can't be the case.

            The only way I've figured out how to accurately do this with the methods provided to us is as below.

            Note: i have previously captured the button / list height.



            Answered 2022-Apr-05 at 07:00

            Your pager behaves strangely because you're creating its state on reach recomposition:



            Show keyboard over Scaffold's bottomBar in Jetpack Compose and apply proper inset paddings
            Asked 2022-Mar-31 at 07:20

            I'm using Scaffold for my main screen with a fixed bottomBar that is visible in every screen of the app, and I'm applying the innerPadding of the Scaffold to its content.

            I want the keyboard to appear over the bottomBar, and for that I'm applying the imePadding() only to the Scaffold's content.

            However, when the keyboard is opened, both the Scaffold's innerPading and imePadding() are applied to the contents padding.

            I've tried to go through the Accompanist Insets migration, but no lucky.

            Is there anyway that I can prevent it and apply only one or the other?

            Here is a piece of my code:



            Answered 2022-Mar-31 at 07:20

            According to Accompanist Insets migration, LocalWindowInsets.current.ime should be replaced with WindowInsets.ime.

            It doesn't have isVisible for now, until this bug is fixed. Here's how I've re-created it for now:



            How to hide ActionBar with Jetpack Compose
            Asked 2022-Mar-24 at 08:50

            I want to hide default action bar, so in the Manifest file I have following code:



            Answered 2022-Mar-24 at 08:50

            If you need to hide status bar completely, you need to use a full screen theme, like showed in this answer

            Since Compose 1.2.0-alpha03, Accompanist Insets was mostly moved into Compose Foundation, check out migration guide for more details. The main changes to below answer is that ProvideWindowInsets is no longer needed and some imports should be replaced.

            If you need a transparent status bar, you can follow this answer, plus setup Accompanist Insets for compose like following:



            Accompanist Pager `offscreenLimit` removed. How to disable preloading of nearby pages?
            Asked 2022-Mar-14 at 17:07

            Since version v0.19.0; offscreenLimit parameter has been removed. How to disable preloading using some other technique?



            Answered 2022-Mar-14 at 17:07

            What about something like this?



            Jetpack Compose Floating Action Button is not showing up
            Asked 2022-Mar-13 at 06:43

            I have a bottom sheet dialog. For the dialog, I'm using ModalBottomSheetDialog from the Accompanist navigation library. In the dialog which is a composable fun that named PlatformsScreen, I have a LazyColumn with items that has RadioButton. Whenever any of the radio buttons is selected I'm adding the selected item into the selectedPlatforms which is a mutableList:



            Answered 2022-Mar-13 at 06:43

            It's a bug and I've reported it.

            Until it's fixed, the easiest solution at the moment is to switch to scaleIn / scaleOut transitions, they work fine.

            An other option is putting AnimatedVisibility is a Box of FAB static size, which is 56.dp, in this case other transitions work fine, except the clipped shadow. The shadow can be disabled by zeroing the elevation parameter, which is not the best solution either.



            Crash of app on open app when using compose 1.2.0-alpha02 and AnimatedNavHost
            Asked 2022-Mar-09 at 06:09

            my app crash on startup when I use animation with navigation via AnimatednavHost of accompanist with new alpha version of compose.

            compose version:.2.0-alpha02

            accompanist version :0.20.3




            Answered 2022-Mar-09 at 06:09

            update accompanist version to new stable one, and it will work



            android datastore-preferences: Property delegate must have a 'getValue(Context, KProperty<*>)' method
            Asked 2022-Feb-28 at 12:19

            I'm writing a jetpack compose android app, I need to store some settings permanently.

            I decided to use androidx.datastore:datastore-preferences:1.0.0 library, I have added this to my classpath.

            According to the descripton I have added this line of code to my kotline file at the top level:

            val Context.prefsDataStore: DataStore by preferencesDataStore(name = "settings")

            But I get a compile error:



            Answered 2022-Jan-13 at 09:20

            I got this error because of an incorrect import:



            How to add Swipe refresh from bottom of screen in compose?
            Asked 2022-Feb-21 at 03:04

            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 and in all of them swipe refresh comes from top of screen. is there any alternative for swipe refresh that comes from bottom of screen? or even a something that replicate dragging from bottom of screen.

            thanks in advance.



            Answered 2022-Feb-20 at 20:41

            Set the indicatorAlignment:



            Compose into existing project, No virtual method Int
            Asked 2022-Feb-19 at 22:59

            Cant make compose run in existing kotlin/native project for month now, trying to set default Greeting example to splash instead of its ui, cant make it:



            Answered 2021-Oct-02 at 07:10

            The issue is that your compile SDK is 31, you are targetting API 31 (Android 12) and not setting the exported attribute.

            You need to specify android:exported="true" in the manifest.

            If your app targets Android 12 and contains activities, services, or broadcast receivers that use intent filters, you must explicitly declare the android: exported attribute for these app components.



            Laggy/Slow Navigation between BottomNavigation composables - Jetpack Compose
            Asked 2022-Feb-19 at 14:00

            I am using a BottomNavigation with 4 composables. All of them have a LazyColumn with each item in the LazyColumn having an image populated from the network using Coil for Jetpack Compose. Similar to Twitter/YouTube.

            When I navigate between these items, the composables get destroyed and recompose only when navigated back to them. Even the coil images are cleared and re-fetched (from memory or local storage) when navigated between these composables. This is of course the expected behavior.

            The problem is that this is causing the navigation between them to be too slow. Coil images take about 400ms to 700ms to load the image for every navigation. Apps like YouTube/LinkedIn are literally instant in their BottomBar navigations.

            When I was using XML for this, I would make the fragments(used as bottom nav items ) with an appear/disappear logic to avoid this time delay while navigating between them.

            How do I achieve the same with Compose ?

            I am using the following versions:



            Answered 2022-Feb-19 at 14:00

            Well I had the same problem using emulator or phone both work well with small simplistic composables. And when I create more complex Composable and try animating the navigation, using the accompanist animation library it gets very laggy. But then I tried building the release APK file, since it is usually optimized and way faster, and that will significantly speed up your app. Here is link on how you can generate signed APK then install it on your phone or emulator and see if that fixes your problem!

            You could also check if you accidentally disabled the hardware acceleration from the manifest. Make sure you set android:hardwareAccelerated="true" in you activity tag.

            In case that does not help either, then you have to implement your own animation and use Shared ViewModel, for communication and triggering the transition from one Composable to another. The idea is that you can use modifier offset property to show/hide the Composable by placing it outside the screen.

            First set your ViewModel, and add mutable state variable, that will trigger the transition from Home to Settings and vice versa.

            This is not the best practice, since there is no way to directly pass data from one composable to another as you would normally do with the normal navigation. But you can still share data using the Shared ViewModel. Using this method it will not recompose your Composable, and thus be really fast. So far I have no problem with any out of memory exceptions even on some very old/slow devices with 2GB RAM.


            Community Discussions, Code Snippets contain sources that include Stack Exchange Network


            No vulnerabilities reported

            Install accompanist

            Snapshots of the current development version of Accompanist are available, which track the latest commit. See here for more information.


            Please contribute! We will gladly review any pull requests. Make sure to read the Contributing page first though.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link