Add "Take a photo" option to the "+" FAB menu - #220
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The change is small, self-contained, and correctly reuses the existing camera-upload action while integrating cleanly with the existing FAB visibility/focus logic.
Pull request overview
Adds a new “Take a photo” mini-FAB entry to the existing “+” FloatingActionsMenu in the file list, enabling a one-tap path to the existing uploadFromCamera() flow from the FAB menu.
Changes:
- Adds a new
fab_take_photostring resource. - Introduces a new
fab_take_photomini FAB inmain_file_list_fragment.xmlwith a dedicated camera vector icon. - Wires the new mini FAB into
MainFileListFragmentvisibility, focus, expand/collapse, and click handling (delegating touploadActions?.uploadFromCamera()).
File summaries
| File | Description |
|---|---|
| opencloudApp/src/main/res/values/strings.xml | Adds label/content-description text for the new “Take a photo” mini FAB. |
| opencloudApp/src/main/res/layout/main_file_list_fragment.xml | Adds the new fab_take_photo mini FAB entry to the “+” menu. |
| opencloudApp/src/main/res/drawable/ic_action_take_photo.xml | Adds a new vector drawable icon used by the mini FAB. |
| opencloudApp/src/main/java/eu/opencloud/android/presentation/files/filelist/MainFileListFragment.kt | Registers the new FAB click listener and integrates it into FAB visibility and focus handling. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
in iOS we have the same feature and the string is called "Take photo or video", does it make sense to align this @Lightz2002 ? Otherwise I agree with @wernrab feel free to merge or wait if @Lightz2002 wants to change the string. |
|
@guruz currently this pr commit only can take photo when opening the camera (no video). Is it ok to stay with "Take a photo" ? |
|
Thank you for the contribution @Lightz2002 |

Adds a dedicated "Take a photo" mini FAB to the "+" button menu, so users can
launch the camera and upload the capture directly — without going through
Upload → Picture from camera.
The existing camera option in the Upload bottom sheet remains unchanged.
Changes
main_file_list_fragment.xml: newfab_take_photomini FAB with label,content description, and a new camera icon (
ic_action_take_photo)MainFileListFragment.kt:registerFabTakePhotoListener()reuses the existinguploadActions?.uploadFromCamera()flow (FilesUploadHelper)collapseFab()add-file permission; shown/hidden with the rest of the FAB group
Behavior
to the current folder (same path as Upload → Picture from camera)
ACTION_IMAGE_CAPTURE