Skip to content

[BUG] Remove option for files not visible in landscape #4920

Open

Description

@jesmrec

Steps to reproduce

  1. Set device in landscape orientation
  2. Click the three-dot-button of any file (not folder)
  3. Scroll down

Actual behaviour

Remove option, just below Details is not visible

Screen_recording_20260706_101816.mp4

Expected behaviour

Remove option, just below Details is visible

Not reproducible in tablets

Xiaomi Redmi 13, Android 15

Activity

  1. added this to the 4.9 - Next milestone on Jul 6, 2026
  2. DeepDiver1975 commented on Jul 6, 2026

    @DeepDiver1975
    Contributor

    Confirmed bug in current master. Located cause:

    The single-file three-dot menu is a BottomSheetDialog opened in observeMenuOptionsSingleFile():

    • MainFileListFragment.kt:689 — dialog.setOnShowListener { behavior.peekHeight = fileOptionsBottomSheetSingleFile.measuredHeight } sets the peek to the full measured content height and leaves the sheet STATE_COLLAPSED.
    • MainFileListFragment.kt:678-687 — drag is disabled (STATE_DRAGGING is forced back to STATE_EXPANDED), so the user can't drag the sheet up either.

    Result: in landscape the sheet's own bottom edge sits below the (short) screen, so the last rows (Details → Remove) are off-screen. The inner option list is inside a ScrollView capped at max_height_bottom_sheet (file_options_bottom_sheet_fragment.xml:90-105), and that cap is 300dp in landscape vs 400dp portrait (res/values-land/dims.xml vs res/values/dims.xml) — but that inner cap doesn't help because the whole sheet, header included, is anchored past the viewport bottom, and there's no scroll of the sheet itself. Not reproducible on tablets (taller landscape viewport / sw600dp), matching the report.

    Fix direction:

    • Don't pin peekHeight to full content height; let the sheet expand within the window (STATE_EXPANDED + behavior.maxHeight/skipCollapsed), or clamp peekHeight to the available height so the ScrollView (which already scrolls) becomes the scroll surface. The ScrollView at line 90 already supports scrolling once the sheet is bounded to the screen.

    Distinct from the CAB/action-bar landscape fix in #4895 (that only touches the action-mode bar via window insets, not observeMenuOptionsSingleFile) and from #4898 (sort sheet — no capped ScrollView). Same landscape-height family, different component.

    🤖 Generated with Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions