Git Product home page Git Product logo

Comments (5)

yschimke avatar yschimke commented on June 12, 2024 1

New PR #1689

from horologist.

yschimke avatar yschimke commented on June 12, 2024 1

This should be in 0.5.7 when it shows up in maven central.

from horologist.

yschimke avatar yschimke commented on June 12, 2024
import androidx.compose.ui.input.rotary.onRotaryScrollEvent

That's a framework function, but it's really low level. So not deprecated, but definitely a hope is that you never need to implement it.

I'm putting up a PR to cleanup some of the copied Picker classes, that hopefully we can use from Wear Compose directly now, in 1.3 alphas.

#1686

With that, you could replace it with

    Picker(
        pickerState = pickerState,
        modifier = modifier.rotaryWithSnap(
            pickerState.toRotaryScrollAdapter(),
        ),

from horologist.

yschimke avatar yschimke commented on June 12, 2024

I'm not clear why your sample isn't working, is something calling focusRequester.requestFocus() at the appropriate time?

But that wouldn't explain why rotaryWithScroll is working...

from horologist.

feduss avatar feduss commented on June 12, 2024

Nope, i didn't call a requestFocus...

i can't find toRotaryScrollAdatapter, because my picker state is a PickerState object:

https://github.com/feduss/Tomatimer/blob/7b45b934a6f7657acc415d782dd6bf98a188f89a/app/src/main/java/com/feduss/tomato/view/edit/EditView.kt#L78

But it's working great with rotaryWithScroll

from horologist.

Related Issues (20)

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.