Git Product home page Git Product logo

zoomable's Introduction

Hi there ๐Ÿ‘‹

I'm an android app developer.

I like Jetpack Compose.

Anurag's GitHub stats

Top Langs

zoomable's People

Contributors

masato1230 avatar renovate[bot] avatar usuiat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

zoomable's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

  • Update compose to v1.5.0-alpha03 (androidx.compose.ui:ui-util, androidx.compose.ui:ui-tooling-preview, androidx.compose.ui:ui-tooling, androidx.compose.ui:ui-test-manifest, androidx.compose.ui:ui-test-junit4, androidx.compose.ui:ui, androidx.compose.runtime:runtime, androidx.compose.foundation:foundation, androidx.compose.animation:animation-core)

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/publish-docs.yml
  • actions/checkout v3
  • peaceiris/actions-gh-pages v3
.github/workflows/test.yml
  • actions/checkout v3
  • actions/setup-java v3
  • actions/checkout v3
  • actions/setup-java v3
gradle
gradle.properties
settings.gradle
build.gradle
app/build.gradle
gradle/libs.versions.toml
  • androidx.compose.animation:animation-core 1.5.0-alpha01
  • androidx.compose.foundation:foundation 1.5.0-alpha01
  • androidx.compose.runtime:runtime 1.5.0-alpha01
  • androidx.compose.ui:ui 1.5.0-alpha01
  • androidx.compose.ui:ui-test-junit4 1.5.0-alpha01
  • androidx.compose.ui:ui-test-manifest 1.5.0-alpha01
  • androidx.compose.ui:ui-tooling 1.5.0-alpha01
  • androidx.compose.ui:ui-tooling-preview 1.5.0-alpha01
  • androidx.compose.ui:ui-util 1.5.0-alpha01
  • androidx.compose.material3:material3 1.1.0-rc01
  • androidx.activity:activity-compose 1.7.1
  • androidx.core:core-ktx 1.10.0
  • androidx.lifecycle:lifecycle-runtime-ktx 2.6.1
  • androidx.test.ext:junit 1.1.5
  • androidx.test.espresso:espresso-core 3.5.1
  • com.google.accompanist:accompanist-pager 0.30.1
  • com.google.accompanist:accompanist-pager-indicators 0.30.1
  • io.coil-kt:coil-compose 2.3.0
  • junit:junit 4.13.2
  • org.jetbrains.kotlinx:kotlinx-coroutines-test 1.6.4
  • com.android.application 8.0.0
  • com.android.library 8.0.0
  • org.jetbrains.kotlin.android 1.8.20
  • com.vanniktech.maven.publish 0.25.2
  • org.jetbrains.dokka 1.8.10
zoomable/build.gradle
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.1.1

  • Check this box to trigger a request for Renovate to run again on this repository

[FR]: Support double-tap zoom

Is there an existing issue for this?

  • I have searched the existing issues

Describe the problem

As of now, Zoomable supports a "double-tap + drag" zoom. Is it possible to support the arguably more usual "double-tap" zoom?
For example, it's a feature supported by PhotoView or Discord's image viewer.

Describe the solution

How it works:

Thanks.

Change branch operation policy

Currently the alpha version support of Compose has been included in the main branch.
This makes it difficult to add new features.
Therefore, I will change the branch operation.

  • Move the alpha version support of Compose to a dedicated branch.
  • Merge v1.4.x support of Compose to the main branch.

Gestures stops working in HorizontalPager

androidx foundation version : 1.5.0-beta01 (there's some api changes regarding the pager)
androidx material3 version : 1.1.0-alpha01

Zoomable modifier and gestures works just fine with scrolling for the first 2 pages on latest HorizontalPager, then it stops registering the gesture (clicks still works). In order to restore the functionality a configuration changes is required (rotate screen for ex).

I suspect the 1.5.0-beta01 is the culprit, but I would like your opinion regarding a possible fix regarding this sudden lack of registration.

After some debugging found out that the gesture is happening, but it cancels/stops just before zoomState.applyGesture in Zoomable.kt

Delay between double tap zoom is too long

I'm using coil's AsyncImages inside an HorizontalPager but since the time between the double tap zoom is kinda long, swiping relatively fast leads to unwanted zooms.
Im pretty sure this can be fixed by making the time between the 2 taps shorter.

Example: https://gyazo.com/2bc85ed503b4d5ab4772b610accbcd0d
In this example i wasn't trying to zoom in the images, but just to swipe between them.
Could you please fix it?

Gestures stops working in HorizontalPager with Compose 1.5.0

Modifier.zoomable stops working after swipeing the page of HorizontalPager.

With compose 1.5.0, this issue occurs. (I confirmed with 1.5.0-beta02)
With compose 1.4.3, it does not occur.

This may be a problem on the compose library side, but I will also investigate if it is possible to work around it on the Zoomable side.
If you know more information please let me know.

Related issues

[Feature Request] Add single tap support

There's some cases like the Gallery use case where the user can toggle systemui on single tap

I've tried adding the onSingleTap unit in the library but there's a small bug where if the zoom is quite high (> 5f), and a single tap is registered, there's a slight movement in the offset on every tap

Example code:

private suspend fun PointerInputScope.detectTransformGestures(
    ..
    onSingleTap: () -> Unit = {},
    enableOneFingerZoom: Boolean = true,
) = awaitEachGesture {
     ..
     if (isTap) {
     // Vertical scrolling following a double tap is treated as a zoom gesture.
        if (enableOneFingerZoom) {
        val secondDown = awaitSecondDown(firstUp)
            if (secondDown != null) {
                ..
            } else onSingleTap()
        ..
        } else onSingleTap()
     }
     
     onGestureEnd()
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.