Skip to content

Add "Take a photo" option to the "+" FAB menu - #220

Open
Lightz2002 wants to merge 1 commit into
opencloud-eu:mainfrom
Lightz2002:feat_take_a_photo
Open

Add "Take a photo" option to the "+" FAB menu#220
Lightz2002 wants to merge 1 commit into
opencloud-eu:mainfrom
Lightz2002:feat_take_a_photo

Conversation

@Lightz2002

Copy link
Copy Markdown

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: new fab_take_photo mini FAB with label,
    content description, and a new camera icon (ic_action_take_photo)
  • MainFileListFragment.kt:
    • registerFabTakePhotoListener() reuses the existing
      uploadActions?.uploadFromCamera() flow (FilesUploadHelper)
    • Wired into FAB expand/collapse focus handling and collapseFab()
    • Hidden together with Upload/New document when the current folder has no
      add-file permission; shown/hidden with the rest of the FAB group

Behavior

  • Tap "+" → "Take a photo" → system camera opens → captured photo is uploaded
    to the current folder (same path as Upload → Picture from camera)
  • No new permissions; still delegates to the system camera app via
    ACTION_IMAGE_CAPTURE

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.

1 participant