premnirmal / StockTicker

A resizable widget that shows your financial portfolio on your android home screen
GNU General Public License v3.0
441 stars 116 forks source link

Pulldown refreshing gesture vs dragging items down #325

Open li-yifei opened 1 year ago

li-yifei commented 1 year ago

To Reproduce Sorry for my poor English that can't explain it well, would you like to check the video screen caputre below? Thank you

Update

It only happens after a manually refreshing on the "Watchlist" tab, or likely onResume was triggered.

Expected behavior It shouldn't do a refresh when someone is dragging an stock item down. IMHO that may be caused by passing the drag gesture to the RecyclerView as well as the item. (Sorry but I haven't checked your src yet.)

Screenshots https://youtu.be/U8mX2OnxMKU

Smartphone (please complete the following information):

li-yifei commented 1 year ago

Trying to make a PR to fix this issue in this weekend. I'm an android dev beginner but can do some debugging.

Update 1

It looks like when dragging happens before onDragStart is triggered, especially when my thumb hold tightly on the touchscreen that causes PortfolioItem moving randomly, the ItemTouchHelper instance won't consider the item being dragged is selected. So DND and refreshing happens together when pull down