Skip to content

feat: improve tablet and large-screen navigation layout#16764

Open
mykh-hailo wants to merge 2 commits intonextcloud:masterfrom
mykh-hailo:feat/tablet-ux
Open

feat: improve tablet and large-screen navigation layout#16764
mykh-hailo wants to merge 2 commits intonextcloud:masterfrom
mykh-hailo:feat/tablet-ux

Conversation

@mykh-hailo
Copy link
Copy Markdown
Contributor

@mykh-hailo mykh-hailo commented Mar 27, 2026

Summary

This change adapts the main file browser and several activities for tablets and wide layouts (typically sw600dp / w600dp) by using a persistent navigation column next to content instead of relying only on the sliding DrawerLayout pattern used on phones.

Closes: #14871

DrawerActivity is updated so drawer behavior works when the root layout is not a DrawerLayout (e.g. ConstraintLayout with a fixed-width nav region). Alternative layouts under layout-sw600dp align Compose, Navigator, Contacts preferences, Synced folders, and Upload list with the same idea. files.xml is refactored to support the sidebar + content structure and to keep ViewBinding (FilesBinding / drawer_menu) consistent. TrashbinActivity and toolbar_standard are adjusted for the new structure. New sidebar.xml and resource tweaks (bools, dims) support the tablet configuration.

Technical notes

  • DrawerActivity: Centralizes “menu layout” handling; drawer toggle, ActionBarDrawerToggle, and related APIs run only when the root is a DrawerLayout; optional hamburger visibility when the layout does not use a sliding drawer.
  • Resource qualifiers: layout-sw600dp (and related values-*) provide wide-screen layouts without affecting default (phone) resources.
  • File display: files.xml + sidebar.xml structure; FileDisplayActivity updated as needed for binding / initialization.
  • Consistency: Trashbin and toolbar spacing tweaks aligned with the new app bar / content arrangement.

@mykh-hailo
Copy link
Copy Markdown
Contributor Author

@alperozturk96 Could you please check my PR for the tablet view?
Any feedback and advice is always welcome

Copy link
Copy Markdown
Collaborator

@alperozturk96 alperozturk96 left a comment

Choose a reason for hiding this comment

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

Hello, thank you for your PR.

Since these changes affect multiple screens, they will require thorough testing. To help the review process, could you please limit the scope to a single screen with minimal changes for now? Once that is reviewed and validated, we can proceed incrementally.

Additionally, please:

  • Exclude any .salive files from the PR (I updated gitignore)
  • Remove comments that restate obvious information (e.g., field descriptions that are self-explanatory)
  • Follow camelCase naming conventions (e.g., sidebarQuotaView instead of mSidebarQuotaView)

Thanks again for your contribution.

@mykh-hailo
Copy link
Copy Markdown
Contributor Author

mykh-hailo commented Mar 30, 2026

@alperozturk96 Thank you for the updates.
All the code that handles the sidebar and drawer menu is implemented DrawerActivity, and it adapts to different screen sizes. I've also added the sidebar layout to the XML files where needed.

I initially tired to create a patch that only affects FileDisplayActivity, but it turns out that all related changes are required, except for the XML layouts. However, if the XML layouts for other activities are not updated, it may cause error during testing.

Could you advise on a simpler way to handle this so it's easier to test?

@mykh-hailo mykh-hailo force-pushed the feat/tablet-ux branch 2 times, most recently from 4136dae to 97bafb0 Compare March 30, 2026 19:15
@mykh-hailo

This comment was marked as resolved.

@alperozturk96

This comment was marked as resolved.

@mykh-hailo

This comment was marked as off-topic.

@alperozturk96

This comment was marked as off-topic.

@mykh-hailo
Copy link
Copy Markdown
Contributor Author

@alperozturk96 I'd appreciate it if I can continue to work this issue.

@github-actions
Copy link
Copy Markdown

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@mykh-hailo
Copy link
Copy Markdown
Contributor Author

@alperozturk96 Can you provide me any updates on this issue?
Can you go ahead with this issue now?

@alperozturk96
Copy link
Copy Markdown
Collaborator

@tobiasKaminsky Could you please share your feedback?

@mykh-hailo
Copy link
Copy Markdown
Contributor Author

@alperozturk96 , @tobiasKaminsky I'd appreciate if you can provide any update on this PR.

Copy link
Copy Markdown
Collaborator

@alperozturk96 alperozturk96 left a comment

Choose a reason for hiding this comment

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

Hello

Thank you for the PR 👍

Comment thread app/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java Outdated
}
}

private View findSidebarQuotaViewById(int id) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we extract whole new sidebar logic to the new Kotlin class and use reference here since DrawerActivity already too big.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@alperozturk96 I updated the code for your comment here.
Could you possibly review it please?

private NavigationView drawerNavigationView;

private View sidebarMenu;
private NavigationView sidebarNavigationView;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could you please add screen-shot tests for tablet and phone?

Copy link
Copy Markdown
Contributor Author

@mykh-hailo mykh-hailo Apr 15, 2026

Choose a reason for hiding this comment

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

@alperozturk96 Here is screenshots.

Phone(Portrait)

image

Phone(Landscape)

image

Tablet

image

Signed-off-by: mykh-hailo <kristianderonta0205@gmail.com>
Signed-off-by: mykh-hailo <kristianderonta0205@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance UX/UI for Tablet Devices

3 participants