Skip to content

Conversation

@RyukXO-code
Copy link

@RyukXO-code RyukXO-code commented Dec 23, 2025

Description
Fixed the issue where the Caption field becomes inaccessible when the image preview thumbnails are expanded in the upload flow. Users can now scroll to access all input fields regardless of thumbnail expansion state.

Changes Made

  • Changed activity_upload.xml root layout from RelativeLayout to LinearLayout with vertical orientation
  • Added maxHeight="120dp" to rv_thumbnails RecyclerView to limit thumbnail expansion
  • Added nestedScrollingEnabled="false" to rv_thumbnails to prevent scroll conflicts
  • Modified ViewPager to use layout_weight="1" with 0dp height for proper space distribution

Root Cause
When the top card's thumbnail RecyclerView expanded, it pushed the ViewPager containing the upload details off-screen. The unlimited height of the thumbnail section caused the Caption field to become inaccessible.

Solution
Limited the thumbnail RecyclerView height and restructured the layout to properly distribute available space between the thumbnail section and the detail fragment.

Testing

  • Tested on custom emulator - 5 inch screen size, resolution 1080*1440
  • Caption field is accessible when thumbnails are expanded
  • Caption field is scrollable and editable
  • All other upload functionality works correctly
  • No build errors or layout issues

Fixes

Closes #6537

Screen Recording

Reproduced Bug
https://github.com/user-attachments/assets/f90b5c5d-989f-4548-943c-79f9d185da59

Fixed after the changes made
https://github.com/user-attachments/assets/5d1111b4-a7be-4ebd-81da-741bdcd29cf2

Copy link
Member

@nicolas-raoul nicolas-raoul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also post a "before" screencast showing the bug? Thanks!

For me the app with this pull request is working fine, but I was not experiencing the bug before either.

@RyukXO-code
Copy link
Author

Can you also post a "before" screencast showing the bug? Thanks!

For me the app with this pull request is working fine, but I was not experiencing the bug before either.

Posted the screencast which was showing the bug, Where we can't access the edit image and location button when the image preview is expanded. And after a long description the caption field is also getting inaccessible.

@RitikaPahwa4444
Copy link
Collaborator

Haven't tested after the clean up (last commit) but I was able to scroll through. Just curious: any idea why adjustPan is no longer helping on this screen and what if happens when the screen gets rotated?

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

✅ Generated APK variants!

@RyukXO-code
Copy link
Author

Thanks for checking it.

The main reason adjustPan wasn’t helping here is that the problem wasn’t really the keyboard, it was how the layout was structured. When the thumbnails card expanded, it pushed the ViewPager down, because it was inside a RelativeLayout with match_parent height, there wasn’t any flexible space left for the system to work with. So from android's point of view nothing could move and adjustPan had no effect.

By switching the container to a vertical LinearLayout and giving the ViewPager a layout_weight,the screen now has a clear flexible area. That lets Android shrink the ViewPager when the top card expands or when the keyboard appears, instead of pushing the caption field offscreen which is why scrolling starts working again.

Regarding rotation,since the ViewPager always fills whatever space is left after the top card, the layout adapts cleanly in both portrait and landscape. The thumbnails still have a capped height and the caption field stays reachable after rotation.

@RitikaPahwa4444
Copy link
Collaborator

Actually it started happening after we added support for edge to edge, so the layout worked as intended as per my understanding. But this can definitely be another way to approach the problem, so I'll start testing and reviewing :)

@RyukXO-code
Copy link
Author

Yeah,Ig those e to e changes reduced the usable height of the screen, so when the thumbnails expand, the layout doesn’t have enough room and the caption field gets pushed offscreen instead of staying scrollable.
This PR was mostly to make the layout more tolerant to those height changes by letting the main content scroll properly and limiting how much space the thumbnails can take. That way it keeps working even when keyboard behavior change.

Thanks a lot for testing it really appreciate it.If you notice anything weird during rotation or other cases I’m happy to take another look and adjust it ig.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Title hidden and inaccessible in scroll if description is long

4 participants