Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/omico/androidx-compose-material3-pullrefresh

A temporary solution for Jetpack Compose Material 3 pull refresh.
https://github.com/omico/androidx-compose-material3-pullrefresh

android jetpack jetpack-compose material material-components material3

Last synced: 4 months ago
JSON representation

A temporary solution for Jetpack Compose Material 3 pull refresh.

Awesome Lists containing this project

README

        

# androidx-compose-material3-pullrefresh

> [!Important]
> Since Compose Material3 1.2.0-alpha11, the compose team has been officially supported an experimental implementation of this component. Please take a look at `example/migrated-app` or visit the [official documentation](https://developer.android.com/reference/kotlin/androidx/compose/material3/pulltorefresh/package-summary) for more information.
>
> Hope this library can be deprecated soon. :)

This is a simple wrapper for Jetpack Compose Material3's `PullRefreshIndicator`. The official implementation is not compatible with Material 3 theme.

Official documentation for `androidx.compose.material.pullrefresh`
see [here]().

> [!Note]
> If you already used the pull refresh component from Compose Material.
>
> You only need to modify the package name from `androidx.compose.material.pullrefresh` into `androidx.compose.material3.pullrefresh` to complete the migration.

## Usage

This library only supports using composite build to import to your project because it will be archived when the official library is released.

> [!Note]
> `` is the path to this library.
>
> For example, if you put this library in `/libraries/androidx-compose-material3-pullrefresh`, then the path is `libraries/androidx-compose-material3-pullrefresh`.
>
> Or you can use absolute path too.

Copy `/library/local.properties.template` to `/library/local.properties` and follow the instructions in the file to fit your environment.

### For try it out or contribution purpose

Open `` in Android Studio.

### Use it in your project

> [!Note]
> If you cannot figure out the instructions below, the easiest way is just to copy the source code from `/library/src/main/kotlin` to your project as well.

In your root project's `settings.gradle.kts` or `settings.gradle` file, add the following:

```kotlin
includeBuild("/library") {
dependencySubstitution {
substitute(module("me.omico.compose:compose-material3-pullrefresh")).using(project(":"))
}
}
```

In your app module's `build.gradle.kts` or `build.gradle` file, add the following:

```kotlin
dependencies {
implementation("me.omico.compose:compose-material3-pullrefresh")
}
```

## License

```text
Copyright 2022 The Android Open Source Project
Copyright 2022-2024 Omico

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```