Skip to content

fix : UI padding for better layout #6509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

vinay769
Copy link
Contributor

@vinay769 vinay769 commented Apr 1, 2025

Fix: Ensure Challenges ListTile in Prices Section is Accessible

Description

Before this PR, the Challenges ListTile in the Prices section was not accessible on Android due to it being hidden under the navigation bar.

Changes Made

✔️ Added bottom padding to provide extra spacing.
✔️ Wrapped the content inside a SafeArea to prevent UI overlap issues.
✔️ Ensured all list items remain visible across different screen sizes.


Before & After Screenshots

Before (Issue Present)

The last item in the list was not visible as it was hidden under the navigation bar.

After (Fixed)

The list now has proper padding and respects the safe area, making all items accessible.


Fixes & Related Issues


Testing

  • ✅ Tested on a physical Android device.
  • ✅ Verified on different screen sizes to ensure no UI clipping.
  • ✅ Confirmed the issue is resolved across various navigation bar styles.

Type of Change

🛠 Bug Fix – UI improvement to ensure proper visibility of list items.


Checklist

  • My code follows the project's coding guidelines.
  • I have tested the changes on a real device/emulator.
  • I have attached screenshots to demonstrate the fix.
  • My changes do not introduce any new warnings or errors.

🚀

@github-project-automation github-project-automation bot moved this from Backlog to Ready in 💸 Open Prices Apr 3, 2025
@github-project-automation github-project-automation bot moved this from 💬 To discuss and validate to 🏗️ In Progress in 🤳🥫 The Open Food Facts mobile app (Android & iOS) Apr 3, 2025
@vinay769
Copy link
Contributor Author

vinay769 commented Apr 4, 2025

i have used this bottom padding and viewInsets final double bottomPadding = MediaQuery.viewInsetsOf(context).bottom == 0 ? MediaQuery.viewPaddingOf(context).bottom : MediaQuery.viewInsetsOf(context).bottom; is it okay @g123k , viewInsets.bottom is Used keyboard height when open and viewPadding.bottom is Used nav bar height when closed , can i push my changes now

Screenshot_20250402_005623

Screenshot 2025-04-04 131329

@teolemon teolemon linked an issue Apr 4, 2025 that may be closed by this pull request
@vinay769 vinay769 requested a review from g123k April 5, 2025 06:13
@g123k
Copy link
Collaborator

g123k commented Apr 5, 2025

I'm sorry, you'll just have to use viewPadding.
The height of the keyboard has no link here.

@vinay769
Copy link
Contributor Author

vinay769 commented Apr 6, 2025

I'm sorry, you'll just have to use viewPadding. The height of the keyboard has no link here.

yes sir , i have successfully removed extra viewInsets in commit @vinay769 [refactor : only used viewPadding](https://github.com/openfoodfacts/smooth-app/pull/6509/commits/92c4f2e888ee520c960d443449df524785924c05)

@vinay769
Copy link
Contributor Author

Hello @g123k @monsieurtanuki i have made changes accordingly can you please check ✔️

@vinay769 vinay769 changed the title fix : UI padding and safearea for better layout fix : UI padding for better layout Apr 16, 2025
@vinay769
Copy link
Contributor Author

Hello @g123k and @monsieurtanuki,

Could you please take a look at this PR and let me know if it fully addresses the issue? If not, I’d be happy to close this PR and open a cleaner version instead. Your guidance on this would be greatly appreciated.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Ready
Development

Successfully merging this pull request may close these issues.

Last list items not visible on Android
3 participants