Skip to content

Commit

Permalink
Prepare to release v0.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
saket committed Nov 13, 2024
1 parent ff4fc5b commit c6fe9d9
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 17 deletions.
22 changes: 12 additions & 10 deletions docs/zoomable/index.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# Modifier.zoomable()

A `Modifier` for handling pan & zoom gestures, designed to be shared across all your media composables so that your users can use the same familiar gestures throughout your app. It offers,
A `Modifier` for handling pan & zoom gestures, designed to be shared across all your media composables so that your users can use the same familiar gestures throughout your app.

- Pinch to zoom and flings
- Double click to zoom
- Single finger zoom (double click and hold)
- Haptic feedback for over/under zoom
**Features**

- Gestures:
- Pinch-to-zoom and flings
- Double click to zoom
- Single finger zoom (double-tap and hold)
- Haptic feedback when reaching zoom limits
- Compatibility with nested scrolling
- Click listeners
- [Keyboard and mouse shortcuts](#keyboard-shortcuts)
- State preservation across config changes (including screen rotations)

### Installation

Expand Down Expand Up @@ -42,11 +46,9 @@ For preventing your content from over-zooming or over-panning, `Modifier.zoomabl
For richer content such as an `Image()` whose _visual_ size may not always match its layout size, `Modifier.zoomable()` will need your assistance.

```kotlin hl_lines="5-7"
val state = rememberZoomableState()
val painter = resourcePainter(R.drawable.example)

LaunchedEffect(painter.intrinsicSize) {
state.setContentLocation(
val zoomableState = rememberZoomableState().apply {
setContentLocation(
ZoomableContentLocation.scaledInsideAndCenterAligned(painter.intrinsicSize)
)
}
Expand All @@ -55,7 +57,7 @@ Image(
modifier = Modifier
.fillMaxSize()
.background(Color.Orange)
.zoomable(state),
.zoomable(zoomableState),
painter = painter,
contentDescription = …,
contentScale = ContentScale.Inside,
Expand Down
16 changes: 11 additions & 5 deletions docs/zoomableimage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,26 @@ A _drop-in_ replacement for async `Image()` composables featuring support for pa

**Features**

- [Sub-sampling](sub-sampling.md) of bitmaps
- Pinch to zoom and flings
- Double click to zoom
- Single finger zoom (double click and hold)
- Haptic feedback for over/under zoom
- Automatic [Sub-sampling](sub-sampling.md) of bitmaps
- Gestures:
- Pinch-to-zoom and flings
- Double click to zoom
- Single finger zoom (double-tap and hold)
- Haptic feedback when reaching zoom limits
- Compatibility with nested scrolling
- Click listeners
- [Keyboard and mouse shortcuts](#keyboard-shortcuts)
- State preservation across config changes (including screen rotations)

### Installation

=== "Coil"
```groovy
// For Coil 2.x
implementation("me.saket.telephoto:zoomable-image-coil:{{ versions.telephoto }}")

// For Coil 3.x
implementation("me.saket.telephoto:zoomable-image-coil3:{{ versions.telephoto }}")
```
=== "Glide"
```groovy
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android.enableBuildConfigAsBytecode=true
android.experimental.androidTest.enableEmulatorControl=true

GROUP=me.saket.telephoto
VERSION_NAME=0.14.0-SNAPSHOT
VERSION_NAME=0.14.0

SONATYPE_HOST=DEFAULT
RELEASE_SIGNING_ENABLED=true
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ plugins:

extra:
versions:
telephoto: '0.13.0' # Env var for the latest version on maven.
telephoto: '0.14.0' # Env var for the latest version on maven.

nav:
- 'Overview': index.md
Expand Down

0 comments on commit c6fe9d9

Please sign in to comment.