Status Update
Comments
jn...@google.com <jn...@google.com>
st...@google.com <st...@google.com> #2
Hi. Thanks for reporting this. Fixed in alpha-04
st...@google.com <st...@google.com>
ap...@google.com <ap...@google.com> #3
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug:
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
mk...@google.com <mk...@google.com>
jo...@gmail.com <jo...@gmail.com> #4
yi...@googlemail.com <yi...@googlemail.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.tv:tv-material:1.0.0-alpha04
mk...@google.com <mk...@google.com> #6
Hi Yingding,
Can you please share the code example regarding that issue? What exactly you're trying to make work? How MPAndroidChart
is added and where are SwipeDismissableNavHost
and edgeSwipeToDismiss
in it?
Thanks!
yi...@googlemail.com <yi...@googlemail.com> #7
Reply to #6
Hi Mikhail, I created a demo repo for the MPAndroidChart
inside AndroidView
(
Please find the demo video showing the edgeSwipeToDismiss
doesn't work on AndroidView
under this link
I want to show multiple LineChart Graphs with MPAndroidChart
, which are horizontally scrollable. The drag and scroll event is handled by the view system code from the AndroidView
, so that all the drag event shall be passed to the AndroidView
without being consumed by the parent SwipeDismissableNavHost
.
You shall be able to run the code from my sample repo directly and see this effect on the emulator.
I will be glad to answer any further of your questions. I am seeking a way to tell the SwipeDismisableNavHost
shall not consume drag event for the AndroidView
, the unswipeable
hack gives currently partial success. It would be great, that the edgeSwipeToDismiss
modifier can work on any composable.
mk...@google.com <mk...@google.com> #8
Thanks for the demo! So I see that sometimes scroll works, sometimes doesn't . When I remove .unswipeable and .edgeSwipe modifiers, I still able to scroll graphs in some cases- like a long hold and drag - then they start working. I think the problem here is with touch events, that they are not properly handled in Views and Compose worlds if used together
yi...@googlemail.com <yi...@googlemail.com> #9
reply to #8
I don't think so, if you try the GraphsScreenPreview
in GraphsScreen.kt
in interactive mode and remove the unswipeable
and edgeSwipeToDismiss
, the touch event works fine.
The Preview
tool works, since it is not wrapped inside SwipeDismisableNavHost
, which intercepts the drag events. My code shall work if it is not used with SwipeDismisableNavHost
. I am just curious, what happens here.
yi...@googlemail.com <yi...@googlemail.com> #10
Probably the handling of touch events in both view and compose world also contributes to this complex issue :(
yi...@googlemail.com <yi...@googlemail.com> #11
Kindly asking if there is any update on making edgeSwipeToDismiss supporting "AndroidView" composable?
- I am wondering whether, #5
unswipeable()
is the official solution for disableSwipeToDismiss
. - Whether the associated root cause stated by #8 that
AndroidView not receiving proper touch events
from is still present for170320973 AndroidView
associated withSwipeToDismissBox
. Does the touch event issue need to be dealt by the developer forAndroidView
individually or the compose framework can help?
st...@google.com <st...@google.com> #12
We have submitted a fix to
Description
Component used: SwipeToDismissBox Version used: 1.0.0-alpha06 Devices/Android versions reproduced on:
Thehttps://developer.android.com/training/wearables/overlays/exit#horizontal-scroll
SwipeDismissFrameLayout
solves this, and the problem is explained here:If this is already possible using thresholds or something in Compose, I'd be happy to see some documentation for this particular use case.