rubensousa / DpadRecyclerView

A RecyclerView built for Android TV with Compose in mind and as a replacement for Leanback's BaseGridView.
https://rubensousa.github.io/DpadRecyclerView/
Apache License 2.0
136 stars 17 forks source link

Not able to scroll down or up on some particular view types #272

Closed mdrafiwynk closed 4 weeks ago

mdrafiwynk commented 1 month ago

I am using version 1.2.0-alpha03 version of library. I am using different view types in reycler view where card have different sizes. But in some screen sizes or some view type order. I am not able to scroll down or up on Dpad -down or up click. I am getting stuck on some rails (calling horizontal row). My first rail is Apps rail and second is MyWatchlist. But I am not able to go to apps to watchlist on dpad-down click but able to go to feature banner. Please check the below video for reference and let me know the RCA for this. I have reproduce this by changing the screen size 19201080 to 10801920. As its not happing for all screen sizes. I think this might be some alignment issue.

Screen size : 1080x1920 (Not working) Screen_recording_20241005_002559.webm

Screen size : 1920x1080 (Working fine) Screen_recording_20241005_003353.webm

Please help me to get rid of this issue @rubensousa

rubensousa commented 1 month ago

@mdrafiwynk please check if that issue is reproducible with the latest alpha version 1.4.0-alpha06. If it is, I would need a code sample to investigate it, since I can't reproduce this in the sample project here in the repo

mdrafiwynk commented 1 month ago

Yes its also exist in latest version. You can reproduce it by decreasing screen size like 1080x1920. Just add view type with landscape card and then portrait card as i did. I don't have sample. I have real project that I can't share with you due to company policy. I am heavily relying on your library. Could you please give urgent attention to this if possible

I have tried to debug and but not able to debug much due to code complexity.

rubensousa commented 1 month ago

@mdrafiwynk can you please fork this project and modify the sample so that the issue is clearly reproducible there? I can launch the sample in my phone and it still behaves correctly.

mdrafiwynk commented 1 month ago

@mdrafiwynk can you please fork this project and modify the sample so that the issue is clearly reproducible there? I can launch the sample in my phone and it still behaves correctly.

Sure. I will

rubensousa commented 1 month ago

Could you please give urgent attention to this if possible

I work on this in my free time. If you need urgent help, I would advise you to provide a sample that reproduces the issue. I'm currently preparing the next beta version and could have a look at that issue if you show me that it is reproducible in the latest state

mdrafiwynk commented 1 month ago

Could you please give urgent attention to this if possible

I work on this in my free time. If you need urgent help, I would advise you to provide a sample that reproduces the issue. I'm currently preparing the next beta version and could have a look at that issue if you show me that it is reproducible in the latest state

@rubensousa I found the exact issue. Actually. I have one case in which I have rail title came from API but I have to fetch horizontal list from db. Like in case of continue watching rail from API I got only title and then I add that rail into the adapter list without its content and when it fetch from db I search the rail and update its horizontal list. But if I got empty list from db then I also don't show the title but item exist in adpter but there is no card visible. In that case focus is not moving to the next visible card. Because as per adapter next item exist but not focusable. In that scenario, focus should go to next visible card item. I am doing this because I want to add rail to exact position as it came in API.

Could you please help me to fix this? Where I need to change in library?

rubensousa commented 1 month ago

@mdrafiwynk Please provide a sample that showcases that issue. I can't help without seeing what's happening

mdrafiwynk commented 1 month ago

@mdrafiwynk Please provide a sample that showcases that issue. I can't help without seeing what's happening

Give me some time. I'll provide the same

rubensousa commented 1 month ago

I'm closing this since this is related to https://github.com/rubensousa/DpadRecyclerView/issues/274

The root cause seems to be the same. Feel free to re-open if it's not fixed in the latest snapshot

mdrafiwynk commented 1 month ago

Its not fixed.. I have checked with latest fix but this issue still persist. I will share one sample tomorrow for reproduction.

rubensousa commented 1 month ago

I managed to reproduce this only when setFocusSearchDisabled is used: https://github.com/rubensousa/DpadRecyclerView/pull/278/files

All other cases, including when a DpadRecyclerView is empty, seem to be fine. I will check your sample once you share it

rubensousa commented 1 month ago

@mdrafiwynk any update here?

rubensousa commented 1 month ago

@mdrafiwynk did you have time to check this again?

mdrafiwynk commented 1 month ago

@rubensousa Sorry for late reply. But I didn't get time to create sample for this. I will try to do this on weekend.

rubensousa commented 1 month ago

@mdrafiwynk Any update here?

rubensousa commented 4 weeks ago

@mdrafiwynk I'm going to close this since there are no more updates