Skip to content

Commit

Permalink
Bump version to 1.9.0 for LazyVerticalGrid addition
Browse files Browse the repository at this point in the history
  • Loading branch information
nanihadesuka committed Nov 8, 2023
1 parent cf12df2 commit 9ae88f5
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 8 deletions.
44 changes: 40 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
Compose implementation of the scroll bar. Can drag, scroll smoothly and includes animations.

### Features:
- Support for LazyColumn's sticky headers
- Support for LazyColumn's reverseLayout
- Supports LazyColumn, LazyVerticalGrid & Column
- Support sticky headers
- Support reverseLayout
- Optional current position indicator
- Multiple selection states (Disabled, Full, Thumb)
- Multiple selection actionable states (Always, WhenVisible)
Expand All @@ -32,11 +33,11 @@ Add it to your app build.gradle

```groovy
dependencies {
implementation 'com.github.nanihadesuka:LazyColumnScrollbar:1.8.0'
implementation 'com.github.nanihadesuka:LazyColumnScrollbar:1.9.0'
}
```

# How to use for lazyColumn
# How to use for LazyColumn

Simply wrap the LazyColumn with it

Expand Down Expand Up @@ -93,6 +94,41 @@ fun LazyColumnScrollbar(
)
```

# How to use for LazyVerticalGrid

Simply wrap the LazyVerticalGrid with it

```kotlin
val listData = (0..1000).toList()
val lazyGridState = rememberLazyGridState()

LazyGridVerticalScrollbar(lazyGridState) {
LazyVerticalGrid(state = lazyGridState) {
items(listData) {
Text(
text = "Item $it",
modifier = Modifier
.fillMaxWidth()
.padding(6.dp)
)
}
}
}
```

indicatorContent example:
```kotlin
indicatorContent = { index, isThumbSelected ->
Text(
text = "i: $index",
Modifier
.padding(4.dp)
.background(if (isThumbSelected) Color.Red else Color.Black, CircleShape)
.padding(12.dp)
)
}
```

# How to use for Column
Simply wrap the LazyColumn with it

Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId "my.nanihadesuka.lazycolumnscrollbar"
minSdk 21
targetSdk 33
versionCode 6
versionName "1.4.0"
versionCode 7
versionName "1.5.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
4 changes: 2 additions & 2 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
defaultConfig {
minSdk 21
targetSdk 33
versionCode 18
versionName "1.8.0"
versionCode 19
versionName "1.9.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand Down

0 comments on commit 9ae88f5

Please sign in to comment.