Gestures in Jetpack Compose

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 พ.ย. 2024

ความคิดเห็น • 43

  • @AndroidDevelopers
    @AndroidDevelopers  ปีที่แล้ว +6

    Subscribe to Android Developers → goo.gle/AndroidDevs

    • @aymnand3215
      @aymnand3215 ปีที่แล้ว

      ‏‪0:10‬‏ ‏‪0:12‬‏

    • @wendyflowers9458
      @wendyflowers9458 ปีที่แล้ว

      0:16 0:16

    • @ManuStream
      @ManuStream ปีที่แล้ว

      It's very informative, is the reusable sources for transformable 1 st example? Pinch, rotate, resize, Offset?🎉

  • @chakflying1
    @chakflying1 ปีที่แล้ว +10

    Thank you for explaining this magical feature in Google Photos 👍

  • @RaghavSharma-nt3hr
    @RaghavSharma-nt3hr ปีที่แล้ว +2

    Wow! It's always a delight to understand concepts from the experts themselves. Thanks ❤

  • @abdonasr1222
    @abdonasr1222 ปีที่แล้ว +3

    Very detailed video about Gesture APIs capabilities and use cases, thanks for this ♥

    • @AndroidDevelopers
      @AndroidDevelopers  ปีที่แล้ว +1

      Thank you for watching! We’re glad you found the video helpful.

  • @tch.777
    @tch.777 ปีที่แล้ว +4

    Amazing video, amazing explanation, I really enjoyed it, I did amazing things with this information, thank you very much, please keep making videos about this!!!🙏

  • @AbdallahMehiz
    @AbdallahMehiz หลายเดือนก่อน

    detectTransformGestures consumes other vertical and horizontal drag gestures if defined before it

  • @arvindkumar72446
    @arvindkumar72446 ปีที่แล้ว

    I will just say one thing. You are amazing.

  • @paulobusato2
    @paulobusato2 10 หลายเดือนก่อน

    So, that's why they are called expert. Awesome!

  • @ananthababu8272
    @ananthababu8272 ปีที่แล้ว +3

    Great Teaching with Good use cases 👌

  • @Maarttttt
    @Maarttttt ปีที่แล้ว +4

    I feel very limited that, in Compose, TouchIntercept nodes seem to hoard all pointer events for itself until the pointer is up again. Often I'd like multiple components to respond to pointer events at the same time.

    • @JolandaVerhoef
      @JolandaVerhoef ปีที่แล้ว +4

      If you handle events yourself (instead of using gesture recognizes), you can choose not to consume events, in which case they are forwarded to the next node.

    • @Maarttttt
      @Maarttttt ปีที่แล้ว

      @@JolandaVerhoef Does not work when using pointerInput->awaitEachGesture. All events are still taken by one component. Perhaps it's a bug in SuspendPointerInputElement. (My previous comment was deleted???)

  • @terttyssdf
    @terttyssdf ปีที่แล้ว

    it's quite informative,, could you share the link for the photos as well

  • @xncola
    @xncola ปีที่แล้ว +3

    How do the detectGestures function work if my image is in a horizontal pager for example? Wouldn't it overlap with the "swipe" gesture ? How can we detect if we should swipe or pan inside a zoomed image ?

    • @MrYoutruber
      @MrYoutruber 11 หลายเดือนก่อน

      yeah, my horizontal pager stopped scrolling after adding pinch to zoom

    • @MrYoutruber
      @MrYoutruber 11 หลายเดือนก่อน

      UPD: if I apply zoom to the HorizontalPager instead of the Image both gestures work but I need to reset the zoom when the page changes

    • @xncola
      @xncola 9 หลายเดือนก่อน

      @@MrYoutruber can you swipe while you are in a zooming state ?

  • @rly_
    @rly_ ปีที่แล้ว

    Just in time video 😮. I'm going to use it in couple of days ❤

  • @hxrin3748
    @hxrin3748 ปีที่แล้ว +1

    How does the grid layout handle scrolling when we're dragging over it?

    • @jolandaverhoef7674
      @jolandaverhoef7674 ปีที่แล้ว +1

      Great question! It was a bit too much to explain in this video, but the sample code contains this behavior. It basically sets some state when the pointer is close to an edge, and that state is used to periodically update the scroll state of the grid.

  • @dewetvanrooyen8458
    @dewetvanrooyen8458 8 หลายเดือนก่อน

    So complicated I am super confused . Need to watch it a few times it would have been nice if this was a live demo showing us the steps while coding and testing the app.

  • @truepicksyt3323
    @truepicksyt3323 ปีที่แล้ว +1

    Excited to watch this 😀

  • @MartinusKelimpungan
    @MartinusKelimpungan 11 หลายเดือนก่อน

    Does Jetpack Compose has built-in touch gesture for drag and drop for lazy list like RecyclerView did?

  • @JohnSchizas-f2g
    @JohnSchizas-f2g ปีที่แล้ว

    Amazing Video. Thank you very much !!!!!!! Keep up with great job.

  • @psytoolkit
    @psytoolkit ปีที่แล้ว

    This does not work as the modifier .pointerInput seems to want parameters in the brackets but that is not explained?

    • @jolandaverhoef7674
      @jolandaverhoef7674 ปีที่แล้ว

      True, for the sake of time I did not go into much detail on that parameter. You need to pass a key. When the value of this key parameter changes, the pointer input block is re-executed. This is quite a common pattern (e.g. also used by LaunchedEffect)

  • @Virus00000000000001
    @Virus00000000000001 9 วันที่ผ่านมา

    where is the full project link?

  • @MrPaulOpenshaw
    @MrPaulOpenshaw 10 หลายเดือนก่อน

    Thanks for video!

  • @robchr
    @robchr ปีที่แล้ว

    This is awesome!

  • @jersn5560
    @jersn5560 ปีที่แล้ว

    I am confused, I observed this behavior myself, there is no way for a compose to prevent the propagation of event any further down the heirarchy. So why on the video it says that the PhotoItem consumes the event. How?

    • @amsavarthanlv5667
      @amsavarthanlv5667 10 หลายเดือนก่อน

      Look at the internals of combined clickable you will find that the gesture detector attached to it consumes the event by default

  • @EvoOfDroid
    @EvoOfDroid ปีที่แล้ว +2

    Cool

  • @george_sepetadelis
    @george_sepetadelis ปีที่แล้ว

    Interesting

  • @andrewdunbar828
    @andrewdunbar828 ปีที่แล้ว

    Does this imply that double-tap is not a gesture?

    • @bhanubhattarai13
      @bhanubhattarai13 ปีที่แล้ว +1

      It is one of many tap gestures viz long press, double tap, tap, etc.

    • @andrewdunbar828
      @andrewdunbar828 ปีที่แล้ว +1

      @@bhanubhattarai13 Ah that makes sense. I was thrown by the definition of a gesture as a press event followed by a series of pointer events and finally a release event. (Sorry I probably used the wrong terms there.)

  • @withKaaveh
    @withKaaveh ปีที่แล้ว

    Please remove remote clicking in editing video 😅

  • @j2shoes288
    @j2shoes288 8 หลายเดือนก่อน

    Still very poor. Imagine you want a way to know if a user scrolling or pressing, and the PISS POOR SDK doesn't have the abililty to know the difference, since the scroll will trigger the press event.