Visitar URL original
[BUG] Sort menu not adapted to edge-to-edge in landscape · Issue #4898 · owncloud/android · GitHub
Skip to content

[BUG] Sort menu not adapted to edge-to-edge in landscape #4898

Open

Description

@joragua

Comes from: #4887 (comment)

Actual behaviour

Sort menu in the file list is not adapted to the edge-to-edge feature

Image

Expected behaviour

Sort menu should be adapted to the edge-to-edge feature

Steps to reproduce

  1. Rotate the device to landscape mode

Environment data

Android version: Starting from Android 15

Activity

  1. changed the title [-][BUG] Sort menu not adapted to edge-to-edge feature[/-] [+][BUG] Sort menu not adapted to edge-to-edge in landscape[/+] on Jun 19, 2026
  2. DeepDiver1975 commented on Jul 6, 2026

    @DeepDiver1975
    Contributor

    Confirmed. The sort menu is SortBottomSheetFragment (a BottomSheetDialogFragment), and it applies no window insets, so in landscape edge-to-edge its content draws under the side nav bar / display cutout.

    Evidence (current master):

    • SortBottomSheetFragment.kt — no setOnApplyWindowInsetsListener / WindowInsetsCompat; onStart() (SortBottomSheetFragment.kt:76-81) only forces STATE_EXPANDED, never pads for insets.
    • res/layout/sort_bottom_sheet_fragment.xml — root ConstraintLayout has only standard_padding, no fitsSystemWindows and no inset-driven padding.
    • build.gradle: sdkTargetVersion = 36 → edge-to-edge is enforced by the platform, so the dialog window must consume insets itself.
    • The existing per-activity insets listeners (FileDisplayActivity.kt, ActivityExt.kt, etc.) don't help: a BottomSheetDialogFragment has its own dialog window, so the activity-root listener never reaches it.

    Fix outline: consume systemBars (or systemBars + displayCutout) insets on the sheet's root/content — e.g. ViewCompat.setOnApplyWindowInsetsListener in onViewCreated, applying start/end/bottom padding — so items clear the nav bar/cutout in landscape.

    Related: same edge-to-edge/landscape inset family as 4892 (multi-select CAB) and 4803 (FABs), but distinct component and fix site — the bottom-sheet dialog window here needs its own inset handling.

    🤖 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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions